This is a migrated thread and some comments may be shown as answers.

InteractivitySettings.HoverScope

2 Answers 67 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Natália
Top achievements
Rank 1
Natália asked on 30 Aug 2010, 06:43 PM
Hello,

I am creating a RadChart with ChartLegend customized and am trying to implement the feature of interactivity, I am getting the following error message:


Unhandled Error in Silverlight Application Object reference not set to an instance of an object.   em Telerik.Windows.Controls.Charting.ChartLegendItem.get_HoverScope()\n
em Telerik.Windows.Controls.Charting.ChartLegendItem.OnMouseLeave(MouseEventArgs e)\n
   em System.Windows.Controls.Control.OnMouseLeave(Control ctrl, EventArgs e)\n   em MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)"

I'm using version RadControls for Silverlight Q2 2010.

SeriesMapping seriesMapping = new SeriesMapping();
                                seriesMapping.LegendLabel = Caption;
                                seriesMapping.SeriesDefinition = serieDefinition;
                                seriesMapping.SeriesDefinition.ShowItemToolTips = true;
                                seriesMapping.SeriesDefinition.ShowItemLabels = false;
                                seriesMapping.SeriesDefinition.Appearance.Fill = chart.PaletteBrushes;
                                seriesMapping.SeriesDefinition.InteractivitySettings.HoverScope = InteractivityScope.Series;
                                seriesMapping.SeriesDefinition.InteractivitySettings.SelectionScope = InteractivityScope.Series;
                                  
                                ItemMapping itemMappingX = new ItemMapping();
                                itemMappingX.DataPointMember = DataPointMember.XCategory;
                                itemMappingX.FieldName = axis1;
                                seriesMapping.ItemMappings.Add(itemMappingX);
  
                                ItemMapping itemMappingY = new ItemMapping();
                                itemMappingY.DataPointMember = DataPointMember.YValue;
                                itemMappingY.FieldName = member.Caption;
                                seriesMapping.ItemMappings.Add(itemMappingY);
  
                                chart.SeriesMappings.Add(seriesMapping);
  
                                ChartLegendItem cli = new ChartLegendItem();
                                cli.Label = Caption;
                                cli.MarkerShape = markerShapes;
                                cli.Background = chart.PaletteBrushes;
                                chart.DefaultView.ChartLegend.Items.Add(cli);

When I select the bars of the graph works fine but when I move the mouse over the ChartLegend the error appears.

Thanks...


2 Answers, 1 is accepted

Sort by
0
Natália
Top achievements
Rank 1
answered on 01 Sep 2010, 12:46 PM
The problem is the version of RadControls?
Can I add the feature of interactivity in a custom ChartLegend?
How do I?

Thanks...
0
Ves
Telerik team
answered on 02 Sep 2010, 12:42 PM
Hello Natália,

Please, download the latest version of RadControls for Silverlight - Q2 2010 SP1. It does not show such issues on our end. Still, interactivity features for custom legend items are not currently supported as interactivity features are defined through the SeriesDefinition.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Natália
Top achievements
Rank 1
Answers by
Natália
Top achievements
Rank 1
Ves
Telerik team
Share this question
or