JBDiaz
JBDiaz

Reputation: 1

Ordering Legend Items in ComponentOne chart

I'm having a lot of problems reordering the items in the legend of my charts. The thing is I like the order in the chart but I think the order in the legend is wrong and I'd like to reverse that order.

What I tried is:

CType(Me.Content, C1Chart).LegendItems = CType(Me.Content, C1Chart).LegendItems.Reverse()

But it looks like the LegendItems property is readOnly :S

Upvotes: 0

Views: 632

Answers (2)

Rinat
Rinat

Reputation: 1

I succeeded to reverse the legend by reversing only one ChartGroup:

C1Chart1.ChartGroups.ChartGroupsCollection(0).LegendReversed = False
C1Chart1.ChartGroups.ChartGroupsCollection(1).LegendReversed = True

Upvotes: 0

JBDiaz
JBDiaz

Reputation: 1

Finally I found the solution of this problem. Some hours lost trying to find a good solution to fix what I think it's a bug .... and at the end I found an easy way.

In the chart legend you can include this property: FlowDirection="RightToLeft"

Upvotes: 0

Related Questions