ClassyTcl

  LineChart

Home    Documentation    Screenshots    Binary distributions    Source distribution   

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

LineChart options

LineChart objects support the following options in its configure method
-canvas
name of canvas to draw the chart
-tag
unique tag for all canvas items of the chart
-area
area in which to diplay the chart (a list of four numbers)
-xrange
xrange to display
-yrange
xrange to display
-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

LineChart specific methods

pathname destroy
pathname configure ?option? ?value? ?option value ...?
change the LineChart configuration options
pathname dataset name values
A linechart 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 x and y values consituting the positions of points on the line.
pathname dataget name
returns the current data in range $name
pathname labelist_set labels
sets the labels associated with the linechart
pathname delete name
delete the range with name $name
pathname hidden name ?value?
query or set the hidden state of the datarange name
pathname ranges
returns the names of all ranges in the chart
pathname lineconfigure name ?option? ?value? ?option value ...?
change the display properties of a range. The same options as for the canvas line item are available
pathname redraw

Peter De Rijk
hosted at SourceForge.net Logo