When chart data source is updated to fewer points, empty columns remain (StackedColumn chart)

When updating the data source of a StackedColumn chart to a List with fewer data points, it does not remove the points on the x-axis, but leaves them with 0 value.

I tried to reproduce it with your StackedColumnChartData example, and was able to do so (e.g. assign a new list to the data source variable, but with one fewer element in the list). Unfortunately, it did not happen consistently, so I cannot supply code to reproduce consistently.

In the attached screenshot, the data source has just been updated from a list with 20 elements to a list with 10 elements.

Is this a known issue?


Best regards, Niels


Attachment: StackedColumn_Chart_ExtraDataPoints_6fe959f8.zip


8 Replies 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team February 23, 2022 03:07 PM UTC

Hi Niels, 

Greetings from Syncfusion. 

We have ensured your reported scenario with attached image. We have updated the data for chart series with fewer data points than initial data points. The stacked column chart is updated properly as per behavior. We have attached the tested sample for your reference.  

Before Update  
 
 

After Update  

 


Kindly revert us if you have any concerns. 

Regards, 
Durga G 



ND Niels Døssing replied to Durga Gopalakrishnan February 25, 2022 03:15 PM UTC

Hi Durga,

Thank you for your code example.

I have now been able to adapt your example to something that fails consistently. It becomes clear that it is the x-axis that does not update, while the rest of the graph does. The difference is that it runs in an asynchronous context, where the task update takes time (in my project code it fetches data via an API).

In the example, the problem can be solved by removing the 'await' before the call to RefreshAsync, but unfortunately this does not work in my project code - it fails with and without 'await' (displaying the old x-axis with empty columns).

I would be very grateful if you could help me determining if this is a bug, and/or perhaps suggest a solution.

Below is the updated data change code (I also attached the entire page code, but the rest is not changed).

Regards, Niels

public async Task ChangeData()
{
awaitHeavyDataUpdate();

// Original
//chartObj.RefreshAsync();

await chartObj.RefreshAsync();
}

publicasyncTaskHeavyDataUpdate()
{
// Corresponds to a data fetch through API
awaitTask.Delay(200);

this.Sales=newList
{
newSalesInfo{Month="Jul",SalesValue1=15,SalesValue2=20},
newSalesInfo{Month="Aug",SalesValue1=38,SalesValue2=26},
newSalesInfo{Month="Sep",SalesValue1=24,SalesValue2=18},
newSalesInfo{Month="Oct",SalesValue1=12,SalesValue2=32}
};
}


Attachment: Index_b5992086.zip



SB Swetha Babu Syncfusion Team February 28, 2022 01:37 PM UTC

Hi Niels, 

Greetings from Syncfusion. 

We have considered the reported scenario as a defect and logged the defect report for the same. However, we will include the fix for the reported issue in our weekly patch release which is scheduled on 8th March, 2022. Please find the below feedback link to keep track of the reported issue. 


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.  

Regards, 
Swetha


DG Durga Gopalakrishnan Syncfusion Team March 8, 2022 09:22 PM UTC

Hi Niels,


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


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


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.


Regards,

Durga G



ND Niels Døssing March 11, 2022 03:33 PM UTC

Hi Durga

Unfortunate the patch does not fix the problem. Please find attached a sample which reproduces the error using the patched version.

Best regards,

Niels


Attachment: SyncFusionStackedColumnChartSample_555ed21c.zip


DG Durga Gopalakrishnan Syncfusion Team March 14, 2022 12:49 PM UTC

Hi Niels, 

Sorry for the inconvenience caused. We will resolve this case and update the fix in our upcoming weekly patch release which is scheduled to be rolled out on 5th April 2022. We appreciate your patience until then. 

Regards, 
Durga G. 



DG Durga Gopalakrishnan Syncfusion Team April 6, 2022 11:37 AM UTC

Hi Niels,


Thanks for being patience. We have fixed the reported issue and generated custom nuget with fixed changes. We request you to ensure your application by installing this custom nuget. This fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on 12th April 2022. We appreciate your patience until then.


Custom NuGet : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Syncfusion.Blazor.Charts.20.1.0.481373772923.zip


Kindly revert us if you have any concerns.


Regards,

Durga Gopalakrishnan.



DG Durga Gopalakrishnan Syncfusion Team April 12, 2022 03:33 PM UTC

Hi Niels,


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


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


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.


Regards,

Durga Gopalakrishnan.


Marked as answer
Loader.
Up arrow icon