WPF图表工具包:如何​​向行系列中的不同数据点添加不同的标签

时间:2015-07-30 01:43:09

标签: c# wpf wpftoolkit

我有一个折线图,其中我将itemsource绑定到列表。是否可以为每个数据点附加不同的标签?

<Grid>
    <chartingToolkit:Chart  HorizontalAlignment="Left" Name="LineChart1" Width="880" Height="400" Margin="69,36,0,0" VerticalAlignment="Top">
        <chartingToolkit:Chart.Series>
            <chartingToolkit:LineSeries Name="Line1" DependentValuePath="Value" 
                                        IndependentValuePath="Key" 
                                        IsSelectionEnabled="True" ItemsSource="{Binding Path=SourceList, Mode=TwoWay}">
                <chartingToolkit:DataPointSeries.DataPointStyle>
                    <Style BasedOn="{StaticResource NewDataPointStyle}"
                        TargetType="{x:Type chartingToolkit:LineDataPoint}">
                    </Style>
                </chartingToolkit:DataPointSeries.DataPointStyle>
            </chartingToolkit:LineSeries> 
         </chartingToolkit:Chart.Series>           
    </chartingToolkit:Chart>        
</Grid>

0 个答案:

没有答案