Uri Maimon - Nominal
Uri Maimon - Nominal

Reputation: 546

Setting the ToolTip in a WPF chart?

I would like to set the ToolTip on my chart line, pie, area, bubble to include both the X and the Y values.

Charting is use is defined here : xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"

I've learned that I can use the ControlTemplate to do this and by overriding the entire thing, I can also set the tooltip. But this also changes things which I like, the random color selection, the status changes etc.

Is there a way to apply only the tooltip binding to all chart series types, without having to override the entire thing for each of the types (that makes for a very long and mostly irrelevant code, which mostly I don't understand and don't care about)

Thanks! (My first post)

...

Upvotes: 2

Views: 2513

Answers (1)

321X
321X

Reputation: 3185

You have to copy a part of the original source (the style).

Check this site: http://blogs.msdn.com/b/delay/archive/2010/04/22/nobody-likes-a-show-off-today-s-datavisualizationdemos-release-includes-new-demos-showing-off-stacked-series-behavior.aspx

Here you can download this zip file that contains an example project in WPF.

Read the source/style in ChartStyling.xaml and your question will most likely be answered!

Upvotes: 1

Related Questions