Frank,
I believe that the redraw functionality is broken. Try running the
attached test case "graph". When the "Change" button is pressed, then
the graph should be redrawn as a pie chart, but this does not occur.
This happens because of a bug within the set method. The redraw method
calls set() with no parameters. This implies that the set method should
use the existing data already stored within the widget to redraw the
graph. It does not. The following change within set, will fix this:
Change:
my $data = shift;
To:
my $data = shift || $self->{data};
As a further suggestion, you might consider changing the -type option
from a PASSIVE to a METHOD option type, and automatically redraw behind
the scenes. Just an idea...
Regards,
Rob