SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.