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

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.