Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Chart Control
  New Posts New Posts RSS Feed - how can I change line width of legend on chart?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how can I change line width of legend on chart?

 Post Reply Post Reply
Author
Message
dj1026 View Drop Down
Newbie
Newbie


Joined: 01 December 2022
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj1026 Quote  Post ReplyReply Direct Link To This Post Topic: how can I change line width of legend on chart?
    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.
Back to Top
dj1026 View Drop Down
Newbie
Newbie


Joined: 01 December 2022
Status: Offline
Points: 8
Post Options Post Options   Thanks (1) Thanks(1)   Quote dj1026 Quote  Post ReplyReply Direct Link To This Post 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);
}
/**/
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.