C# Class WinRTXamlToolkit.Controls.DataVisualization.Charting.DataPointSeries

Represents a control that contains a dynamic data series.
Inheritance: Series
Mostra file Open project: xyzzer/WinRTXamlToolkit Class Usage Examples

Public Properties

Property Type Description
AnimationSequenceProperty Windows.UI.Xaml.DependencyProperty
DataPointStyleProperty Windows.UI.Xaml.DependencyProperty
IsSelectionEnabledProperty Windows.UI.Xaml.DependencyProperty
ItemsSourceProperty Windows.UI.Xaml.DependencyProperty
LegendItemStyleProperty Windows.UI.Xaml.DependencyProperty
SelectedItemProperty Windows.UI.Xaml.DependencyProperty
TransitionDurationProperty Windows.UI.Xaml.DependencyProperty
TransitionEasingFunctionProperty Windows.UI.Xaml.DependencyProperty

Private Properties

Property Type Description
AttachEventHandlersToDataPoints void
CreateAndPrepareDataPoint DataPoint
DetachEventHandlersFromDataPoints void
GetResourceDictionaryWithTargetType IEnumerator
InvokeOnLayoutUpdated void
ItemsSourceCollectionChanged void
OnDataPointActualDependentValueChanged void
OnDataPointActualIndependentValueChanged void
OnDataPointDependentValueChanged void
OnDataPointIndependentValueChanged void
OnDataPointIsSelectedChanged void
OnDataPointStateChanged void
OnDataPointStylePropertyChanged void
OnIsSelectionEnabledPropertyChanged void
OnItemsSourceChanged void
OnLegendItemStylePropertyChanged void
OnSelectedItemPropertyChanged void
OnSizeChanged void
Select void
StaggeredStateChange void
Unselect void

Public Methods

Method Description
Refresh ( ) : void

Refreshes data from data source and renders the series.

Protected Methods

Method Description
AddDataPoint ( DataPoint dataPoint ) : void

Adds a data point to the plot area.

AddObject ( object dataContext ) : DataPoint

Adds an object to the series host by creating a corresponding data point for it.

AttachEventHandlersToDataPoint ( DataPoint dataPoint ) : void

Attaches event handlers to a data point.

CreateDataPoint ( ) : DataPoint

Returns a Control suitable for the Series.

CreateLegendItem ( DataPointSeries owner ) : LegendItem

Creates a legend item.

DataPointSeries ( ) : Controls.DataVisualization.Toolkit

Initializes a new instance of the DataPointSeries class.

DetachEventHandlersFromDataPoint ( DataPoint dataPoint ) : void

Detaches event handlers from a data point.

GetDataPoint ( object dataContext ) : DataPoint

Retrieves the data point corresponding to the object passed as the parameter.

GetInsertionIndex ( DataPoint dataPoint ) : int

Returns the index at which to insert data point in the plot area child collection.

LoadDataPoints ( IEnumerable newItems, IEnumerable oldItems ) : void

Updates data points collection with items retrieved from items source and removes the old items.

OnAfterUpdateDataPoints ( ) : void

This method that executes after data points are updated.

OnApplyTemplate ( ) : void

Attaches handler plot area after loading it from XAML.

OnBeforeUpdateDataPoints ( ) : void

This method that executes before data points are updated.

OnDataPointActualDependentValueChanged ( DataPoint dataPoint, IComparable oldValue, IComparable newValue ) : void

Handles data point actual dependent value property change.

OnDataPointActualIndependentValueChanged ( DataPoint dataPoint, object oldValue, object newValue ) : void

Handles data point actual independent value property change.

OnDataPointDependentValueChanged ( DataPoint dataPoint, IComparable oldValue, IComparable newValue ) : void

Handles data point dependent value property change.

OnDataPointIndependentValueChanged ( DataPoint dataPoint, object oldValue, object newValue ) : void

Handles data point independent value property change.

OnDataPointStateChanged ( DataPoint dataPoint, DataPointState oldValue, DataPointState newValue ) : void

Handles data point state property change.

OnDataPointStylePropertyChanged ( Style oldValue, Style newValue ) : void

DataPointStyleProperty property changed handler.

OnDataPointsChanged ( IList newDataPoints, IList oldDataPoints ) : void

Called after data points have been loaded from the items source.

OnIsSelectionEnabledPropertyChanged ( bool oldValue, bool newValue ) : void

IsSelectionEnabledProperty property changed handler.

OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void

Called when the ItemsSource property changes.

OnItemsSourceCollectionChanged ( IEnumerable collection, NotifyCollectionChangedEventArgs e ) : void

Method called when the ItemsSource collection changes.

