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

yAxis.textFormatting = “%f”
First image file is the result of this code.

yAxis.textFormatting = “0.00000000”
Second image file is the result of this code.

First code doesn’t work, even it is just a sample code in document.
Second code works, but I want flexible trailing zeros.
How can I do?

Version
2.2.1.2265
Images
  • You must to post comments
2
0

Hello, Minsub Kim.
Thank you for your interest in SciChart.

In the first case, formatting is not fully correct. And the second case works as expected.
Let me explain, in more details:
‘textFormatting’ property is used by NSNumberFormatter object under the hood, and NSNumberFormatter – accepts format patterns based on Unicode Technical Standard #35.
So ‘0’ symbol in number format string means, that digit will be always displayed (odd zero in case if actual digit is absent). If you want flexible trailing zeros use ‘#’ symbol instead of ‘0’. For example ‘0.0##’ format will convert 2.3345 number to 12.334, and 1.2 number will be displayed as is.

If you want to build more advanced formats – here is a link to Unicode Technical Standard #35 and NSNumberFormatter documentation.

Hope, this information will help.
Best Regards,
Andriy.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.