views:

153

answers:

0

I want to do the following with the WPF toolkit charts:

I have two line series that should use the same y axis (i.e I want them both to be on the same scale). I could give each of them the same axis definition so they would overlap (and then have one of them with collapsed visibility), but that is not my best choice.

This is the solution I'm talking about:

<charts:LineSeries Name="ExternalMeasureSeries"
               IndependentValueBinding="{Binding Time}"
               DependentValueBinding="{Binding ExternalMeasure}">
    <charts:LineSeries.DataPointStyle>
        <Style TargetType="charts:LineDataPoint">
            <Setter Property="Background" Value="Red"/>
            <Setter Property="Opacity" Value="0" />
        </Style>
    </charts:LineSeries.DataPointStyle>
    <!-- Vertical axis for external measure curve -->
    <charts:LineSeries.DependentRangeAxis>
        <charts:LinearAxis
            Orientation="Y"
            Title="Measurement"
            Minimum="0"
            Maximum="30"/>
    </charts:LineSeries.DependentRangeAxis>
</charts:LineSeries>
<charts:LineSeries Name="InternalMeasureSeries"
                   IndependentValueBinding="{Binding Time}"
                   DependentValueBinding="{Binding InternalMeasure}">
    <charts:LineSeries.DataPointStyle>
        <Style TargetType="charts:LineDataPoint">
            <Setter Property="Background" Value="Orange"/>
            <Setter Property="Opacity" Value="0" />
        </Style>
    </charts:LineSeries.DataPointStyle>
    <!-- Vertical axis for internal measure curve -->
    <charts:LineSeries.DependentRangeAxis>
        <charts:LinearAxis
            Orientation="Y"
            Minimum="0"
            Maximum="30"
            Visibility="Collapsed"/>
    </charts:LineSeries.DependentRangeAxis>
</charts:LineSeries>

Is there a way to define more than one series with the same Y axis?

I found that toolkit version 3.5.0.0 has something called StackedLineSeries but that version 3.5.40128.1 which is what gets installed in the February 2010 version of the toolkit, it isn't there. Did it move to another clr-namespace?