Jump to content
Software FX Community

Remove Items in LegendBox


Recommended Posts

Hi, I'm charting with several series and a couple of AxisSections for the X axis.

I don't want to display these AxisSections' information in the LegendBox, so I tried this:

chart1.LegendBox.ItemAttributes[chart1.AxisX.Sections].Visible = false;

But, it didn't work. It just caused a buil error. I assume the problem is, unlike the API Reference says, this LegenItemAttributesCollection of the LegendBox requies 'ILegendBoxItemCollection' not 'ILegendItemCollection' for the collection parameter.

I tried the exact same statement in a debug mode and it worked then, which makes me more confused.

Am I using this wrong or is this because I'm using a wrong build version, 7.0.3754.185555?


Thanks in advance.

Link to comment
Share on other sites

I tried the method with two parameters as 'chart1.LegendBox.ItemAttributes[chart1.AxisX.Sections, i].Visible = false' and it worked fine. I just don't get it.

And, I'm troubling with a Pie chart, now. One Pie chart, one series, right?

I'm working with 10~15 points for the chart. Normally, 3~5 items take more than 90% of the chart area and I don't want to display other items in the LegendBox. So, I tried 'KeyLabels' property as written in the API Reference because it seems to be the only possibility since there is just one series, but it didn't work and showed the same build error.


Any solutions for the Pie chart?


Also, is there any way to display 2 X 4 multiple panes? I could handle the vertically arranged panes but I couldn't find a clue to display them horizontally as ChartFX WPF provided.


Thanks in advance. 


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.

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