Pre loader

LabelTextFormatting issue with regional settings and Digit group

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Dear all,
I need to display an annotation label based on regional settings, especially grouping separator.

The annotation is define as below :

<s:HorizontalLineAnnotation x:Name="_threshold" HorizontalAlignment="Stretch"
                                        LabelPlacement="Axis" 
                                        ShowLabel="True"
                                        Y1="{Binding LiveThreshold,Mode=TwoWay}" 
                                        />

If I check the row value LiveThreshold it is properly formatting according to regional setting and if we display it in another windows control through binding all is ok ans seen as 1,234 (“,” as grouping separator).

But when we apply that value to Y1 to the Annotation above, the result I get is a value which is not using the format of the value it self but overwrite it and for instance Grouping digit separator is completely ignore from regional seetings and display as : 1234

Q1 : Why the Annotation is not using the actually formatted string that I am delivering ?

I have try to add the LabelTextFormatting =”n” property. If I am in English Us in regional settings, then it display correctly then the Digit grouping as 1,234 .

But if I switch for instance to French in regional settings, then there is no digital grouping in French formatting so return data should be 1234. Instead I have an exception of “Input string is not a valid format” , which is wrong because the raw data value is correctly formed.

Q2 : Why adding the LabelTextFormatting =”n” crash in other language than US where digital grouping is different than “,” ?

Does anyone have met this case ?

Thanks for tips if any

Version
4
  • You must to post comments
0
0

You bind LiveThreshold property to Y1 which should be the value of your axis => double, datetime, index(int), timespan
LabelTextFormatting uses for formatting annotation label, not an annotation coordinates.

  • sc sc
    Hello, thnaks for your reply. Based on your answer, LiveThreashold is a double value whcih we set from code in order to display the annotation at a certain position. What we are looking at is how to set the LaBelTextFormat property in order that it follows the formatting of the regionnal setting whenever if I am in French or English for instance. What should be the format then of LabelTextFormat ? Have try to set this proeprty as “N0” ( as I have read it respect .Net formatint string but that does not work Thnks for help regards
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies