2013-05-27 39 views
1

我正在使用基於WPF工具包的多個時間序列圖表。例如一個圖表中的溫度,露點和壓力的時間序列WPF工具包,多個系列之間的共享工具提示

我需要共享工具提示以在每個數據點上顯示某個日期/時間的氣象邏輯參數摘要,並顯示在一個小工具提示框中。

如果有人知道這是否可行以及如何做到這一點,那就太好了。

感謝, PY

回答

0

查找Styles你係列的DataPoints我有一個例子爲BubbleDataSeries

<Style x:Key="BubbleToolTipTemplate" TargetType="{x:Type c:BubbleDataPoint}"> 
    <Setter Property="Template"> 
     <Setter.Value> 
      <ControlTemplate TargetType="c:BubbleDataPoint"> 
       <Grid> 
        <Ellipse Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" /> 
        <ContentPresenter Content="{TemplateBinding Size}" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
        <ToolTipService.ToolTip> 
         <StackPanel> 
          <ContentControl Content ="{TemplateBinding DependentValue, Converter={StaticResource DoubleToStringConverter}}" /> 
          <ContentControl Content ="{TemplateBinding IndependentValue}"/> 
          <ContentControl Content ="{TemplateBinding Size}" /> 
         </StackPanel> 
        </ToolTipService.ToolTip> 
       </Grid> 
      </ControlTemplate> 
     </Setter.Value> 
    </Setter> 
</Style>