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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set Line Weight on Chart Series in DocIO

Thread ID:

Created:

Updated:

Platform:

Replies:

132676 Sep 14,2017 02:10 PM UTC Sep 18,2017 12:20 PM UTC Windows Forms 4
loading
Tags: DocIO
Jesse Seger
Asked On September 14, 2017 02:10 PM UTC

I see you can set the line weight using _serie.SerieFormat.LineProperties.LineWeight, but it only excepts enum type OfficChartLineWeight.

How can I set the line weight to any number value?

Mohanaselvam  Jothi [Syncfusion]
Replied On September 15, 2017 11:51 AM UTC

Hi Jesse,

Thank you for using Syncfusion product.

Yes, it is possible to set line weight of chart series using number value. The LineWeight property of series is reflected only when LinePattern is not None(Default). Please find the below code example to set line weight using number value:
 
//Sets line patttern.
serie.SerieFormat.LineProperties.LinePattern = OfficeChartLinePattern.Solid;
//Sets line weight.
serie.SerieFormat.LineProperties.LineWeight = (OfficeChartLineWeight)5; 

Please find the sample which illustrates the same from below link:
http://www.syncfusion.com/downloads/support/forum/132676/ze/GenerateWord_Windows-1228456811.zip

Please let us know if you have any other questions.

Regards,
Mohanaselvam J
 


Jesse Seger
Replied On September 15, 2017 02:11 PM UTC

I guess I meant any number value.  Like, 25, or 18.5.  


Mohanaselvam  Jothi [Syncfusion]
Replied On September 18, 2017 10:44 AM UTC

Hi Jesse,

Thank you for your update.

Yes, it is possible to set any number values (25 or 18.5) to LineWeight within a range between 0 and 1583. It can be achieved by typecasting number value as “OfficeChartLineWeight” as we mentioned in our earlier update.

Code snippet:
 
//Sets line weight.
serie.SerieFormat.LineProperties.LineWeight = (OfficeChartLineWeight)18.5; 
 

Note:
Without typecasting, you cannot directly set the value to LineWeight property.


Please let us know if you have any other questions.

Regards,
Mohanaselvam J
 


Jesse Seger
Replied On September 18, 2017 12:20 PM UTC

Sweet!  Thanks


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;