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!
- may lym asked 7 years ago
- 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 login to post comments
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
- Yura Khariton answered 7 years ago
- last edited 7 years ago
- You must login to post comments
Please login first to submit.