Hi;
Is it possible that I can custom the legend's location? I saw only 4 locations currently available (top, left, right, bottom), and i can not drag the legend icon to the location I prefer, such as in the middle of the chart.
If it is, how can i implement?
thanks ...
here's a simple example using the FillSceneGraph event to get you started. if you are using version 7.2 or earlier, you will need to move this code into a class implementing ILayer, as the FillSceneGraph event is new to 7.3.
{
int legendBoxY = (int)(this.ultraChart1.Height * .1);
int legendBoxH = (int)(this.ultraChart1.Height * .5);
e.SceneGraph.Add(legendBox);
LabelStyle legendLabelStyle = new LabelStyle();
int legendItemW, legendItemH;
int legendItemSpace = (int)(legendItemW * .25);
int legendItemTextW = legendBoxX + legendBoxW - legendItemTextX;
e.SceneGraph.Add(legendItem1Box);
e.SceneGraph.Add(legendItem1Text);
legendItemY += legendItemH + legendItemSpace;
e.SceneGraph.Add(legendItem2Box);
e.SceneGraph.Add(legendItem2Text);
}
Isn't there an easier way then just building the legend from scratch?