Is there a tutorial on how to enable tooltips on an xy dataseries so they display the values of a given point? Like in the key features of the wpf chart documentation?
Your code is not showing up in your response on my computer.
thanks for your help
<pltaylor3> wrote in message news:217913@10.0.1.98... Your code is not showing up in your response on my computer. thanks for your help http://helpcentral.componentone.com/cs/forums/p/79226/217913.aspx#217913
I am trying to implement your code and I am running into a couple problems. First a little background. I have multiple charts with multiple series on them that are all different xy datasets. My XAML code for one of the charts is simply.
<my:C1Chart Name="c1Chart1" Margin="53,156.5,27,0" Height="300" VerticalAlignment="Top">
<my:C1ChartLegend DockPanel.Dock="Right" />
</my:C1Chart>
i fill my charts in code behind using
bunch of code....
chart.Data.Children.Add(CreateDataSeries(sim1pts, ds.DataSetName,brushes[k]));
finish up code....
DataSeries CreateDataSeries(IEnumerable<System.Windows.Point> pts, string name, Brush brush) { return new XYDataSeries() { XValuesSource = (from pt in pts select pt.X).ToArray<double>(), ValuesSource = (from pt in pts select pt.Y).ToArray<double>(), Label = name, PointTooltipTemplate ="{StaticResource lbl}", ToolTip = true, ConnectionStroke = brush, }; }
the "PointTooltipTemplate ="{StaticResource lbl}", " is not currently working. How would I fill that?
<pltaylor3> wrote in message news:217921@10.0.1.98... I am trying to implement your code and I am running into a couple problems. First a little background. I have multiple charts with multiple series on them that are all different xy datasets. My XAML code for one of the charts is simply. <my:C1Chart Name="c1Chart1" Margin="53,156.5,27,0" Height="300" VerticalAlignment="Top"> <my:C1ChartLegend DockPanel.Dock="Right" /> </my:C1Chart> i fill my charts in code behind using bunch of code.... chart.Data.Children.Add(CreateDataSeries(sim1pts, ds.DataSetName,brushes[k])); finish up code.... DataSeries CreateDataSeries(IEnumerable<System.Windows.Point> pts, string name, Brush brush) { return new XYDataSeries() { XValuesSource = (from pt in pts select pt.X).ToArray<double>(), ValuesSource = (from pt in pts select pt.Y).ToArray<double>(), Label = name, PointTooltipTemplate ="{StaticResource lbl}", ToolTip = true, ConnectionStroke = brush, }; } the "PointTooltipTemplate ="{StaticResource lbl}", " is not currently working. How would I fill that? http://helpcentral.componentone.com/cs/forums/p/79226/217921.aspx#217921