2013-03-18 5 views
0

Я не вижу никаких свойств, чтобы показывать метки точек данных в Silverlight (должен быть всегда виден), и Google не дает никакой радости ...Как показать метки точек данных в Silverlight?

Любой ключ, как это сделать?

Вот мой XAML

<toolkit:Chart Height="400" Width="600" Title="Cumulative Age Dispersions" > 


       <toolkit:Chart.Axes> 
        <toolkit:CategoryAxis Title="Content Items" Orientation="X" /> 
        <toolkit:CategoryAxis Title="Seconds" Orientation="Y" Location="Right" /> 
       </toolkit:Chart.Axes> 

       <toolkit:ColumnSeries Title="Male" ItemsSource="{Binding MaleSerie}" IndependentValueBinding="{Binding ItemName}" 
        DependentValueBinding="{Binding Count}" ToolTipService.ToolTip="{Binding Count}" 
        AnimationSequence="Simultaneous" 
        HorizontalAlignment="Left" Height="304" VerticalAlignment="Top" Width="266"/> 

       <toolkit:ColumnSeries Title="Female" ItemsSource="{Binding FemaleSerie}" IndependentValueBinding="{Binding ItemName}" 
        DependentValueBinding="{Binding Count}" ToolTipService.ToolTip="{Binding Count}" 
        AnimationSequence="Simultaneous" 
        HorizontalAlignment="Left" Height="304" VerticalAlignment="Top" Width="266"> 


       </toolkit:ColumnSeries> 

      </toolkit:Chart> 

ответ

1

хорошо сделано ...

 <toolkit:Chart.Axes> 
      <toolkit:CategoryAxis Title="Content Items" Orientation="X" /> 
      <toolkit:CategoryAxis Title="Seconds" Orientation="Y" Location="Right" /> 
     </toolkit:Chart.Axes> 

     <toolkit:ColumnSeries Title="Male" ItemsSource="{Binding MaleSerie}" IndependentValueBinding="{Binding ItemName}" 
      DependentValueBinding="{Binding Count}" ToolTipService.ToolTip="{Binding Count}" 
      AnimationSequence="Simultaneous" 
      HorizontalAlignment="Left" Height="304" VerticalAlignment="Top" Width="266"/> 

     <toolkit:ColumnSeries Title="Female" ItemsSource="{Binding FemaleSerie}" IndependentValueBinding="{Binding ItemName}" 
      DependentValueBinding="{Binding Count}" ToolTipService.ToolTip="{Binding Count}" 
      AnimationSequence="Simultaneous" 
      HorizontalAlignment="Left" Height="304" VerticalAlignment="Top" Width="266"> 

      <toolkit:ColumnSeries.DataPointStyle> 
       <Style TargetType="toolkit:ColumnDataPoint"> 
        <Setter Property="Background" Value="Green"/> 
        <Setter Property="Template"> 
         <Setter.Value> 
          <ControlTemplate TargetType="toolkit:ColumnDataPoint"> 
           <Grid> 
            <Rectangle 
          Fill="{TemplateBinding Background}" 
          Stroke="Black"/> 
            <Grid 
          Background="#aaffffff" 
          Margin="0 -40 -10 0" 
          HorizontalAlignment="Right" 
          VerticalAlignment="Center"> 
             <TextBlock 
           Text="{TemplateBinding FormattedDependentValue}" 
           FontWeight="Bold" Width="40" 
           Margin="2"/> 
            </Grid> 
           </Grid> 
          </ControlTemplate> 
         </Setter.Value> 
        </Setter> 
       </Style> 
      </toolkit:ColumnSeries.DataPointStyle> 

     </toolkit:ColumnSeries> 

    </toolkit:Chart> 

 Смежные вопросы

  • Нет связанных вопросов^_^