Print Page | Close Window

Legend bug?

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=18537
Printed Date: 12 May 2024 at 1:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Legend bug?
Posted By: znakeeye
Subject: Legend bug?
Date 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!
 



Replies:
Posted By: znakeeye
Date 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/


Posted By: Oleg
Date Posted: 13 June 2011 at 2:23am
Hi,

You need add

pStyle->SetColorEach(FALSE);


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date 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/


Posted By: Oleg
Date 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


Posted By: znakeeye
Date 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/


Posted By: znakeeye
Date 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/



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