【问题标题】:How can you remove label of key under chart area?如何删除图表区域下的键标签?
【发布时间】:2017-12-06 17:43:39
【问题描述】:

我正在使用 WPFToolkit 中的图表控件。

如何删除或隐藏图表区域下的“键”标签?

我在屏幕上用红色标记了它:

我有以下 XAML 代码:

<chartingToolkit:Chart Margin="62.14,92.004,0,130.505"
                       Name="chart"
                       HorizontalAlignment="Left"
                       Width="385" 
                       BorderThickness="0"
                       Padding="0" >
    <chartingToolkit:LineSeries DependentValuePath="Value"
                                IndependentValuePath="Key"
                                ItemsSource="{Binding}"
                                IsSelectionEnabled="True"
                                DataPointStyle="{StaticResource InvisibleDataPoint}"/>
</chartingToolkit:Chart>

【问题讨论】:

    标签: c# wpf charts wpftoolkit


    【解决方案1】:

    根据How does one hide the legend尝试使用:

    <charting:Chart.LegendStyle>
     <Style TargetType="Control">
     <Setter Property="Width" Value="0"/>
     <Setter Property="Height" Value="0"/>
     </Style>
    </charting:Chart.LegendStyle>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多