TKE Posted October 31, 2007 Report Share Posted October 31, 2007 Hi there, Is it possible to wrap legend labels when they are too long? Thanks Link to comment Share on other sites More sharing options...
PDyer Posted November 1, 2007 Report Share Posted November 1, 2007 Hello TKE, To accomplish this you may want to use the following: chart1.LegendBox.Height = 100; <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> chart1.LegendBox.Width = 100; chart1.LegendBox.Style |= ChartFX.WinForms.LegendBoxStyles.Wordbreak; Notice that for the property Wordbreak of the LegendBox you must set the size of your LegendBox. Here is my full sample code: chart1.Data.Series = 1; chart1.Data.Points = 3; chart1.Gallery = ChartFX.WinForms.Gallery.Pie; chart1.LegendBox.Visible = true; chart1.Data[0, 0] = 30; chart1.Data[0, 1] = 50; chart1.Data[0, 2] = 20; chart1.Data.Labels[0] = "Internet Explorer nbvbvxbvx"; chart1.Data.Labels[1] = "Netscape"; chart1.Data.Labels[2] = "Other"; chart1.LegendBox.Height = 100; chart1.LegendBox.Width = 100; chart1.LegendBox.Style |= ChartFX.WinForms.LegendBoxStyles.Wordbreak; Link to comment Share on other sites More sharing options...
TKE Posted November 1, 2007 Author Report Share Posted November 1, 2007 Hi Percy, That works great. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.