We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Data Labels not being updated in Charts

Hi all,

I have a code that reads the file attached and changes the data of the chart. Although the numbers are being updated correctly, the Data Labels are not. Note that the Data Labels make reference to a Cell Range in the data sheet.

Are you able to help?

Thanks.

                var stream = new MemoryStream();

                using (WordDocument document = new WordDocument(stream, FormatType.Docx))

                {

                    WChart chart = GetChart(document.ChildEntities);


                    chart.ChartData.SetValue(3, 2, 4);

                    chart.ChartData.SetValue(4, 2, 2);


                    chart.ChartData.SetValue(3, 3, "Test YYY");

                    chart.ChartData.SetValue(4, 3, "Test ZZZ");


                    // Refreshes chart data to set the modified values

                    chart.Refresh();


                    using (FileStream outputFileStream = new FileStream("Result.docx", FileMode.Create, FileAccess.ReadWrite))

                    {

                        // Saves the Word document to file stream.

                        document.Save(outputFileStream, FormatType.Docx);

                    }


                    document.Close();

                }

            }


Attachment: Shared.NotCalculated_8f628c1f.zip

7 Replies

DC Dominique Carr November 14, 2022 12:41 PM

Hello,

I'm just following up on this, does anyone from support can have a look into this?


Cheers



SB Suriya Balamurugan Syncfusion Team November 15, 2022 10:31 AM

We have confirmed that the reported issue with “Data labels are not updated properly when modified the chart data value” is a defect and we have logged a defect report. We will include the fix for this defect in our weekly NuGet release, which is estimated to be available on two weeks. We will let you know once the fix is included in the weekly release.

The status of this bug can be tracked through the below link:
https://www.syncfusion.com/feedback/39111/data-labels-are-not-updated-properly-when-modified-the-chart-data-value

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.



DC Dominique Carr November 18, 2022 09:31 AM

Hi Suriya,

Thanks for investigating and reporting the bug to be fixed. Could you also look into the scenario below? The issues might be related.

When the source of values and labels for the charts are a calculated cell, the chart is not refreshed once the source cell changes. The source cell might not triggering a cascade event to update the calculated cell.

I have attached a version of the above spreadsheet with calculated values.

Would you be able to check this scenario too please?

Thanks a mil,

Joao


Attachment: Shared.Calculated_15e8096c.zip



SB Suriya Balamurugan Syncfusion Team November 22, 2022 09:38 AM

We have confirmed that the reported issue with “Chart data is not updated properly for the cells containing formula” is a defect and we have logged a defect report. We will include the fix for this defect in our weekly NuGet release, which is estimated to be available on two weeks. We will let you know once the fix is included in the weekly release.

The status of this bug can be tracked through the below link:
https://www.syncfusion.com/feedback/39275/chart-data-is-not-updated-properly-for-the-cells-containing-formula

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.



SB Suriya Balamurugan Syncfusion Team November 29, 2022 09:32 AM

Regarding - Shared.NotCalculated.docx - Data labels are not updated properly when modified the chart data value
As promised earlier, we have included the fix for the reported issue with “Data labels are not updated properly when modified the chart data value” in our latest weekly NuGet release (v20.3.0.59).

Please use the below link to download our latest weekly NuGet:
https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core/20.3.0.59

The status of this bug task can be tracked through the below link:
https://www.syncfusion.com/feedback/39111/data-labels-are-not-updated-properly-while-changing-the-chart-data-values

Note: We will include this fix in our 2022 Volume 4 Main release which will be available in end of December 2022.



DC Dominique Carr November 30, 2022 09:42 AM

Hi Suriya,

Thanks for getting back to us on this, that's great news.

Do you know if the issue "Chart data is not updated properly for the cells containing formula" is also going to be delivered in this release?
https://www.syncfusion.com/feedback/39275/chart-data-is-not-updated-properly-for-the-cells-containing-formula

Thanks a mil



SB Suriya Balamurugan Syncfusion Team December 1, 2022 07:28 AM

Regarding - Chart data is not updated properly for the cells containing formula
We will include the fix for this defect in our next weekly NuGet release, which is estimated to be available on 6th December 2022.

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.


Loader.
Live Chat Icon For mobile
Up arrow icon