Chart without legend

<Grid xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:charting="clr-namespace:Microsoft.Windows.Controls.DataVisualization.Charting;assembly=Microsoft.Windows.Controls.DataVisualization" xmlns:datavis="clr-namespace:Microsoft.Windows.Controls.DataVisualization;assembly=Microsoft.Windows.Controls.DataVisualization" xmlns:utility="clr-namespace:Utility;assembly=ChartBuilder" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
  <charting:Chart
   Title="Title"
   LegendTitle="Legend">

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

    <charting:Chart.Series>
      <charting:ColumnSeries
       Title="Series 1">
        <charting:ColumnSeries.ItemsSource>
          <utility:ObservableObjectCollection>
            <sys:Double>1</sys:Double>
            <sys:Double>2.33333333333333</sys:Double>
            <sys:Double>3.66666666666667</sys:Double>
            <sys:Double>5</sys:Double>
          </utility:ObservableObjectCollection>
        </charting:ColumnSeries.ItemsSource>
      </charting:ColumnSeries>
    </charting:Chart.Series>
    <charting:Chart.Axes />
  </charting:Chart>
</
Grid>

posted on 2011-05-11 15:53  Y#  阅读(384)  评论(0编辑  收藏  举报

导航