Print Page | Close Window

how can I change line width of legend on chart?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=24341
Printed Date: 04 May 2024 at 9:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how can I change line width of legend on chart?
Posted By: dj1026
Subject: how can I change line width of legend on chart?
Date Posted: 01 December 2022 at 9:06pm
hello everyone.

I want to change width of those lines on legend of XTPChart below.


I used codes to make those lines thicker. but it doesn't work.
/**/
CXTPChartContent* pContent = m_chartViewAll.GetContent();
CSize sz;
sz.SetSize(50, 50); // I thought I can change line width with second argument of SetSize()
pContent->GetLegend()->SetMarkerSize(sz);
/**/

would you help me?

best regards.




I'm using Xtreme Chart Pro v15.3.1.



Replies:
Posted By: dj1026
Date Posted: 02 December 2022 at 2:45am
I solved this problem. you can change the line width with SetLineThickness() of CXTPLegendItem.

/**/
CXTPChartContent* pContent = m_chartViewAll.GetContent();
CXTPChartSeriesCollection* pSeriesCollection = pContent->GetSeries();
for (int i = 0; i < pSeriesCollection->GetCount(); i++)
{
  pSeriesCollection->GetAt(i)->GetLegendItem()->SetLineThickness(10);
}
/**/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net