LegendModifier
Defines a custom chart modifier to provide info for the LegendTemplate
Inherits: InspectSeriesModifierBase
Constructors
public LegendModifier()
legendModifier = LegendModifier()
Initializes a new instance of the LegendModifier class.
Properties
public SourceMode GetLegendDataFor { get; set; }
value = legendModifier.GetLegendDataFor
legendModifier.GetLegendDataFor = value
Gets or sets an enumeration constant defining which series to interrogate for the legend data source
public ChartDataObject LegendData { get; set; }
value = legendModifier.LegendData
legendModifier.LegendData = value
The LegendData object provides a collection of SeriesInfo which can be bound to in ItemsControls or UltrachartLegend control.
public DataTemplate LegendItemTemplate { get; set; }
value = legendModifier.LegendItemTemplate
legendModifier.LegendItemTemplate = value
Gets or sets the Legend Item Template, which provides UI that binds to a single SeriesInfo instance.
public LegendPlacement LegendPlacement { get; set; }
value = legendModifier.LegendPlacement
legendModifier.LegendPlacement = value
Used in combination with ShowLegend = true. Defines the placement of the auto-generated legend
public ControlTemplate LegendTemplate { get; set; }
value = legendModifier.LegendTemplate
legendModifier.LegendTemplate = value
Used in combination with ShowLegend = true. An optional control template for the auto-generated UltrachartLegend control
public Orientation Orientation { get; set; }
value = legendModifier.Orientation
legendModifier.Orientation = value
Gets or sets the Orientation of the Legend Items, e.g. Vertical, or Horizontal
public bool ShowLegend { get; set; }
value = legendModifier.ShowLegend
legendModifier.ShowLegend = value
If true, then the LegendModifier automatically shows and hosts a UltrachartLegend inside the chart surface, according to LegendPlacement. If false, then the user may provide an alternative legend control
public bool ShowSeriesMarkers { get; set; }
value = legendModifier.ShowSeriesMarkers
legendModifier.ShowSeriesMarkers = value
Used in combination with ShowLegend = true. If true, shows the Series Markers in the automatically generated legend
public bool ShowVisibilityCheckboxes { get; set; }
value = legendModifier.ShowVisibilityCheckboxes
legendModifier.ShowVisibilityCheckboxes = value
Used in combination with ShowLegend = true. If true, shows the Visibility Checkboxes in the automatically generated legend.
Methods
protected override void ClearAll()
legendModifier.ClearAll()
When overriden in a derived class, this method should clear all markers and tooltips from the ModifierSurface
protected virtual ObservableCollection<SeriesInfo> GetSeriesInfo(IEnumerable<IRenderableSeries> allSeries)
result = legendModifier.GetSeriesInfo(allSeries)
Gets the SeriesInfo for all the RenderableSeries passed in
- allSeries
protected override void HandleMasterMouseEvent(Point mousePoint)
legendModifier.HandleMasterMouseEvent(mousePoint)
When overriden in a derived class, called to handle the Master ChartModifierBase MouseMove event
- mousePoint
- The current Mouse-point
protected override void HandleSlaveMouseEvent(Point mousePoint)
legendModifier.HandleSlaveMouseEvent(mousePoint)
When overriden in a derived class, called to handle the Slave ChartModifierBase MouseMove event
- mousePoint
- The current Mouse-point
public override void OnAttached()
legendModifier.OnAttached()
Called when the element is attached to the Chart Surface
public override void OnDetached()
legendModifier.OnDetached()
Called immediately before the element is detached from the Chart Surface
public override void OnModifierMouseMove(ModifierMouseArgs e)
legendModifier.OnModifierMouseMove(e)
Called when the Mouse is moved on the parent UltrachartSurface
- e
- Arguments detailing the mouse move operation
public override void OnParentSurfaceRendered(UltrachartRenderedMessage e)
legendModifier.OnParentSurfaceRendered(e)
Called when the parent UltrachartSurface is rendered
- e
- The UltrachartRenderedMessage which contains the event arg data
public virtual void UpdateLegend()
legendModifier.UpdateLegend()
Refreshes the legend with up-to-date SeriesInfo with series names, latest values
private static void UpdateSeriesInfo(SeriesInfo oldSeriesInfo, SeriesInfo newSeriesInfo)
LegendModifier.UpdateSeriesInfo(oldSeriesInfo, newSeriesInfo)
Does a replace of the data on the OldSeriesInfo instance with data from NewSeriesInfo
- oldSeriesInfo
- newSeriesInfo
Fields
public static readonly DependencyProperty GetLegendDataForProperty
value = LegendModifier.GetLegendDataForProperty
Defines the GetLegendDataFor DependencyProperty
public static readonly DependencyProperty LegendDataProperty
value = LegendModifier.LegendDataProperty
Defines the LegendData DependencyProperty
public static readonly DependencyProperty LegendItemTemplateProperty
value = LegendModifier.LegendItemTemplateProperty
Defines the LegendTemplate DependencyProperty
public static readonly DependencyProperty LegendPlacementProperty
value = LegendModifier.LegendPlacementProperty
Defines the LegendPlacement DependencyProperty
public static readonly DependencyProperty LegendTemplateProperty
value = LegendModifier.LegendTemplateProperty
Defines the UltrachartLegend DependencyProperty
public static readonly DependencyProperty OrientationProperty
value = LegendModifier.OrientationProperty
Defines the LegendOrientation DependencyProperty
public static readonly DependencyProperty ShowLegendProperty
value = LegendModifier.ShowLegendProperty
Defines the ShowLegend DependencyProperty
public static readonly DependencyProperty ShowSeriesMarkersProperty
value = LegendModifier.ShowSeriesMarkersProperty
Defines the ShowSeriesMarkers DependencyProperty
public static readonly DependencyProperty ShowVisibilityCheckboxesProperty
value = LegendModifier.ShowVisibilityCheckboxesProperty
Defines the ShowVisibilityCheckboxes DependencyProperty