SOLVED! The trick to getting the diagonal line was to specify which data set it is in the chd parm. chd=e4: tells Google that the 5th set (0-4, 4=5th set) is not part of the stacked bar data. Then chm=D, specify set 4 contains the line data.
http://chart.apis.google.com/chart? chs=600x500 &cht=bvs &chco=000000,FF0000,00FF00,0000FF,00000000 &chbh=a &chxt=x,y &chdl=Sales|Contract%20Inv|Demand|Non-Contract%20Inv &chtt=Sales+vs+forecast,+3/2004+in+millions &chxr=1,0,22 &chl=1|2|3|4|5|8|9|10|11|12|15|16|17|18|19|22|23|24|25|26|29|30|31 &chd=e4:BmD0FIH7JvM0PYRjTzVmZFcDdGfynWljprrltuvfy3074N,AKAYAgAyA- BSBiBwB-CKCgCzC6DLD7DwEKEWEkEvFFFSFn,rvp9o6mrlOiwgte-dKbvY8WkVvTlNiO- LqKJIbHBEUCrAD,ABACADAFAGAIAJALAMANAQARASAUAZAYAaAbAdAeAgAhAj,CcE5HVJyMOOrRITkWBYda6dWfziQksnJplsCuew7zY104R &chm=D,0033FF88,4,0,5,1|h,FF000088,0,.8794,3,1 --Loyd On Jan 26, 8:34 am, Loyd <[email protected]> wrote: > Thank you for the information on the CHM parameter. I wish the chart > API had documentation in a reference format, showing all the chm > parameter descriptions in one place. I saw the first chm description > for mixed bar and line charts, but did not read to the extra > descriptions for horizontal line. > > I have another issue with the bars. The horizontal bar is perfect and > only needed color transparency and adjustment to the proper Y value. > > However, the second (diagonal) line I want to follow an "invisible" > data set. For the following graph, it should graph a line for data set > 4. In short, it should graph a line from Cs to 95 (extended coding). > Shown below, data set 4 is part of the stacked bar graph, when I want > it to be a separate entity (should start at the base instead of the > next stack). The blue diagonal line should start at the bottom of the > chart. > > http://chart.apis.google.com/chart? > chs=600x500 > &cht=bvs > &chco=000000,FF0000,00FF00,0000FF,00000000 > &chbh=a > &chxt=x,y > &chdl=Sales|Contract%20Inv|Demand|Non-Contract%20Inv > &chtt=Sales+vs+forecast,+3/2004+in+millions > &chxr=1,0,20 > &chl=1|2|3|4|5|8|9|10|11|12|15|16|17|18|19|22|23|24|25|26|29|30|31 > &chd=e:BwENFpItKtOGQ7TTVyXwbme3gAi- > rSpUt2v8yT0P386N90,ALAaAkA3BEBaBsB7CLCYCwDFDMDfEVEIElEyFBFOFmF0GL,v7tusbprn4k0iSgId6cIYrVvUtSCKjMVIQGXEPCf______,ABACADAFAGAJAKAMANAPARATAUAWAbAaAdAeAgAhAjAlAn,CsFYIEKwNdQJS1VhYOa6dmgSi.lroXrDtvwczI104g7N95 > &chm=D,0033FF88,4,0,5,1|h,FF000088,0,.9674,3,1 > > Thanks, > Loyd > > On Jan 24, 9:48 am, mickaxl <[email protected]> wrote: > > > Not sure if this is exactly what you need but add this to your chart > > > &chm=D,0033FF,1,0,5,1|h,FF0000,0,0.8,4,1 > > > the first (D,0033FF,1,0,5,1) gives a blue line following the trail of > > your data bottom left to top right and the second (h,FF0000,0,0.8,4,1) > > gives a red line across the top of the data. Two issues seem to be > > that first you have to manually adjust the horizontal line (shape > > marker) position until uoi get it where you want it to be and second > > the null values in your data cause a break in the blue line every now > > and then. > > > Broader issue is that chm is used for a number of different types of > > things in the API which can lead to uncertain results especially if > > you code it as &chm=........&chm=....... but if you put them together > > as one chm parameter as the above then it often resolves correctly. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Chart API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-chart-api?hl=en -~----------~----~----~----~------~----~------~--~---
