SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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.
I have successfully added text labels to my charts using ILabelProvider.
However, some of the charts are showing duplicate labels for each bar, and others are not showing the labels for all bars (even though there is space to do so).
Any idea how to fix these? See the attached images for more details.
Thanks in advance.
This occurs because of two reasons:
SciChart decides on the spacing of ‘ticks’ (Gridlines, labels) depending on your VisibleRange, Size of the Chart and Axis Type. You can learn about this here.
SciChart culls labels which overlap each other by default. This can be disabled by setting the AxisBase.IsLabelCullingEnabled property to false.
Regarding duplicate labels:
It is very likely that this is because of a mixture of (1) above and your own Labelprovider algorithm. For instance, if the Axis decides to create ticks at 1, 1.2, 1.4, 1.6, 1.8, 2.0 and you use a LabelProvider to convert the axis value to integer and choose a label, then you are going to get LabelA, LabelA, LabelA, LabelA, LabelB as a result.
What I would suggest is to use a combination of setting axis tick frequency.
Some useful documentation:
let me know if this helps!
Please login first to submit.