soushinsha
soushinsha

Reputation: 83

Aligning Legend at the top right on ZedGraph

Aligning Legend at the top right on ZedGraph.

 myPane.Legend.Position = ZedGraph.LegendPos.TopCenter; // This way working.

I tried this way and has not worked.

 //myPane.Legend.Location.AlignH = AlignH.Right;
//myPane.Legend.Location.AlignV = AlignV.Top;
//Location(0.95, 0.15,);// CoordType.PaneFraction, AlignH.Right, AlignV.Top);
//AlignV.Top; //(0.95, 0.15, CoordType.PaneFraction, AlignH.Right, AlignV.Top);

Any suggestions. Thanks ocaccy

Upvotes: 1

Views: 1801

Answers (1)

PeskyGnat
PeskyGnat

Reputation: 2464

There are a couple of ways to align the legend to the top right, one way is:

myPane.Legend.Position = ZedGraph.LegendPos.Right;

or if you want the legend inside the graph area:

myPane.Legend.Position = ZedGraph.LegendPos.InsideTopRight;

Upvotes: 1

Related Questions