StepAreaSeries is ignoring Minimum value of NumericalAxis

I have a chart that maps Y values between -100 and -10. If I use a LineSeries everything charts as expected. When I use a StepAreaSeries it appears to attempt to draw the X-axis minimum at 0, which is off the top of the chart. How do I get the StepAreaSeries to use the correct X-axis minimum of -100 to fill the StepAreaSeries to the bottom of the chart instead of drawing the area to the top of the chart? Thanks!


And here is the xaml:

            <syncfusion:SfChart Palette="GreenChrome">

                <syncfusion:SfChart.Header>

                    <TextBlock Text="Signal and Noise" Style="{DynamicResource _graphHeaderText}"/>

                </syncfusion:SfChart.Header>

                <syncfusion:SfChart.PrimaryAxis>

                    <syncfusion:DateTimeAxis Style="{DynamicResource _dateTimeAxisStyle}"

                                             Maximum="{Binding ItsChartMaxTime}"

                                             Minimum="{Binding ItsChartMinTime}" />

                </syncfusion:SfChart.PrimaryAxis>

                <syncfusion:SfChart.SecondaryAxis >

                    <syncfusion:NumericalAxis Style="{DynamicResource _numericalAxisStyle}"

                                              Minimum="-100" Maximum="-10"/>

                </syncfusion:SfChart.SecondaryAxis>

                <syncfusion:StepAreaSeries ItemsSource="{Binding ItsTimeSegmentCollection}"

                                            StrokeThickness="1"

                                                 XBindingPath="ItsTimestamp"

                                                 YBindingPath="ItsRssi" />

                <syncfusion:StepAreaSeries ItemsSource="{Binding ItsTimeSegmentCollection}"

                                                 StrokeThickness="1"

                                                 XBindingPath="ItsTimestamp"

                                                 YBindingPath="ItsNoise" />

            </syncfusion:SfChart>



3 Replies

DD Devakumar Dhanapoosanam Syncfusion Team February 7, 2022 07:56 AM UTC

Hi Ryan Woodings, 
 
We have analyzed your query and achieved your requirement by using the Origin property of the chart axis as per the below code example. Also attached the sample for your reference
 
<chart:SfChart x:Name="chart"> 
    <chart:SfChart.PrimaryAxis> 
        <chart:DateTimeAxis Origin="-100"/> 
    </chart:SfChart.PrimaryAxis> 
 
    <chart:SfChart.SecondaryAxis> 
        <chart:NumericalAxis Minimum="-100" Maximum="-10"/> 
    </chart:SfChart.SecondaryAxis> 
     
    <chart:StepAreaSeries ItemsSource="{Binding Data}"  
                               XBindingPath="XValue" YBindingPath="YValue"/> 
</chart:SfChart> 
 
 
Output: 
 
 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Devakumar D 



RW Ryan Woodings February 7, 2022 05:52 PM UTC

That worked perfect; thanks!



DD Devakumar Dhanapoosanam Syncfusion Team February 8, 2022 07:38 AM UTC

Hi Ryan Woodings, 
 
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
 
Regards, 
Devakumar D 


Loader.
Up arrow icon