SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


I’m trying to create a custom axis class, inheriting NumericAxis but the labels don’t show anymore. My code :

public class CustomAxis : NumericAxis {}

                                <core:CustomAxis DrawMinorGridLines="False" DrawMajorGridLines="False" AutoRange="False" Height="{Binding XAxisHeight, Mode=OneWay}" 
                                          VisibleRange="{Binding ParentViewModel.XVisibleRange, Mode=TwoWay}" VisibleRangeChanged="XAxis_OnVisibleRangeChanged">

The user should be able to change the label formatting, eg.: “3000ms” or “00:03:00”.
How can I dynamically change axis formatting ? The axis data type will always be double.

  • You must to post comments

Hi there,

IAxis has TextFormatting property, you can use C# formatting with it. Also there is LabelProvider property,
you can fully customize labels appearance using it. Please, take a look at Screenshots, XPS Printing, X-Axis Text Labels tutorial.

Please, let us know if this helps!

Best regards,

  • cdicu
    Inheriting ILabelProvider does the job, thanks for the fast response !
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.