WPF toolkit charting : Customize datapoint label

陌路散爱 提交于 2019-12-05 14:05:48

Here you can find the XAML style of a LineSeries DataPoint and by default the tooltip is defined as

<ToolTipService.ToolTip>
   <ContentControl Content="{TemplateBinding FormattedDependentValue}"/>
</ToolTipService.ToolTip>

so, you can take the whole style to your application and override the tooltip definition for example:

<ToolTipService.ToolTip>
   <StackPanel Margin="2,2,2,2">
      <ContentControl Content="{TemplateBinding IndependentValue}" FontSize="12"/>
      <ContentControl Content="{TemplateBinding DependentValue}"   FontSize="12"/>
   </StackPanel>
</ToolTipService.ToolTip>

and you willget displayed the "X, Y" tooltip you need.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!