-
Apr 10th, 2011, 03:12 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Silverlight tool tip for Line Series Chart
HI Guys,
Anyone know of a good tutorial about setting up the tool tip for a line series chart? I'd also take a simple example. I have looked around and I can't find anything that makes any sense. I want my tooltip to have both the x and y axis values.
It has the y-axis value as default, but can't seem to figure out how to add the x-axis. I would think it would be easy.
-
Apr 11th, 2011, 12:51 PM
#2
Thread Starter
Hyperactive Member
Re: Silverlight tool tip for Line Series Chart
I figured it out
I ended up using Delay's blog.
http://blogs.msdn.com/b/delay/archiv...-charting.aspx
The only thing I did a little bit different is after you take the default template off here:
http://silverlight.codeplex.com/Sour...w/18791#507649
Stick the whole thing in the
<Application.Resources>
</Application.Resources>
section of the app.xaml page. but you need to give it a name. Change line
<Style TargetType="charting:LineDataPoint"> in the defualt template to something like this
<Style x:Key="MyLineDataPointStyle"
So when you put this:
<charting:Chart
Title="Custom ToolTip">
<charting:ColumnSeries
ItemsSource="{Binding}"
DependentValueBinding="{Binding Length}"
IndependentValueBinding="{Binding}"
DataPointStyle="{StaticResource MyColumnDataPointStyle}"/>
</charting:Chart>
On your mainpage.xaml The datapointstyle has something to reference. Now you can change the
tool tip on the app.xaml page to anything your heart desires.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|