I have a chart where I want the legend to display at the bottom of the chart which I figured out how to do, but the legend still displays horizontal, is there a way to make the legend display vertical.
Mike
legend display
Re: legend display
Support · Feb 6, 2009Hello Mike,
THe legend does display vertically by default. However, you can control the display of the legend by changing its Height and Width property.
Thanks,
ceTe Software Support Team
Re: legend display
Forum member · Feb 6, 2009I tried that by using this.
MyChart.AutoLayout = False
MyChart.Legends(0).X = 200
MyChart.Legends(0).Y = 390
MyChart.Legends(0).Width = 300
MyChart.Legends(0).Height = 15
MyChart.Legends(0).BackgroundColor = Grayscale.White
the you can tell by the background that it is the size listed above but the legend items for my lineseries are still going vertical
Re: legend display
Support · Feb 9, 2009Hello,
Currently it is not possible to display the legend labels horizontally. We are going to add this feature in a future version of our product but currently we do not have any immediate plans on this.
Thanks,
ceTe Software Support Team.
Re: legend display
Forum member · Feb 9, 2009Thats not good, now they are going to make me redo this graph trying to figure out a different product. While you are making the label go horizontal so that you can put it at the bottom of your chart I have another suggestion. Because this is what caused me to try to put it horizontal at the bottom. Your legend does not line up the way you currently have it so it doesn't look very good. what you need to do is, in you legend box you should create two columns that way you can put the marker in one column centered and then the text in the second column left justified. that would make it look a lot cleaner.
Re: legend display
Support · Feb 11, 2009Hello,
Currently we do not have this feature of showing the legend labels horizontally, however there is a work around to show the legend labels horizontally.
You will have to set the AutoLayout property of the chart to false and then you will have to create your own legends and show then where ever you want by specifying the X, Y etc properties. Bellow is some sample line of codes to set these.
Below code is to set the AuotLayout to false and start layouting
chart.AutoLayout = false;
chart.Layout();
Below code is to add your own legends to the chart.
Legend legend1 = chart.Legends.Add();
Legend legend2 = chart.Legends.Add();
Legend legend3 = chart.Legends.Add();
Then you will have to set these legends to your series elements.
lineSeries1.Legend = legend1; //Similarly to the other series also you have to set the legends.
Finally you will have to set the X, Y for the legends.
legend1.X = chart.X;
legend1.Y = chart.Y + chart.Height + 20;
legend2.X = legend1.X + legend1.Width + 20;
legend2.Y = chart.Y + chart.Height + 20;
legend3.X = legend2.X + legend2.Width + 20;
legend3.Y = chart.Y + chart.Height + 20;
Please send over an email to our [^a|mailto:support@cete.com|Support Team^] if you would like to get a full code for drawing horizontal legend labels.
Thanks,
ceTe Software Support Team.
Re: legend display
Forum member · Feb 11, 2009Thanks, I tried the code you gave above and it has not moved the legend at all. I have it exacly as you do except I'm using vb. the legend is still in the middle of the right side of the chart in the default posistion.
MyChart.AutoLayout = False
MyChart.Layout()
Dim legend1 As Legend = MyChart.Legends.Add()
Dim legend2 As Legend = MyChart.Legends.Add()
Dim legend3 As Legend = MyChart.Legends.Add()
legend1.X = MyChart.X
legend1.Y = MyChart.Y + MyChart.Height + 20
legend2.X = legend1.X + legend1.Width + 20
legend2.Y = MyChart.Y + MyChart.Height + 20
legend3.X = legend2.X + legend2.Width + 20
legend3.Y = MyChart.Y + MyChart.Height + 20
MyLineSeries1.Legend = legend1
MyAreaSeries.Legend = legend2
MyLineSeries3.Legend = legend3
Re: legend display
Support · Feb 11, 2009Hello,
Can you please send an email to our [^a|mailto:support@cete.com|Support Team^] so that we can send you a working example.
Thanks,
ceTe Software Support Team.