OnLegendItemStylePropertyChanged ( Style oldValue, Style newValue ) : void

Called when the value of the LegendItemStyle property changes.

OnPlotAreaChanged ( Panel oldValue, Panel newValue ) : void

Removes items from the existing plot area and adds items to new plot area.

OnSelectedItemPropertyChanged ( object oldValue, object newValue ) : void

Called when the value of the SelectedItem property changes.

OnSeriesHostPropertyChanged ( ISeriesHost oldValue, ISeriesHost newValue ) : void

Handles changes to the SeriesHost property.

PrepareDataPoint ( DataPoint dataPoint, object dataContext ) : void

Prepares a data point by extracting binding it to a data context object.

RemoveDataPoint ( DataPoint dataPoint ) : void

Removes a data point from the plot area.

RemoveObject ( object dataContext ) : DataPoint

Removes an object from the series host by removing its corresponding data point.

ShouldCreateDataPoint ( object dataContext ) : bool

Returns whether a data point should be created for the data context.

UpdateDataPoint ( DataPoint dataPoint ) : void

Updates the visual representation of a single data point in the plot area.

UpdateDataPoints ( IEnumerable dataPoints ) : void

Updates the visual representation of all data points in the plot area.

Private Methods

Method Description
AttachEventHandlersToDataPoints ( IEnumerable dataPoints ) : void

Attaches event handlers to the data points.

CreateAndPrepareDataPoint ( object dataContext ) : DataPoint

Creates and prepares a data point.

DetachEventHandlersFromDataPoints ( IEnumerable dataPoints ) : void

Detaches event handlers from the data points.

GetResourceDictionaryWithTargetType ( IResourceDictionaryDispenser dispenser, Type targetType, bool takeAncestors ) : IEnumerator

Returns a ResourceDictionaryEnumerator that returns ResourceDictionaries with a DataPointStyle having the specified TargetType or with a TargetType that is an ancestor of the specified type.

InvokeOnLayoutUpdated ( System.Action action ) : void

Invokes an action when the plot area's layout is updated.

ItemsSourceCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Method that handles the ObservableCollection.CollectionChanged event for the ItemsSource property.

OnDataPointActualDependentValueChanged ( object sender, RoutedPropertyChangedEventArgs args ) : void

Handles data point actual dependent value property changes.

OnDataPointActualIndependentValueChanged ( object sender, RoutedPropertyChangedEventArgs args ) : void

Handles data point actual independent value property changes.

OnDataPointDependentValueChanged ( object sender, RoutedPropertyChangedEventArgs args ) : void

Handles data point dependent value property changes.

OnDataPointIndependentValueChanged ( object sender, RoutedPropertyChangedEventArgs args ) : void

Handles data point independent value property changes.

OnDataPointIsSelectedChanged ( object sender, RoutedPropertyChangedEventArgs e ) : void

Method executed when a data point is either selected or unselected.

OnDataPointStateChanged ( object sender, RoutedPropertyChangedEventArgs args ) : void

Handles data point state property change.

OnDataPointStylePropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

DataPointStyleProperty property changed handler.

OnIsSelectionEnabledPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

IsSelectionEnabledProperty property changed handler.

OnItemsSourceChanged ( DependencyObject o, DependencyPropertyChangedEventArgs e ) : void

ItemsSourceProperty property changed callback.

OnLegendItemStylePropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

LegendItemStyleProperty property changed handler.

OnSelectedItemPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Called when the value of the SelectedItem property changes.

OnSizeChanged ( object sender, SizeChangedEventArgs e ) : void

Updates the visual appearance of all the data points when the size changes.

Select ( DataPoint dataPoint ) : void

Selects a data point.

StaggeredStateChange ( IEnumerable dataPoints, int dataPointCount, DataPointState newState ) : void

Reveals data points using a storyboard.

Unselect ( DataPoint dataPoint ) : void

Unselects a data point.

Method Details

AddDataPoint() protected method

Adds a data point to the plot area.
protected AddDataPoint ( DataPoint dataPoint ) : void
dataPoint DataPoint The data point to add to the plot area. ///
return void

AddObject() protected method

Adds an object to the series host by creating a corresponding data point for it.
protected AddObject ( object dataContext ) : DataPoint
dataContext object The object to add to the series host.
return DataPoint

AttachEventHandlersToDataPoint() protected method

Attaches event handlers to a data point.
protected AttachEventHandlersToDataPoint ( DataPoint dataPoint ) : void
dataPoint DataPoint The data point.
return void

CreateDataPoint() protected abstract method

Returns a Control suitable for the Series.
protected abstract CreateDataPoint ( ) : DataPoint
return DataPoint

