Pre loader

How to display first and last value of the 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

Answered
2
0

Hi!

I want SciChart to display always the first and last value of an axis. I created a chart wich shows volume on the y-axis and time in seconds on the y-axis. The axis are initialized in the view model with fixed axis dimensions like this:

this.TimeAxis = new NumericAxis();
this.TimeAxis.VisibleRange.SetMinMax(0, 60);
this.TimeAxis.AxisTitle = "Time [s]";
((AxisBase)this.TimeAxis).Style =        (Style)Application.Current.FindResource("DefaultSciChartAxisStyle");

this.VolumeAxis = new NumericAxis();
this.VolumeAxis.VisibleRange.SetMinMax(0, 8);
this.VolumeAxis.AxisTitle = "Volume [l]";
this.VolumeAxis.AxisAlignment = AxisAlignment.Left;
((AxisBase)this.VolumeAxis).Style = (Style)Application.Current.FindResource("DefaultSciChartAxisStyle");

How is it possible to display the first and last value of the axis as shown with red numbers in the attached example.png which are not shown by default?

Best regards,
Joerg

Images
  • You must to post comments
Best Answer
4
0

Hello Joerg,

As part of SciChart v3.0 all axis types now show labels at VisibleRange.Max and Min, so long as VisibleRange.Max, Min fall at ‘nice’ values, e.g. 1.0, 1.5, 2.0, 2.5 etc… By default the chart will choose these nice values when first showing or autoranging.

When you scroll however, the labels scroll too – you lose the labels at the edges of the axis. In this case you might want to use our new StaticAxis Feature, which fixes axis labels at fixed intervals and updates the label value instead.

Best regards,
Yuriy

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