SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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

Hi, I want to make the YAxis show only certain label (max, min, or others) only like the attached image. I want to ask if it is possible to show axis value unevenly. Thanks!

Version
v2.0.0
Images
  • may lym
    I just find the way to custom major ticks in the TickProvider updatetick method, but the labels if overlap sometime, is there anyway to modify the culling of label. I tried the updateCullingPriorities method, but the meaning of cullingPriorities is not sure, so nothing happen after the modification. Is there any example for this? Thanks!
  • You must to post comments
0
1

Hi May Lym

As you already know you can alter tick positions by creating custom TickProvider. You just need to override updateTicks() and set desired major and minor ticks values.


Regarding your question about culling priorities provided by TickProvider – these values used internally to provide nice looking labels in case if there are too many labels to draw on axis. The algorithm which we use divides tick labels into groups based on their culling priorities ( for first major tick from majorTicks array we take priority which is equal to first element from cullingPriorities array and so on). We try to place tick labels from group with the highest priority at first, then we use group with lower priority and so on. In case if any tick label in group intersects with one of already placed labels from group with higher priority then this group and all other groups which have lower priority will be skipped and won’t be drawn on axis.

In case if you create custom TickProvider you can override our default culling algorithm and provide your own culling priorities which allows to tell axis renderer which major ticks should have higher priority when drawing axis and which could be culled in case if there is not enough space to draw them without overlapping with other labels. The rule of thumb in this case – label with higher priority has more chances to be drawn by axis renderer than label with lower priority.

Also you can disable culling at all and in this case all tick labels will be drawn even if they overlap with each other:

 final IAxis axis = sciChartBuilder.newNumericAxis().withIsLabelCullingEnabled(false).build();

Hope that this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.