Jump to content
Software FX Community

Highlighting help


glicktomer

Recommended Posts

 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

 

 Posted Image

Thanks ahead

tomer

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...