I'm losing the ymin in a combination chart

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Laura Gilbert on 28th February 2013
I am trying to plot a bar and line chart (same data) on top of one another. The data range is 0-5, but I want to show the y sale 0-10. This works find when I plot the graphs one after the other. But when I combine them, it shows the y range as -10 to 10 (so the bottom half of the plot is empty). How do I force the combination chart to start at 0, not -(ymax)? If I remove the restrictions I have added on the yscale it still plots -5 to 5, not 0-5 which is the data range.

    var bar_one = new RGraph.Bar('bar_one', generallyone);
             bar_one.Set('hmargin', 1);
             bar_one.Set('xaxispos', 'center');
             bar_one.Set('gutter.bottom', 50);
             bar_one.Set('chart.labels', labels);
             bar_one.Set('chart.colors', one_col_list);
             var line_one = new RGraph.Line('bar_one', generallyone);
             line_one.Set('chart.colors', [one_col]);
             line_one.Set('linewidth', 1);
             line_one.Set('spline', true);
             line_one.Set('shadow', true);
             line_one.Set('shadow.offsetx', 0);
             line_one.Set('shadow.offsety', 0);
             line_one.Set('shadow.blur', 2);
             line_one.Set('xaxispos', 'center');
             combo_one = new RGraph.CombinedChart(bar_one, line_one);

Thanks for your help!
Posted by Laura Gilbert on 1st March 2013
...not to worry. Removing the ('xaxispos', 'center'); values fixes it. Seems obvious now.
Posted by RGraph support on 1st March 2013
Hi there,

Only obvious when you know how! :-)

Richard, RGraph Support

Add a reply

« Back to message list