CreateLegendItem() protected method

Creates a legend item.
protected CreateLegendItem ( DataPointSeries owner ) : LegendItem
owner DataPointSeries The owner of the new LegendItem.
return LegendItem

DataPointSeries() protected method

Initializes a new instance of the DataPointSeries class.
protected DataPointSeries ( ) : Controls.DataVisualization.Toolkit
return Controls.DataVisualization.Toolkit

DetachEventHandlersFromDataPoint() protected method

Detaches event handlers from a data point.
protected DetachEventHandlersFromDataPoint ( DataPoint dataPoint ) : void
dataPoint DataPoint The data point.
return void

GetDataPoint() protected method

Retrieves the data point corresponding to the object passed as the parameter.
protected GetDataPoint ( object dataContext ) : DataPoint
dataContext object The data context used for the point. ///
return DataPoint

GetInsertionIndex() protected method

Returns the index at which to insert data point in the plot area child collection.
protected GetInsertionIndex ( DataPoint dataPoint ) : int
dataPoint DataPoint The data point to retrieve the insertion /// index for.
return int

LoadDataPoints() protected method

Updates data points collection with items retrieved from items source and removes the old items.
protected LoadDataPoints ( IEnumerable newItems, IEnumerable oldItems ) : void
newItems IEnumerable The items to load.
oldItems IEnumerable The items to remove.
return void

OnAfterUpdateDataPoints() protected method

This method that executes after data points are updated.
protected OnAfterUpdateDataPoints ( ) : void
return void

OnApplyTemplate() protected method

Attaches handler plot area after loading it from XAML.
protected OnApplyTemplate ( ) : void
return void

OnBeforeUpdateDataPoints() protected method

This method that executes before data points are updated.
protected OnBeforeUpdateDataPoints ( ) : void
return void

OnDataPointActualDependentValueChanged() protected method

Handles data point actual dependent value property change.
protected OnDataPointActualDependentValueChanged ( DataPoint dataPoint, IComparable oldValue, IComparable newValue ) : void
dataPoint DataPoint The data point.
oldValue IComparable The old value.
newValue IComparable The new value.
return void

OnDataPointActualIndependentValueChanged() protected method

Handles data point actual independent value property change.
protected OnDataPointActualIndependentValueChanged ( DataPoint dataPoint, object oldValue, object newValue ) : void
dataPoint DataPoint The data point.
oldValue object The old value.
newValue object The new value.
return void

OnDataPointDependentValueChanged() protected method

Handles data point dependent value property change.
protected OnDataPointDependentValueChanged ( DataPoint dataPoint, IComparable oldValue, IComparable newValue ) : void
dataPoint DataPoint The data point.
oldValue IComparable The old value.
newValue IComparable The new value.
return void

OnDataPointIndependentValueChanged() protected method

Handles data point independent value property change.
protected OnDataPointIndependentValueChanged ( DataPoint dataPoint, object oldValue, object newValue ) : void
dataPoint DataPoint The data point.
oldValue object The old value.
newValue object The new value.
return void

OnDataPointStateChanged() protected method

Handles data point state property change.
protected OnDataPointStateChanged ( DataPoint dataPoint, DataPointState oldValue, DataPointState newValue ) : void
dataPoint DataPoint The data point.
oldValue DataPointState The old value.
newValue DataPointState The new value.
return void

OnDataPointStylePropertyChanged() protected method

DataPointStyleProperty property changed handler.
protected OnDataPointStylePropertyChanged ( Style oldValue, Style newValue ) : void
oldValue Windows.UI.Xaml.Style Old value.
newValue Windows.UI.Xaml.Style New value.
return void

OnDataPointsChanged() protected method

Called after data points have been loaded from the items source.
protected OnDataPointsChanged ( IList newDataPoints, IList oldDataPoints ) : void
newDataPoints IList New active data points.
oldDataPoints IList Old inactive data points.
return void

OnIsSelectionEnabledPropertyChanged() protected method

IsSelectionEnabledProperty property changed handler.
protected OnIsSelectionEnabledPropertyChanged ( bool oldValue, bool newValue ) : void
oldValue bool Old value.
newValue bool New value.
return void

OnItemsSourceChanged() protected method

Called when the ItemsSource property changes.
protected OnItemsSourceChanged ( IEnumerable oldValue, IEnumerable newValue ) : void
oldValue IEnumerable Old value of the ItemsSource property.
newValue IEnumerable New value of the ItemsSource property.
return void

OnItemsSourceCollectionChanged() protected method

