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!

0
0

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

public class CustomAxis : NumericAxis {}

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

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
0
0

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,
Yuriy

  • 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.