Getting decimals to appear on the Y axis

Share RGraph:  

« 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 sudarshan Reddy on 15th December 2016
Hi Richard

I am drawing y-axis for line chart if the max value is <1 and >2 i.e in b/w 1.0 to 1.9 or may be 1.001 to 1.009 ...
the y-axis picking the max value as 1 only it's drawing three ones and three zeros may be i.e indication of 0.2,0.6,0.8,1,1.2,1.6 like that i think so i need the accurate value at least two decimals after the point i gone through the library i couldn't find the where your picking the max value so can you tell me the line number i am drawing the my own measure y-axis
Posted by Richard on 15th December 2016
Hi there,

You can set the scaleDecimals option to 2:

...
scaleDecimals: 2,
...




Richard
Posted by sudarshan on 16th December 2016
how can i add the bar value above the bar with example plz
Posted by Richard on 16th December 2016
Hi there,

For that you can use the labelsAbove option (set it to true). The options for it are detailed in the docs:

www.rgraph.net/canvas/docs/bar.html#properties


Richard
Posted by sudarshan on 19th December 2016
Hi Rechard,
I am drawing bar& line charts with large no values approx 1000 here i am facing one issue it's very hard to find or pick three values among the 1000 values for that i need sorting or filtering option is there any such option please let me know and or find alternate solution for that

Thanks.
Posted by Richard on 19th December 2016
Hi there,

RGraph doesn't do any filtering for you - you'd need to build that into your page. To get a wider canvas though you could try something like this:

www.rgraph.net/demos/line-static-yaxis.html

Using this technique you could have a 5000px wide canvas that only takes up 750px on the page.




Richard
Posted by Sudarshan on 10th January 2017
Hi Rechard,

     I am drawing line and bar charts everything is fine with r.graph but i need some more i.e if we take an example of bar chart or line chart. if the data is high at a certain point, data is low at some other points i want send report these two to user so i want to draw a custom circle or custom arrow indication or whatever but i need to indicate the both higher in data and lower in data points. for that i need to draw a custom line on canvas i tried with context menu but it's not working fine is there any other solution please let me know with example.





Thanks&Regards
  Sudarshan
 
Posted by Richard on 10th January 2017
Hi there,

Something like this:

www.rgraph.net/fiddle/view.html/bar-chart-with-a-custom-drawn-line

???

The line and the text are drawn in the ondraw event as it is there.



Richard
Posted by Sudarshan on 12th January 2017
Hi rechard,



Special thanks for quick reply. I am facing another issue with the charts i.e in my data i have negative values and positive values for the negative values it's showing the popup error it's not good to maintain the negative values in the data how can i solve the problem i am drawing 7 charts like bar, h-bar,s-bar,line,scatter,bubble,mixed charts all the charts are showing the same error how can i solve that problem.
Posted by Richard on 12th January 2017
Hi there,

"it's not good to maintain the negative values in the data"

That's not an RGraph error. There's a similar one though that relates to the axes - so try adding this to your configuration:
// ...
xaxispos: 'center',
// ...


Richard
Posted by Sudarshan on 18th January 2017
Hi


how to draw a horizontal stacked bar chart i found this link

www.rgraph.net/canvas/examples/hbar-stacked.html

i need code of this link
Posted by Richard on 18th January 2017
Hi there,

You can view the source in your browser to see the source code of the page. Or all of the demos for the HBar are here:

www.rgraph.net/demos/index.html#hbar


Richard
Posted by Sudarshan on 19th January 2017
Hi Richard,

i am drawing svg bar charts earlier i draw bar chart with canvas coming to the svg charts tooltips are not showing when click on the bar chart and i need to know the advantages compared to the canvas charts.so for i will plan according to move svg or maintain canvas charts only


Posted by Richard on 19th January 2017
Hi there,

1. Check the JavaScript console for any error messages, ensure that you've included all of the correct libraries.

2. There's no pressing reason to convert from canvas charts to SVG charts if all of your canvas charts are working. You can read about the differences if you Google

SVG vs canvas




Richard

Add a reply




« Back to message list