Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^6: GD::Graph creating a clustered bar chart while some dataset are cumulative

by poj (Priest)
on Aug 29, 2013 at 13:13 UTC ( #1051432=note: print w/ replies, xml ) Need Help??


in reply to Re^5: GD::Graph creating a clustered bar chart while some dataset are cumulative
in thread GD::Graph creating a clustered bar chart while some dataset are cumulative

Use undef in place of zero in your data

my @data = ( ['Mon','-','Tues','-','Wed','-'], [10,undef,40,undef,80,undef], [30,undef,50,undef,90,undef], [undef,100,undef,60,undef,30], [undef,60,undef,70,undef,50], );
poj


Comment on Re^6: GD::Graph creating a clustered bar chart while some dataset are cumulative
Download Code
Re^7: GD::Graph creating a clustered bar chart while some dataset are cumulative
by huzefa52 (Novice) on Sep 11, 2013 at 09:29 UTC
    Hi Poj, that works for me, thanks. Now, I want 1 more graph with 3 stack bars. I have tried this by providing data in below format but its not working. Can u please help
    my @data = ( ['Mar1','Mar2','Mar3','Apr1','Apr2','Apr3','May1','May2','May3], [1,0,2,0,4,0], [2,0,1,0,5,0], [0,3,0,3,0,6], [0,4,0,4,0,7], [3,0,4,0,5,0], [0,0,0,0,0,0], );
      You need 9 data points, try
      my @data = ( ['Mar1','Mar2','Mar3','Apr1','Apr2','Apr3','May1','May2','May3], [1,0,0,2,0,0,4,0,0], [2,0,0,1,0,0,5,0,0], [0,3,0,0,4,0,0,6,0], [0,4,0,0,3,0,0,7,0], [0,0,5,0,0,6,0,0,1], [0,0,6,0,0,5,0,0,2], );
      poj
        Thanks a lot...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1051432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-08-22 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (144 votes), past polls