Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Chart Control
  New Posts New Posts RSS Feed - Legend bug?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Legend bug?

 Post Reply Post Reply
Author
Message Reverse Sort Order
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Legend bug?
    Posted: 14 June 2011 at 4:20am
And... I want the same colors as if automatic coloring was being used. How can that be accomplished? Is the color generator available outside the class?
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2011 at 2:29am
Thanks. But I want only one legend :)
Hence, three pies (e.g. 1 per year) with the same series - wirh different data of course.

I believe I have to populate the legend manually, wirh ONE instance of the series. But how?
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2011 at 1:29am
Hi,

If you need separate legend with each pie, you can only add same 2-3 Chart windows.

You can manually set color with 
pPoint->SetColor(CXTPChartColor::Red);


Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2011 at 4:34pm

Works for Pie. Not for Pie 3d. Why?

 
Also, I'm not happy with the result. I want all pies to show the same colors, but with different values. Excel sample:
 
 
Whereas I get this:
 
 
Called SetColorEach(FALSE) for each series:
 
UPDATE:
for each category
   add series
   SetColorEach(FALSE)
   for each series
       add point
 
I'm probably missing something here. Please enlighten me! :)
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2011 at 2:23am
Hi,

You need add

pStyle->SetColorEach(FALSE);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2011 at 6:13pm
Also, I want the series to have the same colors! In this case, the pies represent a comparison chart!! :/
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2011 at 5:57pm
15.0.2
 
Sample...
I have three categories: A, B, C
I have three pie-series: X, Y, Z
 
Three pies are displayed with correct values. The legend displays labels "0", "1" and "2". What I want is of course to display the series names: "X", "Y", "Z" with NO values!
 
What am I missing here? Usually this is enough to get right labels:
CXTPChartSeries* pSeries = pContent->GetSeries()->Add(new CXTPChartSeries);
pSeries->SetName(strCategory);
 
Pies are correct!
 
But... legend is totally wrong!
 
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.110 seconds.