This is a migrated thread and some comments may be shown as answers.

Bar series Legend's color problem

1 Answer 126 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Dts
Top achievements
Rank 1
Dts asked on 15 May 2013, 09:51 AM
Hi,
    I have successfully added  RadLegends to RadChartView.
   The items in the legend showing colors same respective to the all series except for Bar series.
E.g. Legend Item for line series showing same color as line series and same is true for other series like Area,SplineLine.
But in case of Bar series it is showing by default Blue color.
I am applying colors for Bar series by modifying template.
Can you help me regarding this topic?
Thank You.

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 17 May 2013, 01:33 PM
Hello,

When you use a template for the bar visuals there is virtually no way for the chart to know what color it should pick for the legend item. I think that the easiest way to go here is not to set legend settings for the bar series. This will result in no legend item displayed for the bar series. Then you can manually place a RadLegend with one legend item, above or below the other RadLegend in a stack panel.

Another approach would be not to use a template for the bar visuals but use the DefaultVisualStyle property of the BarSeries instead. If this is possible, this is the solution I suggest. 

Regards,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Dts
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or