Last Updated: 26 Jan 2016 06:53 by ADMIN
Petar Marchev
Created on: 20 Aug 2015 07:57
Category: ChartView
Type: Bug Report
Legend marker has no color when there are no bars in the BarSeries
When there are no data points in the bar series, the chart fails to retrieve a color for the marker of the legend item. This can be worked around by modifying the item template of the legend item. In the new template the binding of the Fill of the marker, should include not just the MarkerFill but TargetNullValue:

<DataTemplate x:Key="legendItemContentTemplate1">
 <StackPanel Orientation="Horizontal">
  <Path Fill="{Binding MarkerFill, TargetNullValue=#9B25B1}" Width="12" Height="12">
    <Binding Path="ActualMarkerGeometry" 
      RelativeSource="{RelativeSource AncestorType=telerik:LegendItemControl}" />
  <TextBlock Margin="2" Text="{Binding Title}" />

Will be available in Q2 2016 Release.