glicktomer Posted May 14, 2009 Report Share Posted May 14, 2009 Hi, what i'm trying to do is like this : I got a grid with some columns, and a chart side to it , the chart is showing division between the people in the grid someone1 value1 someone2 value2 exc.. i want to highlight in the chart the relevant part of the pie that got the same value as the selected row , what i don't know is how to find that part at runtime Thanks ahead tomer Quote Link to comment Share on other sites More sharing options...
TatianaG Posted May 19, 2009 Report Share Posted May 19, 2009 The way to achieve what you want is with the following code: chart1.Highlight.HighlightItem( this, new SoftwareFX.ChartFX.Base.HighlightEventArgs(SoftwareFX.ChartFX.Base.HighlightModes.Point,vSeries, vPoint));Where vSeries is the series that you want to be highlighted (for Pie charts is 0) and vPoint is the specific point of the chart that you want to highlight (in this case, is the value that you get from your grid) Please try the above code and let me know if it works for you. Quote Link to comment Share on other sites More sharing options...
glicktomer Posted May 20, 2009 Author Report Share Posted May 20, 2009 Hi , thanks I have already figured it out just the same as you wrote :-) only i had to find the preticular one to highlight and it was a little challange but i did like this (if it looks fishy please tell me): chartPie.OpenData(COD.Values, 0, ((DataTable)chartPie.DataSource).Rows.Count + 1); string name = GetEmpName(} int j = 0; while (j < ((DataTable)chartPie.DataSource).Rows.Count) { if (chartPie.Legend[j] == name) { chartPie.Highlight.HighlightItem(this.chartPie, new HighlightEventArgs(SoftwareFX.ChartFX.Base.HighlightModes.On | SoftwareFX.ChartFX.Base.HighlightModes.Marker | SoftwareFX.ChartFX.Base.HighlightModes.Dimmed | SoftwareFX.ChartFX.Base.HighlightModes.PointChange | SoftwareFX.ChartFX.Base.HighlightModes.SeriesChange | SoftwareFX.ChartFX.Base.HighlightModes.AttributeChange, 0, j)); break; } j++; } chartPie.CloseData(COD.Values); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.