Miscellaneous questions and issues for DataLabels on DocIO charts

We've started using data labels as annotations on our charts, and generally it seems to be working reasonably well. We do have a few questions, though, and things that we can't seem to get to work.

  1. Word has an option for formatting data labels as callouts (Add Chart Element -> Data Labels -> Data Callouts). Is there any way to get this in the DocIO API?
  2. We can't seem to change the font size of the label. We're trying to set it with "series.DataPoints.DefaultDataPoint.DataLabels.Size = 20;" but there doesn't seem to be any effect.
  3. We can set the background for the label, but not with any transparency. We're using "series.DataPoints.DefaultDataPoint.DataLabels.FrameFormat.Interior.ForegroundColor = Color.FromArgb(0x40, Color.Blue);". Is this a bug, or an issue with Word?
  4. We can set the border of the data label fine, but we'd like to to be able to adjust the margin around the text, like Word allows. Is there any way to do this?
  5. Similarly, we'd like to add more space between the series marker and the label. There seems to be layout properties in the DataLabels and FrameFormat properties, but we haven't had any luck.

These are all relatively minor things, but it would be good to clean up the aesthetics a bit if we can.

Thanks,
J.

4 Replies

SB Suriya Balamurugan Syncfusion Team July 31, 2023 09:07 PM UTC

Hi Jon,

Please find the details below,

Queries

Details

2. We can't seem to change the font size of the label. We're trying to set it with "series.DataPoints.DefaultDataPoint.DataLabels.Size = 20;" but there doesn't seem to be any effect.

You can change the font size of the data label as shown below,

//Set the font size to the datalabels.

series1.DataPoints.DefaultDataPoint.DataLabels.Size = 20;

                series2.DataPoints.DefaultDataPoint.DataLabels.Size = 20;

                series3.DataPoints.DefaultDataPoint.DataLabels.Size = 20;


We have prepared a sample application, and it can be downloaded from the attachment below.

You can see the changes in the output Word document of the attached sample.


1, 3,4 and 5

Currently, we are checking these queries and will share the further details on or before 2nd August 2023.


Regards,
Suriya Balamurugan.


Attachment: Createlinewithmarkerschart_a953a1c2.zip


LB Lokesh Baskar Syncfusion Team August 2, 2023 03:17 PM UTC

Hi Jon,

Please find the details below,

Queries

Details

Regarding word has an option for formatting data labels as callouts (Add Chart Element -> Data Labels -> Data Callouts). Is there any way to get this in the DocIO API?

Currently, we doesn’t have support for creating data callout in chart data labels. We have logged this requirement as feature request in our database. We don’t have any immediate plans to implement this feature. We will let you know when this feature is implemented.

You can track the status of this feature from the below link:
https://www.syncfusion.com/feedback/45811/support-for-creating-data-callout-in-the-chart-data-labels

Regarding we'd like to add more space between the series marker and the label. There seems to be layout properties in the DataLabels and FrameFormat properties, but we haven't

using the below code to set the manual layout for data labels:


series1.DataPoints[1].DataLabels.Layout.ManualLayout.Top = -0.06747776319626733;

series1.DataPoints[1].DataLabels.Layout.ManualLayout.Left = 0.3621109861267375;

 

Regrading we can set the background for the label, but not with any transparency.

Using the below code to set the transparency of the color:

 

series1.DataPoints.DefaultDataPoint.DataLabels.FrameFormat.Fill.FillType = OfficeFillType.SolidColor;

    series1.DataPoints.DefaultDataPoint.DataLabels.FrameFormat.Interior.ForegroundColor = Color.Blue;

series1.DataPoints.DefaultDataPoint.DataLabels.FrameFormat.Fill.Transparency = 0.75;

Regarding we can set the border of the data label fine, but we'd like to be able to adjust the margin around the text, like Word allows

Currently, we doesn’t have support for creating text margin in chart data labels. We have logged this requirement as feature request in our database. We don’t have any immediate plans to implement this feature. We will let you know when this feature is implemented.

You can track the status of this feature from the below link:
https://www.syncfusion.com/feedback/45834/support-text-formatting-in-charts-data-labels

Please refer to the complete sample application from the below attachment.
Regards,
Lokesh B



Attachment: sample_192af539.zip


JO Jon August 2, 2023 04:58 PM UTC

Thanks very much for the response. We'll make the changes and check back in a while for an update on the feature adds.


Much appreciated.


Regards,

Jon.



JS Jayashree Suresh Anand Syncfusion Team August 3, 2023 12:42 PM UTC

Hi Jon,

You're welcome. Please check and let us know your feedback for the given solution. Please revert us back if you require further assistance. 

Regards,

Jayashree 


Loader.
Up arrow icon