2

Based on the example from the SciChart SDK for Column Chart (2D Charts - Column Chart).

enter image description here

How do I display each "X" value on X axis; I.e. right now it is "0, 2, 4, 6 etc" But I need "0, 1, 2, 3, 4, 5 etc."

I played with https://www.scichart.com/documentation/v5.x/SciChart.Charting~SciChart.Charting.Visuals.Axes.AxisCore_members.html and with the custom NumericLabelProvider but didn't find how to make this.

Dr. Andrew Burnett-Thompson
  • 20,980
  • 8
  • 88
  • 178
BayE
  • 75
  • 2
  • 6

1 Answers1

1

In order to display an XAxis label at every value in SciChart you need to use the following technique.

From Axis Ticks - MajorDelta, MinorDelta and AutoTicks

In SciChart, the ticks are small marks around the chart on an axis. They Also define the spacing of Gridlines, Axis Labels and Axis Bands.

enter image description here

...

Setting MajorDelta, MinorDelta Manually When AxisBase.AutoTicks = False

To disable automatic MajorDelta and MinorDelta calculation you should set AutoTicks = false. In this mode, SciChart requires that the developer sets the AxisBase.MajorDelta and AxisBase.MinorDelta, which will define how many tick intervals are calculated. These are absolute values and should be defined as follows:

<s:NumericAxis AutoTicks="False" MajorDelta="1" MinorDelta="0.2"/>

Setting MajorDelta = 1 and AutoTicks = false will ensure that major gridlines and labels fall at each individual value.

Setting minor delta = 0.2 will ensure you get five minor gridlines per major gridline.

Dr. Andrew Burnett-Thompson
  • 20,980
  • 8
  • 88
  • 178