BarChart

Top  Previous  Next
BarChart( {xPos, yPos}, {xSize, ySize}, data, data titles, chart title, color1, color2 ) => draws a bar chart, at position init line, init col with size height, width, using the values in data array, for each bar, a title in data titles is displayed. Bars are drawn using color1 for outline, and color2 for filling. A title can be displayed at the top/center of the chart using the chart title parameter. See a sample at Charts.PDF

 

yPos (numeric) :     Vertical position of chart corner according to coordinate system.

 

xPos (numeric) :     Horizontal position of corner to start drawing the chart.

 

ySize (numeric) :     Height of box containing the chart.

 

xSize (numeric ) :    Width of box containing the chart.

 

Data (array) :               An array of data values to be charted, one bar will be drawn for each element of the array, automatic scaling will be calculated according to lowest/highest value present in the array.

 

Data titles (array) :      An array containing titles for each element in the data array, those titles will be displayed under each bar, so the quantity of characters in each title should not be long, so as to fit under the bar.

 

Chart title (character) :  Title of the chart, will be displayed on the center of the chart top row.

 

Color1 (numeric) :      Color for the outline of the drawn bars. Conforms to color definition in GRA.CH or any valid RGB color.

 

Color2 (numeric) :      Color for the filling of the drawn bars. Conforms to color definition in GRA.CH or any valid RGB color.

 

Example : oPdf:BarChart( {100, 650}, {550, 240}, data, titu, "Bar Chart Sample", GRA_CLR_BLUE, GRA_CLR_YELLOW )

     this will draw a bar chart with blue outlined bars and yellow fillings. See Demo.PDF for more details.

 

 

BARCHA1