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

Selection

5 Answers 101 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Julio Colon
Top achievements
Rank 1
Julio Colon asked on 15 Jul 2010, 05:04 PM
I was reading the release notes for the new (7/15) charts.  Is there a way to see a demo, code sample or documentation related to the RadChart Selection.

J

5 Answers, 1 is accepted

Sort by
0
Accepted
Giuseppe
Telerik team
answered on 15 Jul 2010, 06:41 PM
Hi Julio,

Generally you can see the WPF Chart Interactivity example if you run the WPF4 samples browser from your local installation (the example is not available online as the XBAP is built against .NET3.5 and the interactivity features are supported only for WPF4 and Silverlight4 i.e. .NET4.0) but we have also extracted and attached it here for your convenience.

Here is some information on the new interactivity effects (hover and selection):

The hover and selection interactivity is supported for all 2D series types (note that "selection" for pie and doughnut types is implemented in the form of exploding the respective item slices). The interactivity support is disabled by default and can be controlled through the Interactivity API under SeriesDefinition.InteractivitySettings complex property:

SeriesDefinition.InteractivitySettings
•   HoverScope - Gets or sets a value indicating the scope of interactivity for hover effects.
•   SelectionScope - Gets or sets a value indicating the scope of interactivity for selection effects.
•   SelectionMode - Gets or sets a value indicating the selection mode used by the chart control (single item or multiple items).
 
In order to enable the interactivity functionality you need to first set the interactivity scope for hover, selection, or both. The notion of "interactivity scope" specifies whether the chart control should interpret the interactivity action (selection or hover) on series level (if applicable), or on item level (if applicable).
 
Note that InteractivityScope.Item is not supported for series that do not render separate items (Line, Spline, Area, Range, and all their stacked versions), while InteractivityScope.Series is not supported for radial series (Pie and Doughnut).

For example if HoverScope is set to InteractivityScope.Series for a given bar series, when one hovers over a bar item, the whole series will be highlighted (i.e. all of the other series within the ChartArea will become temporarily transparent); otherwise if HoverScope is set to InteractivityScope.Item, when one hovers over a bar item, only the respective item will be highlighted (i.e. all of the other series as well all of the other bar items within the originating bar series will become temporarily transparent). The same principle applies for SelectionScope as well -- if it is set to InteractivityScope.Series, all items within the series will be selected; alternatively if it set to InteractivtyScope.Item, only the respective item will be selected.

There is one additional setting related to hover effects that can be set on global level - RadChart.HoverActivationDelay. This property gets or sets the delay before the hover effect is activated (by default there is no delay and the hover effect becomes active immediately).

There is a short introductory video here as well (it is recorded for Silverlight but everything applies for the WPF chart as well).

Hope this helps.


Kind regards,
Freddie
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
0
Julio Colon
Top achievements
Rank 1
answered on 27 Jul 2010, 07:18 PM
Thats pretty nice...  Thanks for the video!  Is there a way to make the hover selection though code?
0
Giuseppe
Telerik team
answered on 29 Jul 2010, 02:30 PM
Hi Julio,

Currently this is not supported but we are planning to extend the Interactivity API and possibly add some events for the next release of the control. Could you elaborate a bit what kind of functionality would be useful for you from code-behind?


Regards,
Freddie
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
0
Julio Colon
Top achievements
Rank 1
answered on 29 Jul 2010, 05:48 PM
There are a few methods that would be nice to have in the api:

  • void SelectItem(int index)
  • void SelectItems(int[] indexes)
  • Item[] GetSelectedItems()
  • bool IsHighlighted
  • event Highlighted()
  • event unHighlighted()?

Hope this help,
Julio

PS: I dont know if this could added to the selector, but creating a selection square with the mouse around a group of items and have them selected would be awesome

0
Giuseppe
Telerik team
answered on 03 Aug 2010, 05:48 PM
Hello Julio,

Thank you for elaborating on this -- we will forward your feedback to our developers for further consideration.

We have updated your Telerik points for your involvement as well.


Greetings,
Freddie
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
Julio Colon
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Julio Colon
Top achievements
Rank 1
Share this question
or