Pre loader

Custom Axis

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

Try SciChart Today

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

Start TrialCase Studies