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.

Can I change the highlight color for chart data?

Thread ID:

Created:

Updated:

Platform:

Replies:

21112 Nov 2,2004 12:51 PM Nov 4,2004 09:07 AM Windows Forms 3
loading
Tags: Chart
Administrator [Syncfusion]
Asked On November 2, 2004 12:51 PM

I find the highlight color to be too dark. It is possible to have a lighter color for the highlight effect? TIA

Davis Jebaraj [Syncfusion]
Replied On November 4, 2004 08:50 AM

Hi, The Highlight color is controlled by the HightlightInterior property of a point style. You can modify the Highlight interior for each point by setting the Style.HighlightInterior: Approach 1: Set the HighlightInterior for each point style. If a series has 10 points, you need to set the style for all 10 point styles VB.NET: Dim highlightColor As BrushInfo = New BrushInfo(Color.LightBlue) seriesCount.Styles(0).HighlightInterior = highlightColor seriesCount.Styles(1).HighlightInterior = highlightColor seriesCount.Styles(2).HighlightInterior = highlightColor seriesCount.Styles(3).HighlightInterior = highlightColor seriesCount.Styles(4).HighlightInterior = highlightColor seriesCount.Styles(5).HighlightInterior = highlightColor seriesCount.Styles(6).HighlightInterior = highlightColor seriesCount.Styles(7).HighlightInterior = highlightColor seriesCount.Styles(8).HighlightInterior = highlightColor seriesCount.Styles(9).HighlightInterior = highlightColor Approach 2 (Recommended): Use the callback approach AddHandler seriesCount.PrepareStyle, AddressOf Me.ChartControlSeries_PrepareStyle Protected Sub ChartControlSeries_PrepareStyle(ByVal sender As Object, ByVal args As ChartPrepareStyleInfoEventArgs) '' Style formatting using a callback. You can apply the same settings directly on the series style on the '' point styles. Dim series As ChartSeries = sender Dim rand As New Random() If Not (series Is Nothing) Then args.Style.HighlightInterior = New BrushInfo(Color.LightBlue) args.Handled = True End If End Sub Thanks, Davis

Davis Jebaraj [Syncfusion]
Replied On November 4, 2004 08:59 AM

Hi, Please refer to a sample showing both the approaches: ChartHighlightInterior_5847.zip Thanks, Davis

Administrator [Syncfusion]
Replied On November 4, 2004 09:07 AM

Thanks Davis, I''ll give it a try.

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.

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.

;