Skip Menu |

This queue is for tickets about the Tk-Chart CPAN distribution.

Report information
The Basics
Id: 121319
Status: resolved
Priority: 0/
Queue: Tk-Chart

People
Owner: DJIBEL [...] cpan.org
Requestors: andrea.nugnes [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.21



Subject: Ballon not refreshed
Date: Sun, 23 Apr 2017 18:04:46 +0200
To: bug-Tk-Chart [...] rt.cpan.org
From: Andrea Nugnes <andrea.nugnes [...] gmail.com>
Dears I’ve a problem to make a refresh of the graphical chart I’m using Tk::Chart::Pie version 1.18 The Perl version I’m using is 5.24.1 on Mac OS X 10 El Capitan Here is my example: #!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Chart::Pie; my $message; my $Received = 0; my $Sent = 0; my $Incomplete = 0; my $mw = MainWindow->new( -title => 'Patient Status', ); my $GraphFrame = $mw->Frame( -label => 'Graph', -borderwidth =>4, -relief => 'groove'); my $chart = $GraphFrame->Pie( -title => 'Patient Status Frame', -background => 'white', -linewidth => 2, )->pack(qw / -fill both -expand 1 /); my @data = ( [ 'Received', 'Sent', 'Incomplete' ], [ 3,3,4 ], ); my $bottomFrame = $mw->Frame( -label => 'Commands', -borderwidth => 4, -relief => 'raised'); my $quitButton = $bottomFrame->Button( -text => 'Quit', -command => \&exitProgram); my $infoPane = $bottomFrame->Label( -anchor =>'center', -textvariable => \$message, -borderwidth => 2, -relief => 'groove'); my $startStopButton = $bottomFrame->Button( -text => 'Start / Stop', -command => \&randomizePatients); $GraphFrame -> pack( -anchor => 'n', -side => 'top', -fill => 'x'); $bottomFrame -> pack( -anchor => 's', -side => 'bottom', -fill => 'x'); $quitButton -> pack( -anchor => 's', -side => 'bottom', -fill => 'x'); $infoPane -> pack( -anchor => 's', -side => 'bottom', -fill => 'x'); $startStopButton -> pack( -anchor => 's', -side => 'bottom', -fill => 'x'); #~ $chart->plot( \@data ); MainLoop(); sub randomizePatients(){ $Received = rand(10); $Sent = rand(10); $Incomplete = rand(10); $message = 'Received='.$Received.' | Sent='.${Sent}.' | Incomplete='.${Incomplete}; @data = ( [ 'Received', 'Sent', 'Incomplete' ], [$Received, $Sent, $Incomplete], ); $chart->clearchart(); $chart->plot(\@data); $chart->redraw(); } The problem is that after refreshing the chart with new data, the balloons are reporting always the first data when the chart was created. Is there any way to change this? Many thanks in advance Regards Andrea Nugnes andrea.nugnes@gmail.com
Le Dim 23 Avr 2017 12:05:25, andrea.nugnes@gmail.com a écrit : Show quoted text
> Dears > > I’ve a problem to make a refresh of the graphical chart > I’m using Tk::Chart::Pie version 1.18 > The Perl version I’m using is 5.24.1 on Mac OS X 10 El Capitan > > Here is my example: > #!/usr/bin/perl > use strict; > use warnings; > > use Tk; > use Tk::Chart::Pie; > > my $message; > my $Received = 0; > my $Sent = 0; > my $Incomplete = 0; > my $mw = MainWindow->new( -title => 'Patient Status', ); > my $GraphFrame = $mw->Frame( -label => 'Graph', -borderwidth =>4, > -relief => 'groove'); > > my $chart = $GraphFrame->Pie( > -title => 'Patient Status Frame', > -background => 'white', > -linewidth => 2, > )->pack(qw / -fill both -expand 1 /); > my @data = ( [ 'Received', 'Sent', 'Incomplete' ], [ 3,3,4 ], ); > my $bottomFrame = $mw->Frame( -label => 'Commands', > -borderwidth => 4, -relief => 'raised'); > my $quitButton = $bottomFrame->Button( -text => 'Quit', > -command => \&exitProgram); > my $infoPane = $bottomFrame->Label( -anchor =>'center', > -textvariable => \$message, -borderwidth => 2, -relief => 'groove'); > my $startStopButton = $bottomFrame->Button( -text => 'Start / Stop', > -command => \&randomizePatients); > $GraphFrame -> pack( -anchor => 'n', -side => > 'top', -fill => 'x'); > $bottomFrame -> pack( -anchor => 's', -side => > 'bottom', -fill => 'x'); > $quitButton -> pack( -anchor => 's', -side => > 'bottom', -fill => 'x'); > $infoPane -> pack( -anchor => 's', -side => > 'bottom', -fill => 'x'); > $startStopButton -> pack( -anchor => 's', -side => > 'bottom', -fill => 'x'); > #~ $chart->plot( \@data ); > MainLoop(); > sub randomizePatients(){ > $Received = rand(10); > $Sent = rand(10); > $Incomplete = rand(10); > $message = 'Received='.$Received.' | Sent='.${Sent}.' | > Incomplete='.${Incomplete}; > @data = ( [ 'Received', 'Sent', 'Incomplete' ], [$Received, > $Sent, $Incomplete], ); > > $chart->clearchart(); > $chart->plot(\@data); > $chart->redraw(); > > } > > The problem is that after refreshing the chart with new data, the > balloons are reporting always the first data when the chart was > created. > Is there any way to change this? > > Many thanks in advance > Regards > > Andrea Nugnes > andrea.nugnes@gmail.com
Dear, Thank you for using this module and for your reporting. It's a bug and it fixed for next released Tk::Chart 1.21 (maybe today). Best Regards, Djibel
Le Dim 23 Avr 2017 16:28:20, DJIBEL a écrit : Show quoted text
> Le Dim 23 Avr 2017 12:05:25, andrea.nugnes@gmail.com a écrit :
> > Dears > > > > I’ve a problem to make a refresh of the graphical chart > > I’m using Tk::Chart::Pie version 1.18 > > The Perl version I’m using is 5.24.1 on Mac OS X 10 El Capitan > > > > Here is my example: > > #!/usr/bin/perl > > use strict; > > use warnings; > > > > use Tk; > > use Tk::Chart::Pie; > > > > my $message; > > my $Received = 0; > > my $Sent = 0; > > my $Incomplete = 0; > > my $mw = MainWindow->new( -title => 'Patient Status', ); > > my $GraphFrame = $mw->Frame( -label => 'Graph', -borderwidth =>4, > > -relief => 'groove'); > > > > my $chart = $GraphFrame->Pie( > > -title => 'Patient Status Frame', > > -background => 'white', > > -linewidth => 2, > > )->pack(qw / -fill both -expand 1 /); > > my @data = ( [ 'Received', 'Sent', 'Incomplete' ], [ 3,3,4 ], ); > > my $bottomFrame = $mw->Frame( -label => 'Commands', > > -borderwidth => 4, -relief => 'raised'); > > my $quitButton = $bottomFrame->Button( -text => 'Quit', > > -command => \&exitProgram); > > my $infoPane = $bottomFrame->Label( -anchor =>'center', > > -textvariable => \$message, -borderwidth => 2, -relief => 'groove'); > > my $startStopButton = $bottomFrame->Button( -text => 'Start / Stop', > > -command => \&randomizePatients); > > $GraphFrame -> pack( -anchor => 'n', -side => > > 'top', -fill => 'x'); > > $bottomFrame -> pack( -anchor => 's', -side => > > 'bottom', -fill => 'x'); > > $quitButton -> pack( -anchor => 's', -side => > > 'bottom', -fill => 'x'); > > $infoPane -> pack( -anchor => 's', -side => > > 'bottom', -fill => 'x'); > > $startStopButton -> pack( -anchor => 's', -side => > > 'bottom', -fill => 'x'); > > #~ $chart->plot( \@data ); > > MainLoop(); > > sub randomizePatients(){ > > $Received = rand(10); > > $Sent = rand(10); > > $Incomplete = rand(10); > > $message = 'Received='.$Received.' | Sent='.${Sent}.' | > > Incomplete='.${Incomplete}; > > @data = ( [ 'Received', 'Sent', 'Incomplete' ], [$Received, > > $Sent, $Incomplete], ); > > > > $chart->clearchart(); > > $chart->plot(\@data); > > $chart->redraw(); > > > > } > > > > The problem is that after refreshing the chart with new data, the > > balloons are reporting always the first data when the chart was > > created. > > Is there any way to change this? > > > > Many thanks in advance > > Regards > > > > Andrea Nugnes > > andrea.nugnes@gmail.com
> > > Dear, > > Thank you for using this module and for your reporting. > It's a bug and it fixed for next released Tk::Chart 1.21 (maybe today). > > Best Regards, > > Djibel >
Bug fixed. Best regards !