Sign in to follow this  
jmarkus

Angular gauge using input data with coma (,) decimal separator

Recommended Posts

Hello,

 

I'm using angular gauge in a project that writes data values using coma as decimal separator:

 

 

 

dial value='40,2'

 

 

 

However, it seems the gauge only accepts data having dot as decimal separator and only this format seems to work:

 

 

 

dial value='40.2'

 

 

 

The problem is, this data is written by an external program that collects data and it's data output can't be changed from me. Is there a way to make angular gauge accept coma as decimal separator?

 

 

 

Thanks

Edited by Guest

Share this post


Link to post
Share on other sites

I already have these inserted in the main chart tag

 

 

 

chart bgAlpha="0,0" lowerLimit='0' upperLimit='1200' gaugeStartAngle='240' gaugeEndAngle='-60' gaugeOuterRadius='175' gaugeInnerRadius='70%' showValue='0' showToolTip='0' showGaugeBorder='1' gaugeBorderColor='FF0000' gaugeBorderThickness='2' gaugeBorderAlpha='100' showTickMarks='1' showTickValues='0' majorTMNumber='12' minorTMNumber='4' majorTMHeight='14' majorTMThickness='2' minorTMHeight='7' minorTMThickness='1' tickValueDistance='30' chartLeftMargin='20' chartRightMargin='20' chartTopMargin='20' chartBottomMargin='20' basefont='Verdana' baseFontSize='16' baseFontColor='000000' [b]decimalSeparator=',' thousandSeparator='.'[/b] pivotRadius='10'

 

 

 

but it seems that these attributes affect only how data is displayed in the numbers in that small legend just under the dial circle. If you try and put any values with a coma as decimal like this:

 

 

 

dial value='40,2'

 

 

 

you'll see that it doesn't work, the needle hangs at around 80% of gauge, like it does when you enter data in a format that's not numerical, for example:

 

 

 

dial value='ABCD'

Share this post


Link to post
Share on other sites

Hi,

Could you please send us the screenshot(s) of the error that you are receiving while you are rendering the Angular gauge and the one you intend to show, as an attachment?

Awaiting your reply.

Share this post


Link to post
Share on other sites

Here are the files I'm using, I left out the main application swf (which renamed gauge.swf and put inside folder gauge next to xmls) and the com folder with all libraries etc. You'll see the two xml files with the change in data input and a screenshot of how it behaves with each one. Thanks for your fast answer!

post-8573-128441584749_thumb.gif

tst.zip

Share this post


Link to post
Share on other sites

Hi,

Could you please try using the attribute inDecimalSeparator=',' in the <chart> element, in order to display comma in the XML?

Also, please try using using the atrribute decimalSeparator=',' in the <chart> element to display comma in the gauge, after it is rendered.

Ref.- <chart ... inDecimalSeparator=',' decimalSeparator=',' >

Hope this resolves your issue. :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this