Min and Max value on X axis in Line 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 Chirag on 13th February 2013
Hello,

I wanted to set Min and Max of the scale on X-Axis in Line Chart. Currently its showing the category values which I am supplying in form of array and displaying in form of labels.

But I want to display the number line and with increment value based on min and max values on X-Axis and points on it will be plotted from the array holding category values.

Thanks,
Chirag Vidani
Posted by RGraph support on 13th February 2013
Hi,

The Line chart has no X scale. If you need an X scale you need to use the Scatter chart. With this you can set the chart.xmax and, optionally, the chart.xmin options.

Richard, RGraph Support

1 Year Premium Support now reduced to £299:
   www.rgraph.net/support
Posted by Chirag on 14th February 2013
Thanks for your quick reply. We thought about using scatter chart but the problem is: in this chart, we can't show custom tooltip. one of our requirement is to show custom tooltip (as another database field) on hover of the dots plotted in the chart.

we are using following code for line chart:
var line = new RGraph.Line(canvasId, chartValues.CielabB);
line.Set('chart.labels', chartValues.CielabA);
line.Set('chart.tooltips', chartValues.Density);
line.Set('chart.tickmarks', 'circle');

now, if we use scatter chart, we can't use Density field to show tooltip.

Waiting for your reply.

Thanks,
Chirag Vidani
Posted by RGraph support on 14th February 2013
Hi,

The Scatter chart tooltips are simply supplied in a different format - as part of the data. Like this:

[[x, y, color, tooltip], [x, y, color, tooltip] ...]


Richard, RGraph Support

1 Year Premium Support now reduced to £299:
   www.rgraph.net/support

Add a reply

 




« Back to message list
RGraph on social media