This patch allow you to add event handlers to the
axis as the rest of the graph elements, so you can
write code as:
$graph axis bind all <Leave> {
set a [%W axis get current]
%W axis configure $a -color black
%W axis configure $a -titlecolor black
}
$graph axis bind config <Button-1> {
puts "Configuring [%W axis get current]"
}
$graph xaxis configure -bindtags "all config"
puts "binds for xaxis: [$graph xaxis cget -bindtags ]"
Also, a datacommand option has been added to the
graph widget, so, whenever the graph
displays a new frame because it receives the
notification that the graph data has changed from
one or more vectors, then the tcl 'datacommand'
will be called. It can be used as:
$graph configure -datacommand {
puts "data changed... updating the cursor tracking"
....
}
This is specially useful when you use blt to display
a stream of data that is been feeded from the C API
library, and you want to do something everytime the
graph redisplay itself because the data has changed.
Patch against the CVS repository (Aug 4, 22:14)
Logged In: NO
I like the axis binding capability. I would like to take it
a step further though. I am looking for a way to be able to
bind to the axis label so that I could change the label by
double-clicking on it. One might want to also bind to just
the axis itself, so that they could setup a menu for
changing axis properties.
In the same way that I want to be able to bind to the axis
labels, it would be nice to be able to bind to the graph
title, again so I could double-click on it to change it.
All-in-all I love BLTs graphing capability.