AddingTooltip on each data point

Aug 31, 2012 at 1:43 PM
Edited Aug 31, 2012 at 1:44 PM

From Example, I am trying to use like as follows:

 

as you can see, I have added "AddMapping" method for both axis data source. Problem is the later on is only being displayed. I need to show both x and y axis data. How can I do this please?
var datesDataSource = new EnumerableDataSource<DateTime>(dates);
                datesDataSource.SetXMapping(x => dateAxis.ConvertToDouble(x));
                datesDataSource.AddMapping(ShapeElementPointMarker.ToolTipTextProperty, getFormattedDate);
                
                var tempDataSource = new  EnumerableDataSource<float>(tempPoints);
                tempDataSource.SetYMapping(y => y);
                tempDataSource.AddMapping(ShapeElementPointMarker.ToolTipTextProperty, y => string.Format("Temp: {0}", y));
                
                CompositeDataSource compositeDataSource1 = new
                  CompositeDataSource(datesDataSource, tempDataSource);

                          
                Pen pen = new Pen(Brushes.Blue, 1);
              
                CircleElementPointMarker cpMarker = new CircleElementPointMarker { Size = 10.0, Fill = Brushes.Red };
                PenDescription pDescription = new PenDescription("Data Points");
                var lineGraph = chartDownload.AddLineGraph(compositeDataSource1, pen, cpMarker, pDescription);

                chartDownload.Viewport.FitToView();





Sep 4, 2012 at 11:56 AM

I was having the same problem, and then I found this post:

http://dynamicdatadisplay.codeplex.com/discussions/55291

if you use an enumerabledatasource instead of a compositedatasource it should solve your problem.