Distribution of x-lines when datasource is changed

I am populating the datasource depending on user input, and have a gui issue with the distribution of x-lines when the datasource is changed.

  1. The datasource holds a few items (4) and the values are distributed evenly on the x-axis.
  2. The datasource is changed to hold several more items, and the values are distributed evenly
  3. The datasource is changed to hold only a few items again (step 1), but now the values are not distributed evenly alon the x-axis
Image_1387_1733769650549

Image_5414_1733769663388

Image_2442_1733769673088

It seems to be caused by the conditional trendlines. If I remove that part from the chart, the issue is not present.

                <ChartSeries DataSource="@WeightData" Name="Vekt" Width="4" LegendShape="Syncfusion.Blazor.Charts.LegendShape.Circle" Fill="#2084FE" XName="Period" YName="Value" Type="ChartSeriesType.Spline">
                    <ChartMarker Visible="true" Height="10" Width="10"></ChartMarker>
                    @if (WeightData != null && WeightData.Count() > 1)
                    {
                        <ChartTrendlines>
                            <ChartTrendline Type="TrendlineTypes.Linear" EnableTooltip="false" Width="1" Name="Trend" Fill="orange">
                            </ChartTrendline>
                        </ChartTrendlines>
                    }
                </ChartSeries>

6 Replies 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team December 10, 2024 03:41 PM UTC

Hi Vandelay,


Greetings from Syncfusion.


We have considered your reported scenario as bug and logged a defect report for the issue “Chart axis range is not updated when using trendline”. This fix will be available in our weekly patch release which is scheduled to be rolled out on 24th December 2024. We appreciate your patience until then. You can keep track of the bug from the below feedback link.


Feedback Link : https://www.syncfusion.com/feedback/63857/chart-axis-range-is-not-updated-when-using-trendline


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Durga Gopalakrishnan.


Marked as answer

AV Art Vandelay December 10, 2024 04:17 PM UTC

Thank you for your prompt answer and solution.



CH ChloeRamirez December 11, 2024 11:16 AM UTC

Thanks for answering, you saved my day. I appreciate you.



DG Durga Gopalakrishnan Syncfusion Team December 11, 2024 12:00 PM UTC

Most welcome. We will include the fix as per mentioned timeline. We appreciate your patience until then.



DG Durga Gopalakrishnan Syncfusion Team December 24, 2024 10:50 AM UTC

Vandelay,


We are glad to announce that our v28.1.36 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.


Root Cause:

When updating the data for the series along with the trendline, the XMin and XMax values were not updated properly for the trendline series.


Fix:

Cleared previously calculated values for minimum and maximum, as well as points, when updating the data.


NuGet Package : https://www.nuget.org/packages/Syncfusion.Blazor.Charts/


Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/AxisRange-247015745.zip


Feedback : https://www.syncfusion.com/feedback/63857/chart-axis-range-is-not-updated-when-using-trendline


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.




AV Art Vandelay January 6, 2025 08:40 AM UTC

Works great!
Thanks!


Loader.
Up arrow icon