ClassyTcl

  BarChart

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
-canvas
name of canvas to draw the barchart
-tag
unique tag for all canvas items of the chart
-area
area in which to diplay the chart (a list of four numbers)
-datastart
start position of data display
-xrange
xrange to display
-yrange
xrange to display
-barwidth
width of the bars, expressed as a fraction of the size available between 2 bars
-displace
when several dataranges are available, they wil be shifted by the value given here
-percentages
show data as percentages
-stacked
stack dataranges
-legend
display a legend
-legendpos
position to display the legend
-legendfont
font used for the legend
-labels
a list of labels that can be associated with the data
-labelorient
orient the labels: horizontal or vertical
-labelfont
font used for the labels
-labelgap
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 SourceForge.net Logo