Jump to content
Software FX Community

unable to highlight the series when user legendbox item is hovered


Ruby

Recommended Posts

I have a bar chart which has 4 series. Out of this I need to address 2 series with Legend. The remaining 2 series should not have legend. So i am using UserLegendBox to show the 2 series names. Now the problem is, if i hover the item in user legend box, i need to highlight the relevant series. I have used the below code that doesnt work.

void chart1_Highlighted(object sender, SoftwareFX.ChartFX.Base.HighlightEventArgs e)

{

if (sender is SoftwareFX.ChartFX.UserLegendBox)

{

chart1.Highlight.HighlightItem(

this, new SoftwareFX.ChartFX.Base.HighlightEventArgs(SoftwareFX.ChartFX.Base.HighlightModes.Series, e.Series, e.Point));

}

}

 

e.Series, e.Point values are always 0. Why?

Link to comment
Share on other sites

  • 1 month later...

Hi Ruby,

In order to achieve the behavior you are looking for, you can use the
SerLegBox property. For example, if you want to show the first 2 series, please
take a look at the code below:

chart1.SerLegBox = true;
chart1.Series[0].Legend = "Series 1";
chart1.Series[1].Legend = "Series 2";

I hope this helps.

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...