Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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
Replies are listed 'Oldest First'.
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 drinking their drinks and smoking their pipes about the Monastery: (15)
As of 2015-07-07 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls