Meter graph - scaleThousand not working


« 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 Othmar on 23rd December 2016
Hi Richard

At the meter graph the property value scaleThousand (like manual) is not working.
I can only set a dot instead of comma. But i wand to use no thousand seperator.
scaleThousand: ''
Works fine for all other gauges. (Semicircular, gauge...)

Also the redraw of the colorRanges like here : www.rgraph.net/forum/message.html/how-to-set-meter-chart-color-ranges-at-runtime-according-data-values-20161130105954.html is not working. Look at your demo (www.rgraph.net/fiddle/view.html/a-meter-chart-with-color-ranges-2) - there are no colors.

I use the actual version 4.59.

Have a Merry Christmas - Thank you for all your great work!

Posted by Richard on 23rd December 2016
Hi there,

It appears to be working correctly:

www.rgraph.net/fiddle/view.html/a-meter-chart-with-color-ranges-2




Richard
Posted by Othmar on 23rd December 2016
Hi Richard

Thanks for replay.
1.) T (as your demo) as seperator is working, but i want to have no seperator --> 1000 instead 1,000 --> scaleThousand: '' is not working like all other graphics.
2.) colorsRanges are not working for redraw (AJAX) like your Post: www.rgraph.net/forum/message.html/how-to-set-meter-chart-color-ranges-at-runtime-according-data-values-20161130105954.html . If you use graph[id].set

My code:
graph[id].set({textSize: font_size ,
                               needleRadius: n_radius ,
                               gutterBottom: gutter_bot ,
                               segmentRadiusStart: s_radius,
                               });
RGraph.Redraw();

This is only affected if the graphic was redrawn. The first draw is ok.
Posted by Richard on 23rd December 2016
Hi there,

1. For no thousand separator at all you can use a formatter function:

...
scaleFormatter: function (obj, num){return num;},
...


2. The chart is now only being redrawn in the AJAX callback - and the colors are working. Are you setting the .colorsParsed object variable to false before you redraw? Try using solid colors (not gradients).




Richard
Posted by Othmar on 23rd December 2016
Hi Richard

Have tested it now : jsfiddle.net/zotkLzbe/2/

1.) little complicated but working :-)
2.) Gradient not working. What do you mean with .colorsParsed Variable? Can you update my fiddle?

Thank you -
Othmar
Posted by Richard on 23rd December 2016
Hi there,

The example is here:

dev.rgraph.net/tests/meter-ranges.html

The line:

meter.colorsParsed = false;

Is used so the gradients are parsed for gradients again. You need this if you're changing the colors via AJAX.



Richard
Posted by Othmar on 24th December 2016
Hi Richard

Sorry - but your demo need a user and password.

Merry Christmas
Othmar
Posted by Richard on 24th December 2016
Hi there,

Try this:

www.rgraph.net/tests/meter-ranges.html




Richard

Add a reply

 




« Back to message list
RGraph on social media