Home    Documentation    Screenshots    Binary distributions    Source distribution   

subclass of Class
A BarChart object is not a widget. It is a class whose objects can be associated with a canvas widget. When a BarChart instance is associated with a canvas, it will draw a barchart on this canvas. Several BarChart (and LineChart and ChartGrid) objects can be associated with the same canvas.

BarChart options

BarcHart objects support the following options in its configure method
name of canvas to draw the barchart
unique tag for all canvas items of the chart
area in which to diplay the chart (a list of four numbers)
start position of data display
xrange to display
xrange to display
width of the bars, expressed as a fraction of the size available between 2 bars
when several dataranges are available, they wil be shifted by the value given here
show data as percentages
stack dataranges
display a legend
position to display the legend
font used for the legend
a list of labels that can be associated with the data
orient the labels: horizontal or vertical
font used for the labels
only show labels for every labelgap bar

BarChart methods

pathname destroy
pathname configure ?option? ?value? ?option value ...?
change the BarChart configuration options
pathname dataset name values
A barchart can have several ranges of data. Each range has a name. This method is used to set (or change) the data in a range. $values is a list of values that give the value for each data item. Optionally labels can be set with the labelist_set method
pathname dataget name
returns the current data in range $name
pathname labelist_set labels
sets the labels associated with the barchart
pathname delete name
delete the range with name $name
pathname hidden name ?value?
query or set hidden state of datarange name
pathname ranges
returns the names of all ranges in the chart
pathname barconfigure name ?option? ?value? ?option value ...?
change the display properties of a range. The same options as for the canvas polygon item are available
pathname redraw

Peter De Rijk
hosted at Logo