【问题标题】:WPF toolkit, shared tooltip between multiple lineseriesWPF 工具包,多个系列之间的共享工具提示
【发布时间】:2013-05-27 13:49:28
【问题描述】:

我正在使用基于 WPF 工具包的多个时间序列图表。例如一张图表中的温度、露点和压力的时间序列

我需要共享工具提示,以便在每个数据点在一个小工具提示框架中显示某个日期/时间的气象参数摘要。

如果有人知道这是否可能以及如何做到这一点,那就太好了。

谢谢, 年

【问题讨论】:

    标签: wpf charts tooltip wpftoolkit


    【解决方案1】:

    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>  
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-03-04
      • 1970-01-01
      • 2016-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-14
      相关资源
      最近更新 更多