Method called when the ItemsSource collection changes.
protected OnItemsSourceCollectionChanged ( IEnumerable collection, NotifyCollectionChangedEventArgs e ) : void
collection IEnumerable New value of the collection.
e System.Collections.Specialized.NotifyCollectionChangedEventArgs Information about the change.
return void

OnLegendItemStylePropertyChanged() protected method

Called when the value of the LegendItemStyle property changes.
protected OnLegendItemStylePropertyChanged ( Style oldValue, Style newValue ) : void
oldValue Windows.UI.Xaml.Style Old value.
newValue Windows.UI.Xaml.Style New value.
return void

OnPlotAreaChanged() protected method

Removes items from the existing plot area and adds items to new plot area.
protected OnPlotAreaChanged ( Panel oldValue, Panel newValue ) : void
oldValue Windows.UI.Xaml.Controls.Panel The previous plot area.
newValue Windows.UI.Xaml.Controls.Panel The new plot area.
return void

OnSelectedItemPropertyChanged() protected method

Called when the value of the SelectedItem property changes.
protected OnSelectedItemPropertyChanged ( object oldValue, object newValue ) : void
oldValue object The old selected index.
newValue object The new value.
return void

OnSeriesHostPropertyChanged() protected method

Handles changes to the SeriesHost property.
protected OnSeriesHostPropertyChanged ( ISeriesHost oldValue, ISeriesHost newValue ) : void
oldValue ISeriesHost Old value.
newValue ISeriesHost New value.
return void

PrepareDataPoint() protected method

Prepares a data point by extracting binding it to a data context object.
protected PrepareDataPoint ( DataPoint dataPoint, object dataContext ) : void
dataPoint DataPoint A data point.
dataContext object A data context object.
return void

Refresh() public method

Refreshes data from data source and renders the series.
public Refresh ( ) : void
return void

RemoveDataPoint() protected method

Removes a data point from the plot area.
protected RemoveDataPoint ( DataPoint dataPoint ) : void
dataPoint DataPoint The data point to remove.
return void

RemoveObject() protected method

Removes an object from the series host by removing its corresponding data point.
protected RemoveObject ( object dataContext ) : DataPoint
dataContext object The object to remove from the series data /// source.
return DataPoint

ShouldCreateDataPoint() protected method

Returns whether a data point should be created for the data context.
protected ShouldCreateDataPoint ( object dataContext ) : bool
dataContext object The data context that will be used for the /// data point.
return bool

UpdateDataPoint() protected abstract method

Updates the visual representation of a single data point in the plot area.
protected abstract UpdateDataPoint ( DataPoint dataPoint ) : void
dataPoint DataPoint The data point to update.
return void

UpdateDataPoints() protected method

Updates the visual representation of all data points in the plot area.
protected UpdateDataPoints ( IEnumerable dataPoints ) : void
dataPoints IEnumerable A sequence of data points to update. ///
return void

Property Details

AnimationSequenceProperty public_oe static_oe property

Identifies the AnimationSequence dependency property.
public static DependencyProperty,Windows.UI.Xaml AnimationSequenceProperty
return Windows.UI.Xaml.DependencyProperty

DataPointStyleProperty public_oe static_oe property

Identifies the DataPointStyle dependency property.
public static DependencyProperty,Windows.UI.Xaml DataPointStyleProperty
return Windows.UI.Xaml.DependencyProperty

IsSelectionEnabledProperty public_oe static_oe property

Identifies the IsSelectionEnabled dependency property.
public static DependencyProperty,Windows.UI.Xaml IsSelectionEnabledProperty
return Windows.UI.Xaml.DependencyProperty

ItemsSourceProperty public_oe static_oe property

Identifies the ItemsSource dependency property.
public static DependencyProperty,Windows.UI.Xaml ItemsSourceProperty
return Windows.UI.Xaml.DependencyProperty

LegendItemStyleProperty public_oe static_oe property

Identifies the LegendItemStyle dependency property.
public static DependencyProperty,Windows.UI.Xaml LegendItemStyleProperty
return Windows.UI.Xaml.DependencyProperty

SelectedItemProperty public_oe static_oe property

Identifies the SelectedItem dependency property.
public static DependencyProperty,Windows.UI.Xaml SelectedItemProperty
return Windows.UI.Xaml.DependencyProperty

TransitionDurationProperty public_oe static_oe property

Identifies the TransitionDuration dependency property.
public static DependencyProperty,Windows.UI.Xaml TransitionDurationProperty
return Windows.UI.Xaml.DependencyProperty

TransitionEasingFunctionProperty public_oe static_oe property

Identifies the TransitionEasingFunction dependency property.
public static DependencyProperty,Windows.UI.Xaml TransitionEasingFunctionProperty
return Windows.UI.Xaml.DependencyProperty