SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
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.
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?
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.
Hope, this information will help.
Please login first to submit.