Pre loader

Numeric Axis with negative value display issue ?

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

Hello,

I’m using v3.2 SciChart and cannot figure with this problem:

    <SciChart:SciChartSurface x:Name="sciChart">
        <!--  Create X Axis  -->
        <SciChart:SciChartSurface.XAxis>
            <SciChart:NumericAxis   AxisTitle="{Binding XAxisLabel}"   VisibleRange="-20, 50"/>
        </SciChart:SciChartSurface.XAxis>
        [...]
    <SciChart:SciChartSurface/>

It seems that negative values are not displayed correctly, it’s showing these data:
-2 -1 0 10 20 30 40 50

If I set textFormatting to “#.0”, it shows
-20, -10, ,0 10,0 20,0 30,0 40,0 50,0

It’s like negative sign is considerate as a digit.

  • You must to post comments
0
0

Hi there,

This sounds like a textformatting issue. If you check our Create a Basic Chart -> Digital Line Chart example and zoom out with mouse-wheel you will see it displays negative numbers and zero correctly (see the attached image).

In this example XAxis.TextFormatting is left to the default, which is “0.###”

If you try the same thing with the Line Chart example, the zero value dissappears. This is caused by the TextFormatting being “#.############”, which means if a value does not exist, don’t display it.

You can override Axis TextFormatting or control label output in finer detail with the LabelProvider feature.

Best regards
Andrew

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