line becomes orange : WPF chart

Apr 1, 2010 at 12:13 PM

Hi,

I am trying to remove the dot from the lines in the line chart. But it becomes orange if I change the template of the line.

Then legend is of no use as all line turns orange.

 

<Style x:Key="EmptyPointsStyle" TargetType="{x:Type DVC:LineDataPoint}">
      <!--<Setter Property="Template" Value="{x:Null}"/>-->
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="DVC:LineDataPoint">
            <Ellipse StrokeThickness="{TemplateBinding BorderThickness}"/>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

<Style x:Key="EmptyPointsStyle" TargetType="{x:Type charting:LineDataPoint}">

      <Setter Property="BorderThickness" Value="1"/>

      <Setter Property="Template">

        <Setter.Value>

          <ControlTemplate TargetType="charting:LineDataPoint">

            <Ellipse StrokeThickness="{TemplateBinding BorderThickness}"/>

          </ControlTemplate>

        </Setter.Value>

      </Setter>

    </Style>

 

 <charting:LineSeries Title="Light" x:Name="myLightChart" DataPointStyle="{StaticResource EmptyPointsStyle}" 

             IndependentValueBinding="{Binding Path=Key}"

             DependentValueBinding="{Binding Path=Value}">

 </charting:LineSeries>

 

Is this bug ? or any turn around?

Thanks.

 

Apr 6, 2010 at 2:34 PM

I would guess it is the same problem as described here:

http://wpf.codeplex.com/Thread/View.aspx?ThreadId=207938

 

Sadly I don't know any good work around :-/