![]() |
In Need of Legend Help |
Post Reply
|
| Author | |
ChristineK
Newbie
Joined: 30 January 2012 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: In Need of Legend HelpPosted: 27 March 2012 at 6:31pm |
|
So I have a legend at the center bottom of my chart. Is there any way to make it multi-lined when it has these properties?
pContent->GetLegend()->SetVerticalAlignment(xtpChartLegendFarOutside); pContent->GetLegend()->SetHorizontalAlignment(xtpChartLegendCenter);
|
|
![]() |
|
SuperMario
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2012 at 9:18am |
|
You can try ChartLegend.ColumnCount
|
|
![]() |
|
ChristineK
Newbie
Joined: 30 January 2012 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2012 at 9:23am |
|
I tried setting that ColumnCount with no luck. It seems to be ignored in my instance. When I did a call to GetColumnCount() it was returning a zero, even though my displayed legend had what I thought was 9 columns all one one row.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2012 at 10:20am |
|
Yes, default 0. Appears a bug, however it will not effect performance. 0 and 1 both mean 1 column, 2 = 2 columns, etc. This returned 2: Debug.Print "column: " & ChartControl.Content.Legend.ColumnCount
|
|
![]() |
|
Manny
Newbie
Joined: 28 March 2012 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2012 at 12:15pm |
|
In my
testing with this, I used SetColumnCount(2), and getting the following results: TopToBottom: LeftToRight: 1st 3rd
2nd 1st 2nd 4th
4th 3rd 5th 5th I would
think that if it worked correctly, I should really be seeing the following
orders: TopToBottom: LeftToRight: 1st 4th
1st 2nd 2nd 5th
3rd 4th 3rd 5th |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2012 at 2:12pm |
|
I took look and not sure what problem is. I test both and get your expected results. Please post entire chart you use so I can reproduce.
Also ColumnCount can be 0, only in case xtpChartLegendLeftToRight. If xtpChartLegendTopToBottom then it will use 1 when ColumnCount is 0. So default is 0 in all cases, just know it see 0 and test for direction, if xtpChartLegendTopToBottom it use value of 1. In the picture used xtpChartLegendLeftToRight and 2 columns. Added data in this order: NY, CA, FL, TX, OH ![]() |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |