DDean Posted September 7, 2010 Report Share Posted September 7, 2010 I have a charting application that is retrieving date/time based data from a database which is working well. I evaluate the data and if any gaps in time exist in the data I add a coloured Axis Section to the X-Axis to highlight this to the end user. These AxisSections also appear in the LegendBox. There are times when multiple data gaps exist for a chart, therefore multiple Sections are displayed. I would like only one entry in the Legend Box to indicate what the coloured sections represent (i.e. Missing Data), however I have been unable to achieve this. How can I display one Legend Box entry for the multiple Axis Sections, and is it possible to highlight all Sections when the user hovers over the single LegendBox entry? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Choyee Posted September 9, 2010 Report Share Posted September 9, 2010 I went through the same problem recently. Try this: chart1.LegendBox.ItemAttributes[chart1.AxisX.Sections, i].Visible = false; Try not to use ItemAttributes with one parameter. It caused a build error. Hope it helps. Quote Link to comment Share on other sites More sharing options...
DDean Posted September 9, 2010 Author Report Share Posted September 9, 2010 Thanks for the response, your example worked like a charm!! I was trying the single parameter method call and experienced the same build error trouble. 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.