Page 1 of 1

Tchart Custom Legend

Posted: Thu Jan 18, 2018 11:33 am
by 16682352
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!

Re: Tchart Custom Legend

Posted: Mon Jan 22, 2018 8:50 am
by yeray
Hello,

Add this to set position to percent units:

Code: Select all

legend.put_PositionUnits(puPercent);