Pre loader

YAxis Label value custom

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies