Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSChart legend position all screwy

Status
Not open for further replies.

johnnyv

Programmer
Jul 13, 2001
216
CA
Hey guys

I am new to the MSChart control and am having a problem positioning the legend. I have a chart called chsummary
I have positioned the legend to the rightof the plot area. I want the legend to start on it x axis just to the right of the pie chart here is the code I am using to do this

.Legend.Location.Rect.Min.Set chSummary.Height, 0
.Legend.Location.Rect.Max.Set chSummary.Width, chSummary.Height

given that it is a pie chart being displayed it made sense to me to set the legends min x location value to the hieght of the chart control
This seems to have no effect on the poistion of the legend, if the legend text is longer than the available room it shifts the legend to the left and causes it to start on top of the pie chart.
if the text is very legend text is short it positions it further away from the right edge of the pie chart

So I am wondering can I hard code in a value for x, where I want the legend's left top corner to be positioned each and every time regardless of the length of the legend text?

any thoughts or suggestions would bew most helpful as I am ready to toss the whole thing!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top