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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change font in one value or chart

Thread ID:





125203 Jul 29,2016 12:42 PM UTC Aug 2,2016 04:24 AM UTC ASP.NET Web Forms 3
Tags: XlsIO
Asked On July 29, 2016 12:42 PM UTC

I have generated a graph with xlsio and want to change the color of the label of the last of the axis data values.

            Dim serie1 As IChartSerie = chart.Series.Add("Serie1")
            serie1.DataPoints.DefaultDataPoint.DataLabels.IsValue = True
            serie1.DataPoints.DefaultDataPoint.DataLabels.Position = ExcelDataLabelPosition.Above
            serie1.DataPoints.DefaultDataPoint.DataLabels.Color = ExcelKnownColors.Dark_blue
            serie1.DataPoints.DefaultDataPoint.DataLabels.Bold = True

With this code I can change the style of all values, but want to change only the latter.
How can I do it?


Abirami Varadharajan [Syncfusion]
Replied On August 1, 2016 10:37 AM UTC

Hi Juan, 
Thank you for contacting Syncfusion support. 
We request you to set the formatting to particular data point of the series. Kindly refer the below code snippet to achieve your requirement. 
Code Example: 
        Dim chart As IChart = workbook.Charts.Add() 
        chart.Series(0).CategoryLabels = sheet.Range("A3:A10") 
        chart.Series(0).Values = sheet.Range("B3:B10") 
        chart.Series(1).CategoryLabels = sheet.Range("A3:A10") 
        chart.Series(1).Values = sheet.Range("E3:E10") 
        chart.Series(0).DataPoints.DefaultDataPoint.DataLabels.IsValue = True 
        chart.Series(1).DataPoints.DefaultDataPoint.DataLabels.IsValue = True 
        chart.Series(1).DataPoints(7).DataLabels.IsValue = True 
        chart.Series(1).DataPoints(7).DataLabels.Position = ExcelDataLabelPosition.Above 
        chart.Series(1).DataPoints(7).DataLabels.Color = ExcelKnownColors.Dark_blue 
        chart.Series(1).DataPoints(7).DataLabels.Bold = True 
We have also shared the sample for your reference which can be downloaded from the following location. Kindly refer and let us know if this helps. 

Replied On August 1, 2016 10:55 AM UTC

Thank you very much for the help!

I managed to
change it!


Abirami Varadharajan [Syncfusion]
Replied On August 2, 2016 04:24 AM UTC

Hi Juan, 
Thank you for updating us. 
We are glad that your requirement is fulfilled. Please let us know if you need any further assistance. 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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