Table of Contents

## Dynamic Editing with Charts

Any numeric field can be charted as a horizontal bar chart or icon chart.

### Bar Charts

Bar charts are self-explanatory. Here we chart the stock availability for various products:

If the chart has both negative and positive numbers, you can choose two different colors for the negative and positive values.

Chart dimensions must be set for bar charts. This is the maximum size of a chart. Set the width and height.

To fit the chart into the chart dimensions, phpLens needs to estimate the maximum and minimum values of the field. You can provide an SQL statement to calculate it here, or hard-code numeric values (this is faster).

### Icon Charts

Icon charts are figures that are repeated multiple times to represent a given quantity. For example, if you want to display a red circle for every 10 units in stock, and 68 units were sold in a month, the icon chart would display 7 circles.

You can define your own images to use for your icon or bar charts; just store the picture in the phplens/img/bar directory and phpLens' dynamic editor will autodetect the images.

Refer to the chartLens property for more information.