Tchart Custom Legend

TeeChart for ActiveX, COM and ASP
Post Reply
sunxp
Newbie
Newbie
Posts: 3
Joined: Mon Nov 20, 2017 12:00 am

Tchart Custom Legend

Post by sunxp » Thu Jan 18, 2018 11:33 am

hello,
I want to use custom legend, my code is:

Code: Select all

	CLegend legend = (CLegend)m_tchart.get_Legend();
	legend.put_Visible(TRUE);
	legend.put_CustomPosition(TRUE);
	legend.put_LeftPercent(80);
	legend.put_TopPercent(5);
But the result is: legend.png

I open the edit, found "percent" is not checked. as attached file: edit.png.

can you help me to find what's wrong whith my code?

thank you!
Attachments
edit.png
edit.png (20.88 KiB) Viewed 9783 times
legend.png
legend.png (23.41 KiB) Viewed 9780 times

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tchart Custom Legend

Post by Yeray » Mon Jan 22, 2018 8:50 am

Hello,

Add this to set position to percent units:

Code: Select all

legend.put_PositionUnits(puPercent);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply