8249 lines
213 KiB
C#
8249 lines
213 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Drawing.Drawing2D;
|
|
using System.Drawing.Text;
|
|
using System.Runtime.InteropServices;
|
|
using System.Windows.Forms;
|
|
using DevComponents.Charts.TextMarkup;
|
|
using DevComponents.DotNetBar.Charts.Style;
|
|
|
|
namespace DevComponents.DotNetBar.Charts
|
|
{
|
|
/// <summary>
|
|
/// Represents a Chart Control
|
|
/// </summary>
|
|
[ToolboxItem(true), ToolboxBitmap(typeof(ChartControl), "ChartControl.ico")]
|
|
[Designer("DevComponents.Charts.Design.ChartControlDesigner, DevComponents.Charts.Design, Version=14.1.0.37, Culture=neutral, PublicKeyToken=90f470f34c89ccaf")]
|
|
public class ChartControl : Control, INotifyPropertyChanged, IMessageFilter
|
|
{
|
|
#region Events
|
|
|
|
#region DataBindingStart
|
|
|
|
/// <summary>
|
|
/// Occurs when the Chart is about to start a binding operation
|
|
/// </summary>
|
|
[Description("Occurs when the Chart is about to start a binding operation.")]
|
|
public event EventHandler<ChartDataBindingStartEventArgs> DataBindingStart;
|
|
|
|
#endregion
|
|
|
|
#region ChartDataBindingComplete
|
|
|
|
/// <summary>
|
|
/// Occurs when a Chart data binding operation is completed
|
|
/// </summary>
|
|
[Description("Occurs when a Chart data binding operation is completed.")]
|
|
public event EventHandler<ChartDataBindingCompleteEventArgs> ChartDataBindingComplete;
|
|
|
|
#endregion
|
|
|
|
#region ChartMatrixResized
|
|
|
|
/// <summary>
|
|
/// Occurs when a ChartMatrix has been resized.
|
|
/// </summary>
|
|
[Description("Occurs when a ChartMatrix has been resized.")]
|
|
public event EventHandler<ChartMatrixResizedEventArgs> ChartMatrixResized;
|
|
|
|
#endregion
|
|
|
|
#region CompareElements
|
|
|
|
/// <summary>
|
|
/// Occurs when the chart needs to compare 1 element with another
|
|
/// </summary>
|
|
[Description("Occurs when the chart needs to compare 1 element with another.")]
|
|
public event EventHandler<ChartCompareElementsEventArgs> CompareElements;
|
|
|
|
#endregion
|
|
|
|
#region EmptyTextMarkupLinkClick
|
|
|
|
/// <summary>
|
|
/// Occurs when a ChartContainer's EmptyText MarkupLink has been clicked
|
|
/// </summary>
|
|
[Description("Occurs when a ChartContainer's EmptyText MarkupLink has been clicked.")]
|
|
public event EventHandler<ChartEmptyTextMarkupLinkClickEventArgs> EmptyTextMarkupLinkClick;
|
|
|
|
#endregion
|
|
|
|
#region GetPieCenterLabel
|
|
|
|
/// <summary>
|
|
/// Occurs when a Pie Center label is needed
|
|
/// </summary>
|
|
[Description("Occurs when a Pie Center label is needed.")]
|
|
public event EventHandler<GetPieCenterLabelEventArgs> GetPieCenterLabel;
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairAxisLabel
|
|
|
|
/// <summary>
|
|
/// Occurs when a Crosshair Axis label is needed
|
|
/// </summary>
|
|
[Description("Occurs when a Crosshair Axis label is needed.")]
|
|
public event EventHandler<GetCrosshairAxisLabelEventArgs> GetCrosshairAxisLabel;
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairLabelHeader
|
|
|
|
/// <summary>
|
|
/// Occurs when a CrosshairLabel header is needed
|
|
/// </summary>
|
|
[Description("Occurs when a CrosshairLabel header is needed.")]
|
|
public event EventHandler<GetCrosshairLabelHeaderEventArgs> GetCrosshairLabelHeader;
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairLabelItem
|
|
|
|
/// <summary>
|
|
/// Occurs when a CrosshairLabel item (text) is needed
|
|
/// </summary>
|
|
[Description("Occurs when a CrosshairLabel item (text) is needed.")]
|
|
public event EventHandler<GetCrosshairLabelItemEventArgs> GetCrosshairLabelItem;
|
|
|
|
#endregion
|
|
|
|
#region GetSliceLabel
|
|
|
|
/// <summary>
|
|
/// Occurs when a Pie Slice label (text) is needed
|
|
/// </summary>
|
|
[Description("Occurs when a Pie Slice label (text) is needed.")]
|
|
public event EventHandler<GetSliceLabelEventArgs> GetSliceLabel;
|
|
|
|
#endregion
|
|
|
|
#region GetTickmarkLabel
|
|
|
|
/// <summary>
|
|
/// Occurs when a MajorTickmark label (text and color) is needed
|
|
/// </summary>
|
|
[Description("Occurs when a MajorTickmark label (text and color) is needed.")]
|
|
public event EventHandler<GetTickmarkLabelEventArgs> GetTickmarkLabel;
|
|
|
|
#endregion
|
|
|
|
#region GetToolTip
|
|
|
|
/// <summary>
|
|
/// Occurs when a Pie SeriesPoint ToolTip is needed
|
|
/// </summary>
|
|
[Description("Occurs when a Pie SeriesPoint ToolTip is needed.")]
|
|
public event EventHandler<GetToolTipEventArgs> GetToolTip;
|
|
|
|
#endregion
|
|
|
|
#region GetElementStyle
|
|
|
|
/// <summary>
|
|
/// Occurs when a ChartElement Style is needed.
|
|
/// </summary>
|
|
[Description("Occurs when a ChartElement Style is needed.")]
|
|
public event EventHandler<ChartGetElementStyleEventArgs> GetElementStyle;
|
|
|
|
#endregion
|
|
|
|
#region GetPieSeriesPointStyle
|
|
|
|
/// <summary>
|
|
/// Occurs when a PieSeriesPoint Style is needed.
|
|
/// </summary>
|
|
[Description("Occurs when a PieSeriesPoint Style is needed.")]
|
|
public event EventHandler<ChartGetPieSeriesPointStyleEventArgs> GetPieSeriesPointStyle;
|
|
|
|
#endregion
|
|
|
|
#region LayoutBoundsInvalid
|
|
|
|
/// <summary>
|
|
/// Occurs when layout bounds of the item is invalidated.
|
|
/// </summary>
|
|
public event EventHandler<EventArgs> LayoutBoundsInvalid;
|
|
|
|
#endregion
|
|
|
|
#region LegendItemCheckedChanged
|
|
|
|
/// <summary>
|
|
/// Occurs when a LegendItem checked state has changed
|
|
/// </summary>
|
|
[Description("Occurs when a LegendItem checked state has changed.")]
|
|
public event EventHandler<LegendItemCheckedChangedEventArgs> LegendItemCheckedChanged;
|
|
|
|
#endregion
|
|
|
|
#region ChartMouseClick
|
|
|
|
/// <summary>
|
|
/// Occurs when a single click has ocurred on a chart Pie element.
|
|
/// </summary>
|
|
[Description("Occurs when a single click has ocurred on a chart Pie element.")]
|
|
public event EventHandler<ChartMouseClickEventArgs> ChartMouseClick;
|
|
|
|
#endregion
|
|
|
|
#region ChartMouseDoubleClick
|
|
|
|
/// <summary>
|
|
/// Occurs when a double click has ocurred on a chart Pie element.
|
|
/// </summary>
|
|
[Description("Occurs when a double click has ocurred on a chart Pie element.")]
|
|
public event EventHandler<ChartMouseDoubleClickEventArgs> ChartMouseDoubleClick;
|
|
|
|
#endregion
|
|
|
|
#region PieCenterMarkupLinkClick
|
|
|
|
/// <summary>
|
|
/// Occurs after a pie center MarkupLink has been clicked.
|
|
/// </summary>
|
|
[Description("Occurs after a pie center MarkupLink has been clicked.")]
|
|
public event EventHandler<PieCenterMarkupLinkClickEventArgs> PieCenterMarkupLinkClick;
|
|
|
|
#endregion
|
|
|
|
#region PieDetachChanged
|
|
|
|
/// <summary>
|
|
/// Occurs after a pie element detach was performed by the user.
|
|
/// </summary>
|
|
[Description("Occurs after a pie element detach was performed by the user.")]
|
|
public event EventHandler<PieDetachChangedEventArgs> PieDetachChanged;
|
|
|
|
#endregion
|
|
|
|
#region PieExplodeChanged
|
|
|
|
/// <summary>
|
|
/// Occurs after a pie explode operation was performed by the user.
|
|
/// </summary>
|
|
[Description("Occurs after a pie explode operation was performed by the user.")]
|
|
public event EventHandler<PieExplodeChangedEventArgs> PieExplodeChanged;
|
|
|
|
#endregion
|
|
|
|
#region PieRingLevelChanged
|
|
|
|
/// <summary>
|
|
/// Occurs after a ring level change, as initiated
|
|
/// by the user, has taken place.
|
|
/// </summary>
|
|
[Description("Occurs after a ring level change, as initiated by the user, has taken place.")]
|
|
public event EventHandler<PieRingLevelChangedEventArgs> PieRingLevelChanged;
|
|
|
|
#endregion
|
|
|
|
#region PieRingLevelChanging
|
|
|
|
/// <summary>
|
|
/// Occurs after a user has initiated a ring level change, but
|
|
/// before the actual change has taken place.
|
|
/// </summary>
|
|
[Description("Occurs after a user has initiated a ring level change, but before the actual change has taken place.")]
|
|
public event EventHandler<PieRingLevelChangingEventArgs> PieRingLevelChanging;
|
|
|
|
#endregion
|
|
|
|
#region PieSelectionChanged
|
|
|
|
/// <summary>
|
|
/// Occurs after a pie selection was performed by the user.
|
|
/// </summary>
|
|
[Description("Occurs after a pie selection was performed by the user.")]
|
|
public event EventHandler<PieSelectionChangedEventArgs> PieSelectionChanged;
|
|
|
|
#endregion
|
|
|
|
#region PointLabelUpdate
|
|
|
|
/// <summary>
|
|
/// Occurs when a PointLabel update is needed.
|
|
/// </summary>
|
|
[Description("Occurs when a PointLabel update is needed.")]
|
|
public event EventHandler<ChartPointLabelUpdateEventArgs> PointLabelUpdate;
|
|
|
|
#endregion
|
|
|
|
#region PostLoadLegendData
|
|
|
|
/// <summary>
|
|
/// Occurs after a Legend's data has been loaded.
|
|
/// </summary>
|
|
[Description("Occurs after a Legend's data has been loaded.")]
|
|
public event EventHandler<PostLoadLegendDataEventArgs> PostLoadLegendData;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderContentBackground
|
|
|
|
/// <summary>
|
|
/// Occurs after a chart content area has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after a chart content area has been rendered.")]
|
|
public event EventHandler<PostRenderContentBackgroundEventArgs> PostRenderContentBackground;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderFrameBackground
|
|
|
|
/// <summary>
|
|
/// Occurs after a chart Frame area has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after a chart Frame area has been rendered.")]
|
|
public event EventHandler<PostRenderFrameBackgroundEventArgs> PostRenderFrameBackground;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPanelBackground
|
|
|
|
/// <summary>
|
|
/// Occurs after a chart Panel area has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after a chart Panel area has been rendered.")]
|
|
public event EventHandler<PostRenderPanelBackgroundEventArgs> PostRenderPanelBackground;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPieCenterBackground
|
|
|
|
/// <summary>
|
|
/// Occurs after the pie center background has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after the pie center background has been rendered.")]
|
|
public event EventHandler<PostRenderPieCenterBackgroundEventArgs> PostRenderPieCenterBackground;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPieCenterContent
|
|
|
|
/// <summary>
|
|
/// Occurs after the pie center content has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after the pie center content has been rendered.")]
|
|
public event EventHandler<PostRenderPieCenterContentEventArgs> PostRenderPieCenterContent;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPointConnector
|
|
|
|
/// <summary>
|
|
/// Occurs after a PointConnector has been rendered
|
|
/// </summary>
|
|
[Description("Occurs after a PointConnector has been rendered.")]
|
|
public event EventHandler<PostRenderPointConnectorEventArgs> PostRenderPointConnector;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPointLabel
|
|
|
|
/// <summary>
|
|
/// Occurs after a PointLabel has been rendered
|
|
/// </summary>
|
|
[Description("Occurs after a PointLabel has been rendered.")]
|
|
public event EventHandler<PostRenderPointLabelEventArgs> PostRenderPointLabel;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderRadialGrid
|
|
|
|
/// <summary>
|
|
/// Occurs after a radial grid has been rendered
|
|
/// </summary>
|
|
[Description("Occurs after a radial grid has been rendered.")]
|
|
public event EventHandler<PostRenderRadialGridEventArgs> PostRenderRadialGrid;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesBar
|
|
|
|
/// <summary>
|
|
/// Occurs after a series bar has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after a series bar has been rendered.")]
|
|
public event EventHandler<PostRenderSeriesBarEventArgs> PostRenderSeriesBar;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesHiLoBar
|
|
|
|
/// <summary>
|
|
/// Occurs after a series HiLo Bar segment has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after a series HiLo Bar segment has been rendered.")]
|
|
public event EventHandler<PostRenderSeriesHiLoBarEventArgs> PostRenderSeriesHiLoBar;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesPoint
|
|
|
|
/// <summary>
|
|
/// Occurs after a series point has been rendered
|
|
/// </summary>
|
|
[Description("Occurs after a series point has been rendered.")]
|
|
public event EventHandler<PostRenderSeriesPointEventArgs> PostRenderSeriesPoint;
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSlice
|
|
|
|
/// <summary>
|
|
/// Occurs after the pie slice area has been rendered.
|
|
/// </summary>
|
|
[Description("Occurs after the pie slice area has been rendered.")]
|
|
public event EventHandler<PostRenderSliceEventArgs> PostRenderSlice;
|
|
|
|
#endregion
|
|
|
|
#region PreLoadLegendData
|
|
|
|
/// <summary>
|
|
/// Occurs prior to a Legend's data being loaded.
|
|
/// </summary>
|
|
[Description("Occurs prior to a Legend's data being loaded.")]
|
|
public event EventHandler<PreLoadLegendDataEventArgs> PreLoadLegendData;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderContentBackground
|
|
|
|
/// <summary>
|
|
/// Occurs prior to the chart Content area being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to the chart Content area being rendered.")]
|
|
public event EventHandler<PreRenderContentBackgroundEventArgs> PreRenderContentBackground;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderFrameBackground
|
|
|
|
/// <summary>
|
|
/// Occurs prior to the chart Frame area being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to the chart Frame area being rendered.")]
|
|
public event EventHandler<PreRenderFrameBackgroundEventArgs> PreRenderFrameBackground;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPanelBackground
|
|
|
|
/// <summary>
|
|
/// Occurs prior to the chart Panel area being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to the chart Panel area being rendered.")]
|
|
public event EventHandler<PreRenderPanelBackgroundEventArgs> PreRenderPanelBackground;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPieCenterBackground
|
|
|
|
/// <summary>
|
|
/// Occurs prior to the pie center background being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to the pie center background being rendered.")]
|
|
public event EventHandler<PreRenderPieCenterBackgroundEventArgs> PreRenderPieCenterBackground;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPieCenterContent
|
|
|
|
/// <summary>
|
|
/// Occurs prior to the pie center content being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to the pie center content being rendered.")]
|
|
public event EventHandler<PreRenderPieCenterContentEventArgs> PreRenderPieCenterContent;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPointConnector
|
|
|
|
/// <summary>
|
|
/// Occurs prior to a PointConnector being rendered
|
|
/// </summary>
|
|
[Description("Occurs prior to a PointConnector being rendered.")]
|
|
public event EventHandler<PreRenderPointConnectorEventArgs> PreRenderPointConnector;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPointLabel
|
|
|
|
/// <summary>
|
|
/// Occurs prior to a PointLabel being rendered
|
|
/// </summary>
|
|
[Description("Occurs prior to a PointLabel being rendered.")]
|
|
public event EventHandler<PreRenderPointLabelEventArgs> PreRenderPointLabel;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderRadialGrid
|
|
|
|
/// <summary>
|
|
/// Occurs prior to a radial (circular) grid being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to a radial (circular) grid being rendered.")]
|
|
public event EventHandler<PreRenderRadialGridEventArgs> PreRenderRadialGrid;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesBar
|
|
|
|
/// <summary>
|
|
/// Occurs prior to a series bar being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to a series bar being rendered.")]
|
|
public event EventHandler<PreRenderSeriesBarEventArgs> PreRenderSeriesBar;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesHiLoBar
|
|
|
|
/// <summary>
|
|
/// Occurs prior to a series HiLo Bar segment being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to a series HiLo Bar segment being rendered.")]
|
|
public event EventHandler<PreRenderSeriesHiLoBarEventArgs> PreRenderSeriesHiLoBar;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesPoint
|
|
|
|
/// <summary>
|
|
/// Occurs prior to a series point being rendered
|
|
/// </summary>
|
|
[Description("Occurs prior to a series point being rendered.")]
|
|
public event EventHandler<PreRenderSeriesPointEventArgs> PreRenderSeriesPoint;
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSlice
|
|
|
|
/// <summary>
|
|
/// Occurs prior to the pie slice area being rendered.
|
|
/// </summary>
|
|
[Description("Occurs prior to the pie slice area being rendered.")]
|
|
public event EventHandler<PreRenderSliceEventArgs> PreRenderSlice;
|
|
|
|
#endregion
|
|
|
|
#region ReferenceLineMarkupLinkClick
|
|
|
|
/// <summary>
|
|
/// Occurs when a ReferenceLine MarkupLink has been clicked
|
|
/// </summary>
|
|
[Description("Occurs when a ReferenceLine MarkupLink has been clicked.")]
|
|
public event EventHandler<ReferenceLineMarkupLinkClickEventArgs> ReferenceLineMarkupLinkClick;
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairCallout
|
|
|
|
/// <summary>
|
|
/// Occurs when a Crosshair Callout (enclosing "border") needs to be rendered
|
|
/// </summary>
|
|
[Description("Occurs when a Crosshair Callout (enclosing border) needs to be rendered.")]
|
|
public event EventHandler<RenderCrosshairCalloutEventArgs> RenderCrosshairCallout;
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairLabel
|
|
|
|
/// <summary>
|
|
/// Occurs when a CrosshairLabel needs to be rendered
|
|
/// </summary>
|
|
[Description("Occurs when a CrosshairLabel needs to be rendered.")]
|
|
public event EventHandler<RenderCrosshairLabelEventArgs> RenderCrosshairLabel;
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairLabelItem
|
|
|
|
/// <summary>
|
|
/// Occurs when an individual CrosshairLabel item needs to be rendered
|
|
/// </summary>
|
|
[Description("Occurs when an individual CrosshairLabel item needs to be rendered.")]
|
|
public event EventHandler<RenderCrosshairLabelItemEventArgs> RenderCrosshairLabelItem;
|
|
|
|
#endregion
|
|
|
|
#region RenderPieRingOut
|
|
|
|
/// <summary>
|
|
/// Occurs when the pie center 'ring-out' indicator needs to be rendered.
|
|
/// </summary>
|
|
[Description("Occurs when the pie center 'ring-out' indicator needs to be rendered.")]
|
|
public event EventHandler<RenderPieRingOutEventArgs> RenderPieRingOut;
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceCenterLine
|
|
|
|
/// <summary>
|
|
/// Occurs when a pie slice center line needs to be rendered.
|
|
/// </summary>
|
|
[Description("Occurs when a pie slice center line needs to be rendered.")]
|
|
public event EventHandler<RenderSliceCenterLineEventArgs> RenderSliceCenterLine;
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceInnerLabel
|
|
|
|
/// <summary>
|
|
/// Occurs when a slice inner label needs to be rendered.
|
|
/// </summary>
|
|
[Description("Occurs when a slice inner label needs to be rendered.")]
|
|
public event EventHandler<RenderSliceInnerLabelEventArgs> RenderSliceInnerLabel;
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceOuterLabel
|
|
|
|
/// <summary>
|
|
/// Occurs when a slice outer label needs to be rendered.
|
|
/// </summary>
|
|
[Description("Occurs when a slice outer label needs to be rendered.")]
|
|
public event EventHandler<RenderSliceOuterLabelEventArgs> RenderSliceOuterLabel;
|
|
|
|
#endregion
|
|
|
|
#region Scroll
|
|
|
|
/// <summary>
|
|
/// Occurs when the Horizontal or Vertical scrollbar has been scrolled
|
|
/// </summary>
|
|
[Description("Occurs when the Horizontal or Vertical scrollbar has been scrolled.")]
|
|
public event EventHandler<ChartScrollEventArgs> Scroll;
|
|
|
|
#endregion
|
|
|
|
#region ScrollMin
|
|
|
|
/// <summary>
|
|
/// Occurs when the Horizontal or Vertical
|
|
/// scrollbar has been scrolled to the Minimum and released
|
|
/// </summary>
|
|
[Description("Occurs when the Horizontal or Vertical scrollbar has been scrolled to the Minimum and released.")]
|
|
public event EventHandler<ChartScrollEventArgs> ScrollMin;
|
|
|
|
#endregion
|
|
|
|
#region ScrollMax
|
|
|
|
/// <summary>
|
|
/// Occurs when the Horizontal or Vertical scrollbar has been scrolled to the Maximum and released
|
|
/// </summary>
|
|
[Description("Occurs when the Horizontal or Vertical scrollbar has been scrolled to the Maximum and released.")]
|
|
public event EventHandler<ChartScrollEventArgs> ScrollMax;
|
|
|
|
#endregion
|
|
|
|
#region SelectionChanged
|
|
|
|
/// <summary>
|
|
/// Occurs when a visual item's selected state has changed
|
|
/// </summary>
|
|
[Description("Occurs when a visual item's selected state has changed.")]
|
|
public event EventHandler<SelectionChangedEventArgs> SelectionChanged;
|
|
|
|
#endregion
|
|
|
|
#region SeriesDataBindingComplete
|
|
|
|
/// <summary>
|
|
/// Occurs when a ChartSeries data binding operation is completed
|
|
/// </summary>
|
|
[Description("Occurs when a ChartSeries data binding operation is completed.")]
|
|
public event EventHandler<SeriesDataBindingCompleteEventArgs> SeriesDataBindingComplete;
|
|
|
|
#endregion
|
|
|
|
#region StyleManagerChanged
|
|
|
|
/// <summary>
|
|
/// Occurs when the StyleManager style has changed
|
|
/// </summary>
|
|
[Description("Occurs when the StyleManager style has changed.")]
|
|
public event EventHandler<EventArgs> StyleManagerChanged;
|
|
|
|
#endregion
|
|
|
|
#region TitleMarkupLinkClick
|
|
|
|
/// <summary>
|
|
/// Occurs when a title MarkupLink has been clicked
|
|
/// </summary>
|
|
[Description("Occurs when a title MarkupLink has been clicked.")]
|
|
public event EventHandler<ChartTitleMarkupLinkClickEventArgs> TitleMarkupLinkClick;
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Dll imports
|
|
|
|
private const int WmMouseWheel = 0x20a;
|
|
|
|
[DllImport("user32.dll")]
|
|
private static extern IntPtr WindowFromPoint(Point pt);
|
|
|
|
[DllImport("user32.dll")]
|
|
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
|
|
|
|
#endregion
|
|
|
|
#region Private variables
|
|
|
|
private States _States;
|
|
|
|
private ChartPanel _ChartPanel;
|
|
|
|
private object _DataSource;
|
|
private string _DataMember;
|
|
private DataBinder _DataBinder;
|
|
|
|
private DefaultVisualStyles _BaseVisualStyles;
|
|
private DefaultVisualStyles _DefaultVisualStyles;
|
|
|
|
private ushort _BeginUpdateCount;
|
|
private ushort _GlobalUpdateCount;
|
|
private ushort _BoundsUpdateCount;
|
|
|
|
private bool _InUpdateLayout;
|
|
private bool _LayoutValid;
|
|
private ChartVisualElement _LayoutBoundsItem;
|
|
|
|
private Cursor _ChartCursor;
|
|
private Cursor _DefaultCursor = Cursors.Default;
|
|
private bool _SetChartCursor;
|
|
|
|
private ChartVisualElement _CapturedItem;
|
|
private ChartVisualElement _MouseOverElement;
|
|
|
|
private bool _PostInternalUpdate;
|
|
private int _SelectionUpdateCount;
|
|
private bool _InPostUpdate;
|
|
|
|
private System.Windows.Forms.ToolTip _ToolTip;
|
|
private string _ToolTipText;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the ChartControl class.
|
|
/// </summary>
|
|
public ChartControl()
|
|
{
|
|
SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint |
|
|
ControlStyles.Opaque | ControlStyles.ResizeRedraw |
|
|
ControlStyles.OptimizedDoubleBuffer | ControlStyles.SupportsTransparentBackColor, true);
|
|
|
|
InitDefaultStates();
|
|
|
|
UpdateChartStyle();
|
|
|
|
if (DesignMode == false)
|
|
Application.AddMessageFilter(this);
|
|
|
|
StyleManager.Register(this);
|
|
}
|
|
|
|
#region DefaultSize
|
|
|
|
protected override Size DefaultSize
|
|
{
|
|
get { return new Size(250, 250); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ScaleControl
|
|
|
|
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
|
|
{
|
|
Dpi.SetScaling(factor);
|
|
|
|
base.ScaleControl(factor, specified);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Scale
|
|
|
|
/// <summary>
|
|
/// Scales the ChartControl based upon the
|
|
/// parent form AutoScaleDimensions.
|
|
/// </summary>
|
|
/// <param name="form"></param>
|
|
public void Scale(Form form)
|
|
{
|
|
if (form != null)
|
|
{
|
|
SizeF factor = new SizeF(
|
|
form.AutoScaleDimensions.Width / 96F,
|
|
form.AutoScaleDimensions.Height / 96F);
|
|
|
|
Scale(factor);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region InitDefaultStates
|
|
|
|
private void InitDefaultStates()
|
|
{
|
|
//SetState(States.AllowEdit, true);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Public properties
|
|
|
|
#region BaseVisualStyles
|
|
|
|
///<summary>
|
|
/// BaseVisualStyles - the ChartControl starting base styles
|
|
///</summary>
|
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
public DefaultVisualStyles BaseVisualStyles
|
|
{
|
|
get { return (_BaseVisualStyles); }
|
|
internal set { _BaseVisualStyles = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartCursor
|
|
|
|
///<summary>
|
|
/// Gets or sets the logical Chart cursor
|
|
///</summary>
|
|
[Browsable(false)]
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
public Cursor ChartCursor
|
|
{
|
|
get { return (_ChartCursor); }
|
|
|
|
set
|
|
{
|
|
if (value == null || value == Cursors.Default)
|
|
_ChartCursor = _DefaultCursor;
|
|
else
|
|
_ChartCursor = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartPanel
|
|
|
|
/// <summary>
|
|
/// Gets or sets the base Chart Panel for the Chart (contains Chart Graphs and additional Chart Panels)
|
|
/// </summary>
|
|
[Category("Appearance")]
|
|
[Description("Indicates the base Chart Panel for the Chart (contains Chart Graphs and additional Chart Panels.")]
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
|
public ChartPanel ChartPanel
|
|
{
|
|
get
|
|
{
|
|
if (_ChartPanel == null)
|
|
{
|
|
_ChartPanel = new ChartPanel("PrimaryPanel");
|
|
|
|
_ChartPanel.ChartControl = this;
|
|
_ChartPanel.PropertyChanged += ChartPanelPropertyChanged;
|
|
}
|
|
|
|
return (_ChartPanel);
|
|
}
|
|
|
|
set
|
|
{
|
|
if (_ChartPanel != null)
|
|
_ChartPanel.PropertyChanged -= ChartPanelPropertyChanged;
|
|
|
|
_ChartPanel = value;
|
|
|
|
if (value != null)
|
|
{
|
|
_ChartPanel.ChartControl = this;
|
|
_ChartPanel.PropertyChanged += ChartPanelPropertyChanged;
|
|
}
|
|
|
|
OnPropertyChangedEx("ChartPanel", VisualChangeType.Layout);
|
|
|
|
LayoutValid = false;
|
|
}
|
|
}
|
|
|
|
#region ChartPanelPropertyChanged
|
|
|
|
void ChartPanelPropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region DataMember
|
|
|
|
///<summary>
|
|
/// Gets or sets the name of the list or table
|
|
/// in the data source that the Chart is bound to.
|
|
///</summary>
|
|
[DefaultValue(null), Category("Data")]
|
|
[Description("Indicates the name of the list or table in the data source that the Chart is bound to.")]
|
|
public string DataMember
|
|
{
|
|
get { return (_DataMember); }
|
|
|
|
set
|
|
{
|
|
if (_DataBinder != null)
|
|
_DataBinder.Clear();
|
|
|
|
_DataMember = value;
|
|
|
|
OnPropertyChangedEx("DataMember", VisualChangeType.Layout);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DataSource
|
|
|
|
///<summary>
|
|
/// Gets or sets the data source that the Chart is bound to
|
|
///</summary>
|
|
[DefaultValue(null), AttributeProvider(typeof(IListSource)), Category("Data")]
|
|
[Description("Indicates the data source that the Chart is bound to.")]
|
|
public object DataSource
|
|
{
|
|
get { return (_DataSource); }
|
|
|
|
set
|
|
{
|
|
if (_DataBinder != null)
|
|
_DataBinder.Clear();
|
|
|
|
_DataSource = value;
|
|
|
|
OnPropertyChangedEx("DataSource", VisualChangeType.Layout);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DefaultVisualStyles
|
|
|
|
///<summary>
|
|
/// Gets or sets the Default Visual Styles for each Chart element
|
|
///</summary>
|
|
[Browsable(true), Category("Style")]
|
|
[Description("Gets or sets the Default Visual Styles for the each Invalidate element.")]
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
|
public DefaultVisualStyles DefaultVisualStyles
|
|
{
|
|
get
|
|
{
|
|
if (_DefaultVisualStyles == null)
|
|
{
|
|
_DefaultVisualStyles = new DefaultVisualStyles();
|
|
|
|
DefaultVisualChangeHandler(null, _DefaultVisualStyles);
|
|
}
|
|
|
|
return (_DefaultVisualStyles);
|
|
}
|
|
|
|
set
|
|
{
|
|
if (_DefaultVisualStyles != value)
|
|
{
|
|
DefaultVisualStyles oldValue = _DefaultVisualStyles;
|
|
_DefaultVisualStyles = value;
|
|
|
|
OnDefaultVisualStyleChanged(oldValue, value);
|
|
}
|
|
}
|
|
}
|
|
|
|
#region OnDefaultVisualStyleChanged
|
|
|
|
private void OnDefaultVisualStyleChanged(
|
|
DefaultVisualStyles oldValue, DefaultVisualStyles newValue)
|
|
{
|
|
DefaultVisualChangeHandler(oldValue, newValue);
|
|
|
|
OnPropertyChanged("DefaultVisualStyles");
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DefaultVisualChangeHandler
|
|
|
|
private void DefaultVisualChangeHandler(
|
|
DefaultVisualStyles oldValue, DefaultVisualStyles newValue)
|
|
{
|
|
if (oldValue != null)
|
|
oldValue.PropertyChanged -= DefaultVisualStylesPropertyChanged;
|
|
|
|
if (newValue != null)
|
|
newValue.PropertyChanged += DefaultVisualStylesPropertyChanged;
|
|
}
|
|
|
|
#region DefaultVisualStylesPropertyChanged
|
|
|
|
void DefaultVisualStylesPropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
{
|
|
GlobalUpdateCount++;
|
|
|
|
VisualChangeType changeType = ((VisualPropertyChangedEventArgs)e).ChangeType;
|
|
|
|
if (changeType == VisualChangeType.Layout)
|
|
ChartPanel.InvalidateLayout();
|
|
else
|
|
ChartPanel.InvalidateRender();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region IsUpdateSuspended
|
|
|
|
///<summary>
|
|
/// Gets whether Chart updating / rendering is suspended
|
|
///</summary>
|
|
[Browsable(false)]
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
public bool IsUpdateSuspended
|
|
{
|
|
get { return (_BeginUpdateCount > 0); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SelectedItems
|
|
|
|
/// <summary>
|
|
/// Gets a list of the currently selected chart items.
|
|
/// </summary>
|
|
[Browsable(false)]
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
public List<ChartContainer> SelectedItems
|
|
{
|
|
get
|
|
{
|
|
List<ChartContainer> selectedItems = new List<ChartContainer>(_SelectedItems);
|
|
|
|
return (selectedItems);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ToolTip
|
|
|
|
internal System.Windows.Forms.ToolTip ToolTip
|
|
{
|
|
get
|
|
{
|
|
if (_ToolTip == null)
|
|
_ToolTip = new System.Windows.Forms.ToolTip();
|
|
|
|
return (_ToolTip);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ToolTipText
|
|
|
|
internal string ToolTipText
|
|
{
|
|
get { return (_ToolTipText); }
|
|
|
|
set
|
|
{
|
|
if (_ToolTipText != value)
|
|
{
|
|
_ToolTipText = value;
|
|
|
|
ToolTip.SetToolTip(this, value);
|
|
|
|
ToolTip.Active =
|
|
(string.IsNullOrEmpty(value) == false);
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Internal properties
|
|
|
|
#region BoundsUpdateCount
|
|
|
|
internal ushort BoundsUpdateCount
|
|
{
|
|
get { return (_BoundsUpdateCount); }
|
|
set { _BoundsUpdateCount = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region CapturedItem
|
|
|
|
internal ChartVisualElement CapturedItem
|
|
{
|
|
get
|
|
{
|
|
if (Capture == false)
|
|
_CapturedItem = null;
|
|
|
|
return (_CapturedItem);
|
|
}
|
|
|
|
set { Capture = ((_CapturedItem = value) != null); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DataBinder
|
|
|
|
internal DataBinder DataBinder
|
|
{
|
|
get { return (_DataBinder); }
|
|
set { _DataBinder = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DefaultCursor
|
|
|
|
internal new Cursor DefaultCursor
|
|
{
|
|
get { return (_DefaultCursor); }
|
|
set { _DefaultCursor = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DesignerHosted
|
|
|
|
internal bool DesignerHosted
|
|
{
|
|
get { return (DesignMode); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GlobalUpdateCount
|
|
|
|
internal ushort GlobalUpdateCount
|
|
{
|
|
get { return (_GlobalUpdateCount); }
|
|
set { _GlobalUpdateCount = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region InUpdateLayout
|
|
|
|
internal bool InUpdateLayout
|
|
{
|
|
get { return (_InUpdateLayout); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsPointLabelUpdateHooked
|
|
|
|
internal bool IsPointLabelUpdateHooked
|
|
{
|
|
get { return (PointLabelUpdate != null); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsScrollHooked
|
|
|
|
internal bool IsScrollHooked
|
|
{
|
|
get { return (Scroll != null); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region LayoutBoundsItem
|
|
|
|
internal ChartVisualElement LayoutBoundsItem
|
|
{
|
|
get { return (_LayoutBoundsItem); }
|
|
|
|
set
|
|
{
|
|
_LayoutBoundsItem = value;
|
|
|
|
OnLayoutBoundsInvalid(EventArgs.Empty);
|
|
}
|
|
}
|
|
|
|
#region OnLayoutBoundsInvalid
|
|
|
|
/// <summary>
|
|
/// Raises LayoutBoundsInvalid event.
|
|
/// </summary>
|
|
/// <param name="e">Provides event arguments.</param>
|
|
protected virtual void OnLayoutBoundsInvalid(EventArgs e)
|
|
{
|
|
if (LayoutBoundsInvalid != null)
|
|
LayoutBoundsInvalid(this, e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region LayoutValid
|
|
|
|
internal bool LayoutValid
|
|
{
|
|
get { return (_LayoutValid); }
|
|
set { _LayoutValid = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MouseOverElement
|
|
|
|
internal ChartVisualElement MouseOverElement
|
|
{
|
|
get { return (_MouseOverElement); }
|
|
set { _MouseOverElement = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostInternalUpdate
|
|
|
|
internal bool PostInternalUpdate
|
|
{
|
|
get { return (_PostInternalUpdate); }
|
|
set { _PostInternalUpdate = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SelectionUpdateCount
|
|
|
|
internal int SelectionUpdateCount
|
|
{
|
|
get { return (_SelectionUpdateCount); }
|
|
set { _SelectionUpdateCount = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SetChartCursor
|
|
|
|
internal bool SetChartCursor
|
|
{
|
|
get { return (_SetChartCursor); }
|
|
set { _SetChartCursor = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Licensing
|
|
|
|
#if !TRIAL
|
|
private string _LicenseKey = "";
|
|
|
|
[Browsable(false), DefaultValue("")]
|
|
public string LicenseKey
|
|
{
|
|
get { return _LicenseKey; }
|
|
|
|
set
|
|
{
|
|
if (Licensing.ValidateLicenseKey(value) == false)
|
|
_LicenseKey = (!Licensing.CheckLicenseKey(value) ? "9dsjkhds7" : value);
|
|
}
|
|
}
|
|
#endif
|
|
#endregion
|
|
|
|
#region OnEnabledChanged
|
|
|
|
/// <summary>
|
|
/// OnEnabledChanged
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnEnabledChanged(EventArgs e)
|
|
{
|
|
base.OnEnabledChanged(e);
|
|
|
|
Refresh();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region StyleManager support
|
|
|
|
#region StyleManagerStyleChanged
|
|
|
|
/// <summary>
|
|
/// Called by StyleManager to notify control that style on
|
|
/// manager has changed and that control should refresh its
|
|
/// appearance if its style is controlled by StyleManager.
|
|
/// </summary>
|
|
/// <param name="newStyle">New active style.</param>
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
public void StyleManagerStyleChanged(eDotNetBarStyle newStyle)
|
|
{
|
|
UpdateChartStyle();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region UpdateChartStyle
|
|
|
|
private void UpdateChartStyle()
|
|
{
|
|
ChartControlStyle style = ChartControlStyle.Office2010Blue;
|
|
|
|
switch (StyleManager.Style)
|
|
{
|
|
case eStyle.Office2007VistaGlass:
|
|
case eStyle.VisualStudio2010Blue:
|
|
case eStyle.Windows7Blue:
|
|
case eStyle.Office2007Blue:
|
|
case eStyle.Office2010Blue:
|
|
style = ChartControlStyle.Office2010Blue;
|
|
break;
|
|
|
|
case eStyle.Office2007Black:
|
|
case eStyle.Office2010Black:
|
|
style = ChartControlStyle.Office2010Black;
|
|
break;
|
|
|
|
case eStyle.Office2007Silver:
|
|
case eStyle.Office2010Silver:
|
|
style = ChartControlStyle.Office2010Silver;
|
|
break;
|
|
|
|
case eStyle.Metro:
|
|
case eStyle.VisualStudio2012Dark:
|
|
case eStyle.VisualStudio2012Light:
|
|
style = ChartControlStyle.Metro;
|
|
break;
|
|
}
|
|
|
|
_BaseVisualStyles = VisualStylesTable.GetStyle(style);
|
|
|
|
if (IsHandleCreated == true)
|
|
{
|
|
Invalidate(true);
|
|
|
|
if (StyleManagerChanged != null)
|
|
StyleManagerChanged(this, new EventArgs());
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Paint processing
|
|
|
|
#region OnPaint
|
|
|
|
/// <summary>
|
|
/// Renders the control.
|
|
/// </summary>
|
|
/// <param name="e">Paint arguments.</param>
|
|
protected override void OnPaint(PaintEventArgs e)
|
|
{
|
|
if (IsUpdateSuspended == false)
|
|
{
|
|
SmoothingMode sm = e.Graphics.SmoothingMode;
|
|
TextRenderingHint th = e.Graphics.TextRenderingHint;
|
|
|
|
base.OnPaintBackground(e);
|
|
|
|
if (LayoutValid == false || LayoutBoundsItem != null)
|
|
UpdateLayout(e.Graphics);
|
|
|
|
ChartRenderInfo renderInfo = GetRenderInfo(e);
|
|
|
|
PaintControl(renderInfo);
|
|
|
|
e.Graphics.SmoothingMode = sm;
|
|
e.Graphics.TextRenderingHint = th;
|
|
|
|
base.OnPaint(e);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PaintControl
|
|
|
|
private void PaintControl(ChartRenderInfo renderInfo)
|
|
{
|
|
if (ChartPanel.Visible == true)
|
|
ChartPanel.Render(renderInfo);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PaintTo
|
|
|
|
/// <summary>
|
|
/// Paints control to canvas. This method might be used for print output.
|
|
/// </summary>
|
|
/// <param name="g">Graphics object to paint control to.</param>
|
|
public void PaintTo(Graphics g)
|
|
{
|
|
PaintTo(g, ClientRectangle);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Paints control to canvas. This method might be used for print output.
|
|
/// </summary>
|
|
/// <param name="g">Graphics object to paint control to.</param>
|
|
/// <param name="clipRectangle">Indicates clipping rectangle.</param>
|
|
public void PaintTo(Graphics g, Rectangle clipRectangle)
|
|
{
|
|
SmoothingMode sm = g.SmoothingMode;
|
|
TextRenderingHint th = g.TextRenderingHint;
|
|
|
|
if (LayoutValid == false || LayoutBoundsItem != null)
|
|
UpdateLayout(g);
|
|
|
|
ChartRenderInfo renderInfo = GetRenderInfo(g, clipRectangle);
|
|
|
|
PaintControl(renderInfo);
|
|
|
|
g.SmoothingMode = sm;
|
|
g.TextRenderingHint = th;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region UpdateLayout
|
|
|
|
/// <summary>
|
|
/// OnHandleCreated
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnHandleCreated(EventArgs e)
|
|
{
|
|
UpdateLayout(false);
|
|
|
|
base.OnHandleCreated(e);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Performs Chart layout.
|
|
/// </summary>
|
|
public void UpdateLayout()
|
|
{
|
|
UpdateLayout(false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Performs Chart layout.
|
|
/// </summary>
|
|
///<param name="force">Whether to force operation even if layout is valid.</param>
|
|
public void UpdateLayout(bool force)
|
|
{
|
|
if (force == true)
|
|
_LayoutValid = false;
|
|
|
|
if (_LayoutValid == false || LayoutBoundsItem != null)
|
|
{
|
|
if (_InUpdateLayout == false)
|
|
{
|
|
using (Graphics g = CreateGraphics())
|
|
UpdateLayout(g);
|
|
}
|
|
}
|
|
}
|
|
|
|
internal ushort LayoutUpdateCount
|
|
{
|
|
get { return (_LayoutUpdateCount); }
|
|
}
|
|
|
|
internal ushort _LayoutUpdateCount;
|
|
|
|
private void UpdateLayout(Graphics g)
|
|
{
|
|
if (ChartPanel.Visible == true)
|
|
{
|
|
if (_InUpdateLayout == false)
|
|
{
|
|
_InUpdateLayout = true;
|
|
|
|
_LayoutUpdateCount++;
|
|
|
|
try
|
|
{
|
|
ChartLayoutInfo layoutInfo = GetLayoutInfo(g);
|
|
|
|
if (_LayoutValid == false)
|
|
{
|
|
ChartPanel.Measure(layoutInfo);
|
|
|
|
layoutInfo.ClientBounds.Width = Math.Max(0, layoutInfo.ClientBounds.Width);
|
|
layoutInfo.ClientBounds.Height = Math.Max(0, layoutInfo.ClientBounds.Height);
|
|
|
|
_LayoutValid = true;
|
|
_LayoutBoundsItem = ChartPanel;
|
|
|
|
PostInternalMouseMove();
|
|
}
|
|
|
|
if (LayoutBoundsItem != null)
|
|
{
|
|
layoutInfo = GetLayoutInfo(g);
|
|
layoutInfo.ScrollOffset = GetScrollOffset();
|
|
|
|
LayoutBoundsItem.Arrange(layoutInfo);
|
|
}
|
|
|
|
LayoutBoundsItem = null;
|
|
}
|
|
finally
|
|
{
|
|
_InUpdateLayout = false;
|
|
|
|
// If the user initiated an action during the paint event that
|
|
// resulted in a layout change, process it now, as our associated
|
|
// invalidation will be eaten by the Windows event system
|
|
|
|
if (PostInternalUpdate == true)
|
|
{
|
|
PostInternalUpdate = false;
|
|
|
|
if (_InPostUpdate == false)
|
|
{
|
|
_InPostUpdate = true;
|
|
|
|
_LayoutValid = false;
|
|
|
|
UpdateLayout(g);
|
|
|
|
_InPostUpdate = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#region GetScrollOffset
|
|
|
|
private Point GetScrollOffset()
|
|
{
|
|
ChartContainer cc = LayoutBoundsItem.ParentChartContainer;
|
|
|
|
if (cc != null)
|
|
{
|
|
Point pt = cc.ScrollOffset;
|
|
|
|
if (LayoutBoundsItem is ChartLegend == false)
|
|
{
|
|
pt.X += cc.HScrollOffset;
|
|
pt.Y += cc.VScrollOffset;
|
|
}
|
|
|
|
return (pt);
|
|
}
|
|
|
|
return (Point.Empty);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetLayoutInfo
|
|
|
|
private ChartLayoutInfo GetLayoutInfo(Graphics g)
|
|
{
|
|
ChartLayoutInfo layoutInfo = new ChartLayoutInfo(g, ClientRectangle);
|
|
|
|
Rectangle r = ClientRectangle;
|
|
|
|
layoutInfo.LayoutBounds = ClientRectangle;
|
|
|
|
return (layoutInfo);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetRenderInfo
|
|
|
|
private ChartRenderInfo GetRenderInfo(PaintEventArgs e)
|
|
{
|
|
ChartRenderInfo renderInfo =
|
|
new ChartRenderInfo(e.Graphics, Rectangle.Ceiling(e.ClipRectangle));
|
|
|
|
return (renderInfo);
|
|
}
|
|
|
|
private ChartRenderInfo GetRenderInfo(Graphics g, Rectangle clipRectangle)
|
|
{
|
|
ChartRenderInfo renderInfo =
|
|
new ChartRenderInfo(g, Rectangle.Ceiling(clipRectangle));
|
|
|
|
return (renderInfo);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region DoEvent support
|
|
|
|
#region ChartMatrixResizedEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of ChartMatrixResized events
|
|
/// </summary>
|
|
internal void DoChartMatrixResizedEvent(ChartPanel chartPanel)
|
|
{
|
|
if (ChartMatrixResized != null)
|
|
{
|
|
ChartMatrixResizedEventArgs ev = new
|
|
ChartMatrixResizedEventArgs(chartPanel);
|
|
|
|
ChartMatrixResized(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartTitleMarkupLinkClickEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of ChartTitleMarkupLinkClick events
|
|
/// </summary>
|
|
internal void DoChartTitleMarkupLinkClickEvent(ChartNote title, HyperLink hyperLink)
|
|
{
|
|
if (TitleMarkupLinkClick != null)
|
|
{
|
|
ChartTitleMarkupLinkClickEventArgs ev = new
|
|
ChartTitleMarkupLinkClickEventArgs(title, hyperLink.Name, hyperLink.HRef);
|
|
|
|
TitleMarkupLinkClick(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DataBindingStartEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of DataBindingStart events
|
|
/// </summary>
|
|
internal bool DoDataBindingStartEvent(
|
|
BaseChart chartBase, object source, ref bool autogen)
|
|
{
|
|
if (DataBindingStart != null)
|
|
{
|
|
ChartDataBindingStartEventArgs ev = new
|
|
ChartDataBindingStartEventArgs(chartBase, source, autogen);
|
|
|
|
DataBindingStart(this, ev);
|
|
|
|
autogen = ev.AutoGenerateSeries;
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartDataBindingCompleteEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of ChartDataBindingComplete events
|
|
/// </summary>
|
|
internal void DoChartDataBindingCompleteEvent(BaseChart chartBase, object source)
|
|
{
|
|
if (ChartDataBindingComplete != null)
|
|
{
|
|
ChartDataBindingCompleteEventArgs ev = new
|
|
ChartDataBindingCompleteEventArgs(chartBase, source);
|
|
|
|
ChartDataBindingComplete(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartMouseClickEvent
|
|
|
|
internal bool DoChartMouseClickEvent(BaseChart baseChart, PieSeriesPoint item, MouseEventArgs e)
|
|
{
|
|
if (ChartMouseClick != null)
|
|
{
|
|
ChartMouseClickEventArgs ev = new
|
|
ChartMouseClickEventArgs(baseChart, item, e);
|
|
|
|
ChartMouseClick(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartMouseDoubleClickEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of ChartMouseDoubleClick events
|
|
/// </summary>
|
|
internal bool DoChartMouseDoubleClickEvent(BaseChart baseChart,
|
|
ItemHitArea hitArea, ChartVisualElement hitElement, object hitItem, MouseEventArgs e)
|
|
{
|
|
if (ChartMouseDoubleClick != null)
|
|
{
|
|
ChartMouseDoubleClickEventArgs ev = new
|
|
ChartMouseDoubleClickEventArgs(baseChart, hitArea, hitElement, hitItem, e);
|
|
|
|
ChartMouseDoubleClick(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region CompareElementsEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of CompareElementsEvent events
|
|
/// </summary>
|
|
internal bool DoCompareElementsEvent(
|
|
ChartVisualElement chartElement, object a, object b, ref int result)
|
|
{
|
|
if (CompareElements != null)
|
|
{
|
|
ChartCompareElementsEventArgs ev = new
|
|
ChartCompareElementsEventArgs(chartElement, a, b);
|
|
|
|
CompareElements(this, ev);
|
|
|
|
result = ev.Result;
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmptyTextMarkupLinkClickEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of EmptyTextMarkupLinkClick events
|
|
/// </summary>
|
|
internal void DoEmptyTextMarkupLinkClickEvent(ChartContainer container, HyperLink hyperLink)
|
|
{
|
|
if (EmptyTextMarkupLinkClick != null)
|
|
{
|
|
ChartEmptyTextMarkupLinkClickEventArgs ev = new
|
|
ChartEmptyTextMarkupLinkClickEventArgs(container, hyperLink.Name, hyperLink.HRef);
|
|
|
|
EmptyTextMarkupLinkClick(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetPieCenterLabelEvent
|
|
|
|
internal void DoGetPieCenterLabelEvent(PieChart pieChart, ref string text)
|
|
{
|
|
if (GetPieCenterLabel != null)
|
|
{
|
|
GetPieCenterLabelEventArgs ev = new
|
|
GetPieCenterLabelEventArgs(pieChart, text);
|
|
|
|
GetPieCenterLabel(this, ev);
|
|
|
|
text = ev.LabelText;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairAxisLabelEvent
|
|
|
|
internal void DoGetCrosshairAxisLabelEvent(
|
|
ChartAxis axis, object value, ref string labelText)
|
|
{
|
|
if (GetCrosshairAxisLabel != null)
|
|
{
|
|
GetCrosshairAxisLabelEventArgs ev = new
|
|
GetCrosshairAxisLabelEventArgs(axis, value, labelText);
|
|
|
|
GetCrosshairAxisLabel(this, ev);
|
|
|
|
labelText = ev.LabelText;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairLabelHeaderEvent
|
|
|
|
internal void DoGetCrosshairLabelHeaderEvent(
|
|
BaseChart chart, CrosshairPoint cp, List<CrosshairPoint> cps, ref string text)
|
|
{
|
|
if (GetCrosshairLabelHeader != null)
|
|
{
|
|
GetCrosshairLabelHeaderEventArgs ev = new
|
|
GetCrosshairLabelHeaderEventArgs(chart, cp, cps, text);
|
|
|
|
GetCrosshairLabelHeader(this, ev);
|
|
|
|
text = ev.Text;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairLabelItemEvent
|
|
|
|
internal void DoGetCrosshairLabelItemEvent(
|
|
BaseChart chart, CrosshairPoint cp, ref string text)
|
|
{
|
|
if (GetCrosshairLabelItem != null)
|
|
{
|
|
GetCrosshairLabelItemEventArgs ev = new
|
|
GetCrosshairLabelItemEventArgs(chart, cp, text);
|
|
|
|
GetCrosshairLabelItem(this, ev);
|
|
|
|
text = ev.Text;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetElementStyleEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of GetElementStyle events
|
|
/// </summary>
|
|
internal void DoGetElementStyleEvent(
|
|
ChartElement chartElement, StyleType styleType, ref BaseVisualStyle style)
|
|
{
|
|
if (GetElementStyle != null)
|
|
{
|
|
ChartGetElementStyleEventArgs ev = new
|
|
ChartGetElementStyleEventArgs(chartElement, styleType, style);
|
|
|
|
GetElementStyle(this, ev);
|
|
|
|
style = ev.Style;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetElementStyleEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of GetElementStyle events
|
|
/// </summary>
|
|
internal void DoGetPieSeriesPointStyleEvent(
|
|
PieSeriesPoint pieSeriesPoint, StyleType styleType, ref BaseVisualStyle style)
|
|
{
|
|
if (GetPieSeriesPointStyle != null)
|
|
{
|
|
ChartGetPieSeriesPointStyleEventArgs ev = new
|
|
ChartGetPieSeriesPointStyleEventArgs(pieSeriesPoint, styleType, style);
|
|
|
|
GetPieSeriesPointStyle(this, ev);
|
|
|
|
style = ev.Style;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetSliceLabelEvent
|
|
|
|
internal bool DoGetSliceLabelEvent(PieChart pieChart,
|
|
PieSeries chartSeries, PieSeriesPoint psp, bool inner, ref string text)
|
|
{
|
|
if (GetSliceLabel != null)
|
|
{
|
|
GetSliceLabelEventArgs ev = new
|
|
GetSliceLabelEventArgs(pieChart, chartSeries, psp, inner, text);
|
|
|
|
GetSliceLabel(this, ev);
|
|
|
|
text = ev.Text;
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetTickmarkLabelEvent
|
|
|
|
internal void DoGetTickmarkLabelEvent(
|
|
ChartAxis axis, object value, ref string labelText, ref Color labelColor)
|
|
{
|
|
if (GetTickmarkLabel != null)
|
|
{
|
|
GetTickmarkLabelEventArgs ev = new
|
|
GetTickmarkLabelEventArgs(axis, value, labelText);
|
|
|
|
GetTickmarkLabel(this, ev);
|
|
|
|
labelText = ev.LabelText;
|
|
labelColor = ev.LabelColor;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetToolTipEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of GetToolTipEvent events
|
|
/// </summary>
|
|
internal bool DoGetToolTipEvent(BaseChart baseChart,
|
|
BaseSeries baseSeries, SeriesPoint sp, ref string toolTip)
|
|
{
|
|
if (GetToolTip != null)
|
|
{
|
|
GetToolTipEventArgs ev = new
|
|
GetToolTipEventArgs(baseChart, baseSeries, sp, toolTip);
|
|
|
|
GetToolTip(this, ev);
|
|
|
|
toolTip = ev.ToolTip;
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region LegendItemCheckedChanged
|
|
|
|
/// <summary>
|
|
/// Handles invocation of LegendItemCheckedChanged events
|
|
/// </summary>
|
|
internal void DoLegendItemCheckedChangedEvent(
|
|
ChartLegend legend, ChartLegendItem legendItem)
|
|
{
|
|
if (LegendItemCheckedChanged != null)
|
|
{
|
|
LegendItemCheckedChangedEventArgs ev = new
|
|
LegendItemCheckedChangedEventArgs(legend, legendItem);
|
|
|
|
LegendItemCheckedChanged(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PointLabelUpdateEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of PointLabelUpdate events
|
|
/// </summary>
|
|
internal void DoPointLabelUpdateEvent(
|
|
BaseChart chart, ChartSeries chartSeries, List<PointLabel> pointLabels)
|
|
{
|
|
if (PointLabelUpdate != null)
|
|
{
|
|
ChartPointLabelUpdateEventArgs ev = new
|
|
ChartPointLabelUpdateEventArgs(chart, chartSeries, pointLabels);
|
|
|
|
PointLabelUpdate(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieCenterMarkupLinkClick Event
|
|
|
|
/// <summary>
|
|
/// Handles invocation of PieCenterMarkupLinkClick events
|
|
/// </summary>
|
|
internal void DoPieCenterMarkupLinkClickEvent(
|
|
PieChart pieChart, HyperLink hyperLink)
|
|
{
|
|
if (PieCenterMarkupLinkClick != null)
|
|
{
|
|
PieCenterMarkupLinkClickEventArgs ev = new PieCenterMarkupLinkClickEventArgs(
|
|
pieChart, hyperLink.Name, hyperLink.HRef);
|
|
|
|
PieCenterMarkupLinkClick(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieDetachChangedEvent
|
|
|
|
internal void DoPieDetachChangedEvent(
|
|
PieChart pieChart, PieSeries pieSeries, PieSelectionMode psm)
|
|
{
|
|
if (PieDetachChanged != null)
|
|
{
|
|
PieDetachChangedEventArgs ev = new
|
|
PieDetachChangedEventArgs(pieChart, pieSeries, psm);
|
|
|
|
PieDetachChanged(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieExplodeChangedEvent
|
|
|
|
internal void DoPieExplodeChangedEvent(PieChart pieChart, PieSeries pieSeries)
|
|
{
|
|
if (PieExplodeChanged != null)
|
|
{
|
|
PieExplodeChangedEventArgs ev = new
|
|
PieExplodeChangedEventArgs(pieChart, pieSeries);
|
|
|
|
PieExplodeChanged(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieRingLevelChanged
|
|
|
|
internal void DoPieRingLevelChangedEvent(
|
|
PieChart pieChart, PieSeriesPointCollection spcOld, PieSeriesPointCollection spcNew)
|
|
{
|
|
if (PieRingLevelChanged != null)
|
|
{
|
|
PieRingLevelChangedEventArgs ev = new
|
|
PieRingLevelChangedEventArgs(pieChart, spcOld, spcNew);
|
|
|
|
PieRingLevelChanged(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieRingLevelChanging
|
|
|
|
internal bool DoPieRingLevelChangingEvent(
|
|
PieChart pieChart, PieSeriesPointCollection spcOld, PieSeriesPointCollection spcNew)
|
|
{
|
|
if (PieRingLevelChanging != null)
|
|
{
|
|
PieRingLevelChangingEventArgs ev = new
|
|
PieRingLevelChangingEventArgs(pieChart, spcOld, spcNew);
|
|
|
|
PieRingLevelChanging(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieSelectionChangedEvent
|
|
|
|
internal void DoPieSelectionChangedEvent(
|
|
PieChart pieChart, PieSeries pieSeries, PieSeriesPoint psp, PieSelectionMode psm)
|
|
{
|
|
if (PieSelectionChanged != null)
|
|
{
|
|
PieSelectionChangedEventArgs ev = new
|
|
PieSelectionChangedEventArgs(pieChart, pieSeries, psp, psm);
|
|
|
|
PieSelectionChanged(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostLoadLegendDataEvent
|
|
|
|
internal void DoPostLoadLegendDataEvent(ChartLegend legend)
|
|
{
|
|
if (PostLoadLegendData != null)
|
|
{
|
|
PostLoadLegendDataEventArgs ev = new
|
|
PostLoadLegendDataEventArgs(legend);
|
|
|
|
PostLoadLegendData(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderContentBackgroundEvent
|
|
|
|
internal void DoPostRenderContentBackgroundEvent(Graphics g, BaseChart chart, Rectangle r)
|
|
{
|
|
if (PostRenderContentBackground != null)
|
|
{
|
|
PostRenderContentBackgroundEventArgs ev = new
|
|
PostRenderContentBackgroundEventArgs(g, chart, r);
|
|
|
|
PostRenderContentBackground(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderFrameBackgroundEvent
|
|
|
|
internal void DoPostRenderFrameBackgroundEvent(Graphics g, BaseChart chart, Rectangle r)
|
|
{
|
|
if (PostRenderFrameBackground != null)
|
|
{
|
|
PostRenderFrameBackgroundEventArgs ev = new
|
|
PostRenderFrameBackgroundEventArgs(g, chart, r);
|
|
|
|
PostRenderFrameBackground(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPanelBackgroundEvent
|
|
|
|
internal void DoPostRenderPanelBackgroundEvent(Graphics g, ChartPanel panel, Rectangle r)
|
|
{
|
|
if (PostRenderPanelBackground != null)
|
|
{
|
|
PostRenderPanelBackgroundEventArgs ev = new
|
|
PostRenderPanelBackgroundEventArgs(g, panel, r);
|
|
|
|
PostRenderPanelBackground(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPieCenterBackgroundEvent
|
|
|
|
internal void DoPostRenderPieCenterBackgroundEvent(
|
|
Graphics g, PieChart pieChart, Rectangle rc)
|
|
{
|
|
if (PostRenderPieCenterBackground != null)
|
|
{
|
|
PostRenderPieCenterBackgroundEventArgs ev = new
|
|
PostRenderPieCenterBackgroundEventArgs(g, pieChart, rc);
|
|
|
|
PostRenderPieCenterBackground(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPieCenterContentEvent
|
|
|
|
internal void DoPostRenderPieCenterContentEvent(
|
|
Graphics g, PieChart pieChart, Rectangle rt, string centerlabel)
|
|
{
|
|
if (PostRenderPieCenterContent != null)
|
|
{
|
|
PostRenderPieCenterContentEventArgs ev = new
|
|
PostRenderPieCenterContentEventArgs(g, pieChart, rt, centerlabel);
|
|
|
|
PostRenderPieCenterContent(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPointConnectorEvent
|
|
|
|
internal void DoPostRenderPointConnectorEvent(Graphics g, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPt, Point dataPt, Point labelPt)
|
|
{
|
|
if (PostRenderPointConnector != null)
|
|
{
|
|
PostRenderPointConnectorEventArgs ev = new
|
|
PostRenderPointConnectorEventArgs(g, chart, series, pointLabel, isCrosshairPt, dataPt, labelPt);
|
|
|
|
PostRenderPointConnector(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPointLabelEvent
|
|
|
|
internal void DoPostRenderPointLabelEvent(Graphics g, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPt, Rectangle bounds)
|
|
{
|
|
if (PostRenderPointLabel != null)
|
|
{
|
|
PostRenderPointLabelEventArgs ev = new
|
|
PostRenderPointLabelEventArgs(g, chart, series, pointLabel, isCrosshairPt, bounds);
|
|
|
|
PostRenderPointLabel(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderRadialGridEvent
|
|
|
|
internal void DoPostRenderRadialGridEvent(Graphics g,
|
|
PieChart pieChart, double outerRadius, double innerRadius, double exp)
|
|
{
|
|
if (PostRenderRadialGrid != null)
|
|
{
|
|
PostRenderRadialGridEventArgs ev = new
|
|
PostRenderRadialGridEventArgs(g, pieChart, outerRadius, innerRadius, exp);
|
|
|
|
PostRenderRadialGrid(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesBarEvent
|
|
|
|
internal void DoPostRenderSeriesBarEvent(Graphics g, BaseChart chart,
|
|
ChartSeries chartSeries, SeriesPoint sp, Rectangle r, Rectangle r2, BarSegment segment)
|
|
{
|
|
if (PostRenderSeriesBar != null)
|
|
{
|
|
PostRenderSeriesBarEventArgs ev = new
|
|
PostRenderSeriesBarEventArgs(g, chart, chartSeries, sp, r, r2, segment);
|
|
|
|
PostRenderSeriesBar(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesHiLoBarEvent
|
|
|
|
internal void DoPostRenderSeriesHiLoBarEvent(Graphics g, ChartXy chartXy,
|
|
ChartSeries chartSeries, HiLoRenderData rd, Point pt1, Point pt2, HiLoBarSegment segment)
|
|
{
|
|
if (PostRenderSeriesHiLoBar != null)
|
|
{
|
|
PostRenderSeriesHiLoBarEventArgs ev = new
|
|
PostRenderSeriesHiLoBarEventArgs(g, chartXy, chartSeries, rd, pt1, pt2, segment);
|
|
|
|
PostRenderSeriesHiLoBar(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesPointEvent
|
|
|
|
internal void DoPostRenderSeriesPointEvent(Graphics graphics, BaseChart chart,
|
|
ChartSeries chartSeries, SeriesPoint sp, Point pt, Size pointSize, Image marker)
|
|
{
|
|
if (PostRenderSeriesPoint != null)
|
|
{
|
|
PostRenderSeriesPointEventArgs ev = new
|
|
PostRenderSeriesPointEventArgs(graphics, chart, chartSeries, sp, pt, pointSize, marker);
|
|
|
|
PostRenderSeriesPoint(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSliceEvent
|
|
|
|
internal void DoPostRenderSliceEvent(Graphics g, GraphicsPath path,
|
|
PieChart pieChart, PieSeries pieSeries, PieSeriesPoint psp, SliceRenderType rtype)
|
|
{
|
|
if (PostRenderSlice != null)
|
|
{
|
|
PostRenderSliceEventArgs ev = new
|
|
PostRenderSliceEventArgs(g, path, pieChart, pieSeries, psp, rtype);
|
|
|
|
PostRenderSlice(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreLoadLegendDataEvent
|
|
|
|
internal bool DoPreLoadLegendDataEvent(ChartLegend legend)
|
|
{
|
|
if (PreLoadLegendData != null)
|
|
{
|
|
PreLoadLegendDataEventArgs ev = new
|
|
PreLoadLegendDataEventArgs(legend);
|
|
|
|
PreLoadLegendData(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderContentBackgroundEvent
|
|
|
|
internal bool DoPreRenderContentBackgroundEvent(Graphics g, BaseChart chart, Rectangle r)
|
|
{
|
|
if (PreRenderContentBackground != null)
|
|
{
|
|
PreRenderContentBackgroundEventArgs ev = new
|
|
PreRenderContentBackgroundEventArgs(g, chart, r);
|
|
|
|
PreRenderContentBackground(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderFrameBackgroundEvent
|
|
|
|
internal bool DoPreRenderFrameBackgroundEvent(Graphics g, BaseChart chart, Rectangle r)
|
|
{
|
|
if (PreRenderFrameBackground != null)
|
|
{
|
|
PreRenderFrameBackgroundEventArgs ev = new
|
|
PreRenderFrameBackgroundEventArgs(g, chart, r);
|
|
|
|
PreRenderFrameBackground(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPanelBackgroundEvent
|
|
|
|
internal bool DoPreRenderPanelBackgroundEvent(Graphics g, ChartPanel panel, Rectangle r)
|
|
{
|
|
if (PreRenderPanelBackground != null)
|
|
{
|
|
PreRenderPanelBackgroundEventArgs ev = new
|
|
PreRenderPanelBackgroundEventArgs(g, panel, r);
|
|
|
|
PreRenderPanelBackground(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPieCenterBackgroundEvent
|
|
|
|
internal bool DoPreRenderPieCenterBackgroundEvent(
|
|
Graphics g, PieChart pieChart, Rectangle rc)
|
|
{
|
|
if (PreRenderPieCenterBackground != null)
|
|
{
|
|
PreRenderPieCenterBackgroundEventArgs ev = new
|
|
PreRenderPieCenterBackgroundEventArgs(g, pieChart, rc);
|
|
|
|
PreRenderPieCenterBackground(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPieCenterContentEvent
|
|
|
|
internal bool DoPreRenderPieCenterContentEvent(
|
|
Graphics g, PieChart pieChart, Rectangle rt, string centerlabel)
|
|
{
|
|
if (PreRenderPieCenterContent != null)
|
|
{
|
|
PreRenderPieCenterContentEventArgs ev = new
|
|
PreRenderPieCenterContentEventArgs(g, pieChart, rt, centerlabel);
|
|
|
|
PreRenderPieCenterContent(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPointConnectorEvent
|
|
|
|
internal bool DoPreRenderPointConnectorEvent(Graphics g, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPt, Point dataPt, Point labelPt)
|
|
{
|
|
if (PreRenderPointConnector != null)
|
|
{
|
|
PreRenderPointConnectorEventArgs ev = new
|
|
PreRenderPointConnectorEventArgs(g, chart, series, pointLabel, isCrosshairPt, dataPt, labelPt);
|
|
|
|
PreRenderPointConnector(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPointLabelEvent
|
|
|
|
internal bool DoPreRenderPointLabelEvent(Graphics g, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPt, Rectangle bounds)
|
|
{
|
|
if (PreRenderPointLabel != null)
|
|
{
|
|
PreRenderPointLabelEventArgs ev = new
|
|
PreRenderPointLabelEventArgs(g, chart, series, pointLabel, isCrosshairPt, bounds);
|
|
|
|
PreRenderPointLabel(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderRadialGridEvent
|
|
|
|
internal bool DoPreRenderRadialGridEvent(Graphics g,
|
|
PieChart pieChart, double outerRadius, double innerRadius, double exp)
|
|
{
|
|
if (PreRenderRadialGrid != null)
|
|
{
|
|
PreRenderRadialGridEventArgs ev = new
|
|
PreRenderRadialGridEventArgs(g, pieChart, outerRadius, innerRadius, exp);
|
|
|
|
PreRenderRadialGrid(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesBarEvent
|
|
|
|
internal bool DoPreRenderSeriesBarEvent(Graphics g, BaseChart chart,
|
|
ChartSeries chartSeries, SeriesPoint sp, Rectangle r, Rectangle r2, BarSegment segment)
|
|
{
|
|
if (PreRenderSeriesBar != null)
|
|
{
|
|
PreRenderSeriesBarEventArgs ev = new
|
|
PreRenderSeriesBarEventArgs(g, chart, chartSeries, sp, r, r2, segment);
|
|
|
|
PreRenderSeriesBar(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesHiloBarEvent
|
|
|
|
internal bool DoPreRenderSeriesHiloBarEvent(Graphics g, ChartXy chartXy,
|
|
ChartSeries chartSeries, HiLoRenderData rd, Point pt1, Point pt2, HiLoBarSegment segment)
|
|
{
|
|
if (PreRenderSeriesHiLoBar != null)
|
|
{
|
|
PreRenderSeriesHiLoBarEventArgs ev = new
|
|
PreRenderSeriesHiLoBarEventArgs(g, chartXy, chartSeries, rd, pt1, pt2, segment);
|
|
|
|
PreRenderSeriesHiLoBar(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesPointEvent
|
|
|
|
internal bool DoPreRenderSeriesPointEvent(Graphics graphics, BaseChart chart,
|
|
ChartSeries chartSeries, SeriesPoint sp, Point pt, Size pointSize, ref Image marker)
|
|
{
|
|
if (PreRenderSeriesPoint != null)
|
|
{
|
|
PreRenderSeriesPointEventArgs ev = new
|
|
PreRenderSeriesPointEventArgs(graphics, chart, chartSeries, sp, pt, pointSize, marker);
|
|
|
|
PreRenderSeriesPoint(this, ev);
|
|
|
|
marker = ev.Marker;
|
|
|
|
return (ev.Cancel || marker == null);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSliceEvent
|
|
|
|
internal bool DoPreRenderSliceEvent(Graphics g, GraphicsPath path,
|
|
PieChart pieChart, PieSeries pieSeries, PieSeriesPoint psp, SliceRenderType rtype)
|
|
{
|
|
if (PreRenderSlice != null)
|
|
{
|
|
PreRenderSliceEventArgs ev = new
|
|
PreRenderSliceEventArgs(g, path, pieChart, pieSeries, psp, rtype);
|
|
|
|
PreRenderSlice(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ReferenceLineMarkupLinkClickEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of ReferenceLineMarkupLinkClick events
|
|
/// </summary>
|
|
internal void DoReferenceLineMarkupLinkClickEvent(ReferenceLine line, HyperLink hyperLink)
|
|
{
|
|
if (ReferenceLineMarkupLinkClick != null)
|
|
{
|
|
ReferenceLineMarkupLinkClickEventArgs ev = new
|
|
ReferenceLineMarkupLinkClickEventArgs(line, hyperLink.Name, hyperLink.HRef);
|
|
|
|
ReferenceLineMarkupLinkClick(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairCalloutEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of RenderCrosshairCallout events
|
|
/// </summary>
|
|
internal bool DoRenderCrosshairCalloutEvent(Graphics graphics,
|
|
BaseChart chart, Rectangle bounds, Point pt, CrosshairVisualStyle cstyle)
|
|
{
|
|
if (RenderCrosshairCallout != null)
|
|
{
|
|
RenderCrosshairCalloutEventArgs ev = new
|
|
RenderCrosshairCalloutEventArgs(graphics, chart, bounds, pt, cstyle);
|
|
|
|
RenderCrosshairCallout(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairLabelEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of RenderCrosshairLabel events
|
|
/// </summary>
|
|
internal bool DoRenderCrosshairLabelEvent(Graphics graphics,
|
|
BaseChart chart, List<CrosshairPoint> cps, Rectangle bounds, Point pt)
|
|
{
|
|
if (RenderCrosshairLabel != null)
|
|
{
|
|
RenderCrosshairLabelEventArgs ev = new
|
|
RenderCrosshairLabelEventArgs(graphics, chart, cps, bounds, pt);
|
|
|
|
RenderCrosshairLabel(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairLabelItemEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of RenderCrosshairLabelItem events
|
|
/// </summary>
|
|
internal bool DoRenderCrosshairLabelItemEvent(Graphics graphics,
|
|
BaseChart chart, CrosshairPoint cp, Rectangle bounds, CrosshairVisualStyle cstyle)
|
|
{
|
|
if (RenderCrosshairLabelItem != null)
|
|
{
|
|
RenderCrosshairLabelItemEventArgs ev = new
|
|
RenderCrosshairLabelItemEventArgs(graphics, chart, cp, bounds, cstyle);
|
|
|
|
RenderCrosshairLabelItem(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderPieRingOutEvent
|
|
|
|
internal bool DoRenderPieRingOutEvent(Graphics g, PieChart pieChart, Rectangle r)
|
|
{
|
|
if (RenderPieRingOut != null)
|
|
{
|
|
RenderPieRingOutEventArgs ev = new
|
|
RenderPieRingOutEventArgs(g, pieChart, r);
|
|
|
|
RenderPieRingOut(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceCenterLineEvent
|
|
|
|
internal bool DoRenderSliceCenterLineEvent(Graphics g,
|
|
PieChart pieChart, PieSeriesPoint psp, Point ptInner, Point ptOuter)
|
|
{
|
|
if (RenderSliceCenterLine != null)
|
|
{
|
|
RenderSliceCenterLineEventArgs ev = new
|
|
RenderSliceCenterLineEventArgs(g, pieChart, psp, ptInner, ptOuter);
|
|
|
|
RenderSliceCenterLine(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceInnerLabelEvent
|
|
|
|
internal bool DoRenderSliceInnerLabelEvent(Graphics g,
|
|
PieChart pieChart, PieSeriesPoint psp, string text, ref bool displayed)
|
|
{
|
|
if (RenderSliceInnerLabel != null)
|
|
{
|
|
RenderSliceInnerLabelEventArgs ev = new
|
|
RenderSliceInnerLabelEventArgs(g, pieChart, psp, text, displayed);
|
|
|
|
RenderSliceInnerLabel(this, ev);
|
|
|
|
displayed = ev.Displayed;
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceOuterLabelEvent
|
|
|
|
internal bool DoRenderSliceOuterLabelEvent(
|
|
Graphics g, PieChart pieChart, PieSeriesPoint psp, PieLabel pl)
|
|
{
|
|
if (RenderSliceOuterLabel != null)
|
|
{
|
|
RenderSliceOuterLabelEventArgs ev = new
|
|
RenderSliceOuterLabelEventArgs(g, pieChart, psp, pl);
|
|
|
|
RenderSliceOuterLabel(this, ev);
|
|
|
|
return (ev.Cancel);
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ScrollEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of Scroll events
|
|
/// </summary>
|
|
internal void DoScrollEvent(ChartContainer chartContainer,
|
|
ScrollEventArgs args, ScrollBarLite sbar)
|
|
{
|
|
if (Scroll != null)
|
|
{
|
|
ChartScrollEventArgs ev = new
|
|
ChartScrollEventArgs(chartContainer, args);
|
|
|
|
Scroll(this, ev);
|
|
}
|
|
|
|
if (args.Type == ScrollEventType.EndScroll)
|
|
{
|
|
if (args.NewValue == 0)
|
|
DoScrollMaxEvent(chartContainer, args);
|
|
|
|
else if (args.NewValue + sbar.LargeChange >= sbar.Maximum)
|
|
DoScrollMaxEvent(chartContainer, args);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ScrollMinEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of ScrollMin events
|
|
/// </summary>
|
|
internal void DoScrollMinEvent(ChartContainer chartContainer, ScrollEventArgs args)
|
|
{
|
|
if (ScrollMin != null)
|
|
{
|
|
ChartScrollEventArgs ev = new
|
|
ChartScrollEventArgs(chartContainer, args);
|
|
|
|
ScrollMin(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ScrollMaxEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of ScrollMax events
|
|
/// </summary>
|
|
internal void DoScrollMaxEvent(ChartContainer chartContainer, ScrollEventArgs args)
|
|
{
|
|
if (ScrollMax != null)
|
|
{
|
|
ChartScrollEventArgs ev = new
|
|
ChartScrollEventArgs(chartContainer, args);
|
|
|
|
ScrollMax(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SelectionChanged
|
|
|
|
/// <summary>
|
|
/// Handles invocation of SelectionChanged events
|
|
/// </summary>
|
|
internal void DoSelectionChangedEvent(
|
|
ChartVisualElement item, bool oldState, bool newState)
|
|
{
|
|
if (SelectionChanged != null)
|
|
{
|
|
SelectionChangedEventArgs ev = new
|
|
SelectionChangedEventArgs(item, oldState, newState, _SelectedItems.Count);
|
|
|
|
SelectionChanged(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SeriesDataBindingCompleteEvent
|
|
|
|
/// <summary>
|
|
/// Handles invocation of SeriesDataBindingComplete events
|
|
/// </summary>
|
|
internal void DoSeriesDataBindingCompleteEvent(BaseChart chartBase, BaseSeries series, object source)
|
|
{
|
|
if (SeriesDataBindingComplete != null)
|
|
{
|
|
SeriesDataBindingCompleteEventArgs ev = new
|
|
SeriesDataBindingCompleteEventArgs(chartBase, series, source);
|
|
|
|
SeriesDataBindingComplete(this, ev);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Mouse Support
|
|
|
|
#region OnMouseLeave
|
|
|
|
/// <summary>
|
|
/// OnMouseLeave
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnMouseLeave(EventArgs e)
|
|
{
|
|
_ChartPanel.InternalMouseLeave(e);
|
|
|
|
if (_MouseOverElement != null)
|
|
{
|
|
_MouseOverElement.InternalMouseLeave(e);
|
|
|
|
_MouseOverElement = null;
|
|
}
|
|
|
|
base.OnMouseLeave(e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OnMouseMove
|
|
|
|
/// <summary>
|
|
/// OnMouseMove
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnMouseMove(MouseEventArgs e)
|
|
{
|
|
if (CapturedItem != null)
|
|
{
|
|
CapturedItem.InternalMouseMove(e);
|
|
}
|
|
else
|
|
{
|
|
ChartVisualElement item = _ChartPanel.GetElementAt(e.Location);
|
|
|
|
if (item != null)
|
|
item.InternalMouseMove(e);
|
|
else
|
|
_ChartPanel.InternalMouseMove(e);
|
|
}
|
|
|
|
base.OnMouseMove(e);
|
|
|
|
base.Cursor = _ChartCursor;
|
|
|
|
if (_ChartPanel.IsDesignerHosted == true)
|
|
Cursor = Cursors.Arrow;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OnMouseDown
|
|
|
|
/// <summary>
|
|
/// OnMouseDown
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnMouseDown(MouseEventArgs e)
|
|
{
|
|
Focus();
|
|
|
|
ChartVisualElement item = _ChartPanel.GetElementAt(e.Location);
|
|
|
|
if (item != null)
|
|
item.InternalMouseDown(e);
|
|
else
|
|
_ChartPanel.InternalMouseDown(e);
|
|
|
|
base.OnMouseDown(e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OnMouseUp
|
|
|
|
/// <summary>
|
|
/// OnMouseUp
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnMouseUp(MouseEventArgs e)
|
|
{
|
|
if (CapturedItem != null)
|
|
{
|
|
CapturedItem.InternalMouseUp(e);
|
|
}
|
|
else
|
|
{
|
|
ChartVisualElement item = _ChartPanel.GetElementAt(e.Location);
|
|
|
|
if (item != null)
|
|
item.InternalMouseUp(e);
|
|
else
|
|
_ChartPanel.InternalMouseUp(e);
|
|
|
|
}
|
|
|
|
base.OnMouseUp(e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OnMouseClick
|
|
|
|
/// <summary>
|
|
/// OnMouseClick
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnMouseClick(MouseEventArgs e)
|
|
{
|
|
if (_MouseOverElement == null)
|
|
{
|
|
ChartVisualElement item = _ChartPanel.GetElementAt(e.Location);
|
|
|
|
if (item != null)
|
|
item.InternalMouseMove(e);
|
|
else
|
|
_ChartPanel.InternalMouseMove(e);
|
|
}
|
|
|
|
if (_MouseOverElement != null)
|
|
_MouseOverElement.InternalMouseClick(e);
|
|
|
|
base.OnMouseClick(e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OnMouseDoubleClick
|
|
|
|
/// <summary>
|
|
/// OnMouseDoubleClick
|
|
/// </summary>
|
|
/// <param name="e"></param>
|
|
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
|
{
|
|
if (_MouseOverElement == null)
|
|
{
|
|
ChartVisualElement item = _ChartPanel.GetElementAt(e.Location);
|
|
|
|
if (item != null)
|
|
item.InternalMouseMove(e);
|
|
else
|
|
_ChartPanel.InternalMouseMove(e);
|
|
}
|
|
|
|
if (_MouseOverElement != null)
|
|
_MouseOverElement.InternalMouseDoubleClick(e);
|
|
|
|
base.OnMouseDoubleClick(e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region GetElementAt
|
|
|
|
public ChartVisualElement GetElementAt(Point pt)
|
|
{
|
|
ChartVisualElement item = ChartPanel.GetElementAt(pt);
|
|
|
|
return (item ?? ChartPanel);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetSerialData
|
|
|
|
internal SerialElementCollection GetSerialData(bool root)
|
|
{
|
|
SerialElementCollection sec = new SerialElementCollection();
|
|
|
|
if (root == true)
|
|
sec.AddStartElement("ChartControl");
|
|
|
|
sec.AddValue("DataMember", DataMember, null);
|
|
//sec.AddValue("DataSource", DataSource, null);
|
|
|
|
if (_DefaultVisualStyles != null && _DefaultVisualStyles.IsEmpty == false)
|
|
sec.AddElement(_DefaultVisualStyles.GetSerialData());
|
|
|
|
sec.AddElement(ChartPanel.GetSerialData(""));
|
|
|
|
if (root == true)
|
|
sec.AddEndElement("ChartControl");
|
|
|
|
return (sec);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostInternalMouseMove
|
|
|
|
internal void PostInternalMouseMove()
|
|
{
|
|
Point pt = PointToClient(Control.MousePosition);
|
|
|
|
if (ClientRectangle.Contains(pt) == true)
|
|
Cursor.Position = Cursor.Position;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Cursor
|
|
|
|
/// <summary>
|
|
/// Cursor
|
|
/// </summary>
|
|
public override Cursor Cursor
|
|
{
|
|
get { return (base.Cursor); }
|
|
|
|
set
|
|
{
|
|
base.Cursor = value;
|
|
|
|
if (SetChartCursor == true)
|
|
ChartCursor = value;
|
|
else
|
|
DefaultCursor = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OnResize
|
|
|
|
protected override void OnResize(EventArgs e)
|
|
{
|
|
base.OnResize(e);
|
|
|
|
if (ChartPanel != null)
|
|
ChartPanel.InternalOnResize(e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Selection Support
|
|
|
|
private List<ChartContainer> _SelectedItems = new List<ChartContainer>();
|
|
|
|
public bool GetSelected(ChartContainer item)
|
|
{
|
|
if (item.ChartControl == null)
|
|
throw new Exception("Items must be a member of the ChartControl");
|
|
|
|
return (_SelectedItems.IndexOf(item) >= 0);
|
|
}
|
|
|
|
public void SetSelected(ChartContainer item, bool select)
|
|
{
|
|
SetSelectedEx(item, select, true);
|
|
}
|
|
|
|
#region SetSelectedEx
|
|
|
|
internal void SetSelectedEx(ChartContainer item, bool select, bool sendEvent)
|
|
{
|
|
int index = _SelectedItems.IndexOf(item);
|
|
|
|
if (select == false)
|
|
{
|
|
if (index >= 0)
|
|
{
|
|
_SelectedItems.RemoveAt(index);
|
|
|
|
item.IsSelected = false;
|
|
|
|
if (sendEvent == true)
|
|
OnSelectionChanged(item, true, false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (index < 0)
|
|
{
|
|
_SelectedItems.Add(item);
|
|
|
|
item.IsSelected = true;
|
|
|
|
if (sendEvent == true)
|
|
OnSelectionChanged(item, false, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
#region OnSelectionChanged
|
|
|
|
private void OnSelectionChanged(ChartContainer item, bool oldState, bool newState)
|
|
{
|
|
DoSelectionChangedEvent(item, oldState, newState);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region ClearAllSelected
|
|
|
|
/// <summary>
|
|
/// Clears all selected items
|
|
/// </summary>
|
|
public void ClearAllSelected()
|
|
{
|
|
for (int i=_SelectedItems.Count - 1; i>=0; i--)
|
|
SetSelectedEx(_SelectedItems[i], false, true);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Update support
|
|
|
|
///<summary>
|
|
/// Calling the BeginUpdate routine informs the Chart Control
|
|
/// that an extended update phase has begun. The Chart Control
|
|
/// will suspend all layout calculations and display updates
|
|
/// until the corresponding EndUpdate routine is called.
|
|
///
|
|
/// BeginUpdate / EndUpdate can be nested and must be
|
|
/// called in pairs � every BeginUpdate must have a
|
|
/// matching EndUpdate call.
|
|
///</summary>
|
|
public void BeginUpdate()
|
|
{
|
|
_BeginUpdateCount++;
|
|
}
|
|
|
|
///<summary>
|
|
/// Calling the EndUpdate routine informs the Chart Control
|
|
/// that an extended update phase has ended.
|
|
///
|
|
/// BeginUpdate / EndUpdate can be nested and must be
|
|
/// called in pairs � every EndUpdate must have a
|
|
/// matching BeginUpdate call.
|
|
///</summary>
|
|
public void EndUpdate()
|
|
{
|
|
if (_BeginUpdateCount > 0)
|
|
{
|
|
if (--_BeginUpdateCount == 0)
|
|
ChartPanel.InvalidateLayout();
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region InvalidateRender
|
|
|
|
/// <summary>
|
|
/// Invalidates render of the chart element.
|
|
/// </summary>
|
|
/// <param name="gridElement">Element to invalidate rendering for.</param>
|
|
internal void InvalidateRender(ChartVisualElement chartElement)
|
|
{
|
|
Rectangle bounds = chartElement.Bounds;
|
|
|
|
if (bounds.IsEmpty == false)
|
|
Invalidate(bounds, true);
|
|
}
|
|
|
|
internal void InvalidateRender(Rectangle bounds)
|
|
{
|
|
Invalidate(bounds, InvokeRequired == false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreFilterMessage
|
|
|
|
public bool PreFilterMessage(ref Message m)
|
|
{
|
|
if (IsDisposed == true)
|
|
return (false);
|
|
|
|
if (DesignMode == true || Enabled == false)
|
|
return (false);
|
|
|
|
if (ContainsFocus == true || m.Msg == WmMouseWheel)
|
|
{
|
|
if (m.Msg == WmMouseWheel)
|
|
{
|
|
Point pt = new Point(LoWord(m.LParam), HiWord(m.LParam));
|
|
|
|
IntPtr hWnd = WindowFromPoint(pt);
|
|
|
|
if (hWnd != IntPtr.Zero)
|
|
{
|
|
Control ctl = Control.FromHandle(hWnd);
|
|
|
|
if (ctl == this)
|
|
{
|
|
pt = PointToClient(pt);
|
|
|
|
MouseEventArgs e = new
|
|
MouseEventArgs(MouseButtons.None, 0, pt.X, pt.Y, HiWord(m.WParam));
|
|
|
|
ChartVisualElement item = _ChartPanel.GetElementAt(pt);
|
|
|
|
if (item != null)
|
|
item.InternalMouseWheel(e);
|
|
else
|
|
_ChartPanel.InternalMouseWheel(e);
|
|
|
|
return (true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return (false);
|
|
}
|
|
|
|
#region HiWord / LoWord
|
|
|
|
private int LoWord(int n)
|
|
{
|
|
return (short)(n & 0xffff);
|
|
}
|
|
|
|
private int HiWord(int n)
|
|
{
|
|
return (n >> 0x10);
|
|
}
|
|
|
|
private int LoWord(IntPtr n)
|
|
{
|
|
return LoWord((int)((long)n));
|
|
}
|
|
|
|
private int HiWord(IntPtr n)
|
|
{
|
|
return HiWord((int)((long)n));
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region INotifyPropertyChanged Members
|
|
|
|
/// <summary>
|
|
/// Occurs when property value has changed.
|
|
/// </summary>
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
/// <summary>
|
|
/// Default PropertyChanged processing
|
|
/// </summary>
|
|
/// <param name="s"></param>
|
|
/// <param name="changeType">invalidate</param>
|
|
protected void OnPropertyChangedEx(string s, VisualChangeType changeType)
|
|
{
|
|
OnPropertyChanged(s);
|
|
|
|
if (changeType == VisualChangeType.Layout)
|
|
Invalidate();
|
|
else
|
|
Invalidate();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Raises the PropertyChanged event.
|
|
/// </summary>
|
|
/// <param name="e">Event arguments</param>
|
|
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
|
|
{
|
|
PropertyChangedEventHandler handler = PropertyChanged;
|
|
|
|
if (handler != null)
|
|
handler(this, e);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Default PropertyChanged processing
|
|
/// </summary>
|
|
/// <param name="s"></param>
|
|
protected void OnPropertyChanged(string s)
|
|
{
|
|
if (PropertyChanged != null)
|
|
OnPropertyChanged(new PropertyChangedEventArgs(s));
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region States
|
|
|
|
[Flags]
|
|
private enum States : uint
|
|
{
|
|
}
|
|
|
|
#region TestState
|
|
|
|
private bool TestState(States state)
|
|
{
|
|
return ((_States & state) == state);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SetState
|
|
|
|
private void SetState(States state, bool value)
|
|
{
|
|
if (value == true)
|
|
_States |= state;
|
|
else
|
|
_States &= ~state;
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#endregion
|
|
}
|
|
|
|
#region enum
|
|
|
|
#region AutoScrollEnable
|
|
|
|
[Flags]
|
|
internal enum AutoScrollEnable
|
|
{
|
|
None = 0,
|
|
Vertical = (1 << 0),
|
|
Horizontal = (1 << 1),
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SortDirection
|
|
|
|
public enum SortDirection
|
|
{
|
|
None = 0,
|
|
Ascending = 1,
|
|
Descending = 2,
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region EventArgs
|
|
|
|
#region ChartCancelEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartCancelEventArgs
|
|
/// </summary>
|
|
public class ChartCancelEventArgs : ChartEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private bool _Cancel;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartCancelEventArgs
|
|
///</summary>
|
|
///<param name="ChartControl">Associated Chart</param>
|
|
public ChartCancelEventArgs(BaseChart chartBase)
|
|
: base(chartBase)
|
|
{
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether to cancel the default operation.
|
|
/// </summary>
|
|
public bool Cancel
|
|
{
|
|
get { return (_Cancel); }
|
|
set { _Cancel = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GridCompareElementsEventArgs
|
|
|
|
/// <summary>
|
|
/// GridCompareElementsEventArgs
|
|
/// </summary>
|
|
public class ChartCompareElementsEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartVisualElement _ChartElement;
|
|
|
|
private object _ElementA;
|
|
private object _ElementB;
|
|
|
|
private int _Result;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartCompareElementsEventArgs
|
|
///</summary>
|
|
///<param name="chartElement"></param>
|
|
///<param name="a"></param>
|
|
///<param name="b"></param>
|
|
public ChartCompareElementsEventArgs(
|
|
ChartVisualElement chartElement, object a, object b)
|
|
{
|
|
_ChartElement = chartElement;
|
|
|
|
_ElementA = a;
|
|
_ElementB = b;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the visual ChartElement associated with the sort.
|
|
/// </summary>
|
|
public ChartVisualElement ChartElement
|
|
{
|
|
get { return (_ChartElement); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the left-hand element of the comparison
|
|
/// </summary>
|
|
public object ElementA
|
|
{
|
|
get { return (_ElementA); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the right-hand element of the comparison
|
|
/// </summary>
|
|
public object ElementB
|
|
{
|
|
get { return (_ElementB); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the result of the element compare.
|
|
/// -1 = ElementA is less than ElementB
|
|
/// 0 = ElementA is equal to ElementB
|
|
/// +1 = ElementA is greater than ElementB
|
|
/// </summary>
|
|
public int Result
|
|
{
|
|
get { return (_Result); }
|
|
set { _Result = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartEventArgs
|
|
/// </summary>
|
|
public class ChartEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _Chart;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartControlEventArgs
|
|
///</summary>
|
|
///<param name="chartControl">Associated ChartControl</param>
|
|
public ChartEventArgs(BaseChart chart)
|
|
{
|
|
_Chart = chart;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated Chart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartDataBindingCompleteEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartDataBindingCompleteEventArgs
|
|
/// </summary>
|
|
public class ChartDataBindingCompleteEventArgs : ChartEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private object _Source;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartDataBindingCompleteEventArgs
|
|
///</summary>
|
|
///<param name="BaseChart"></param>
|
|
public ChartDataBindingCompleteEventArgs(BaseChart chart, object source)
|
|
: base(chart)
|
|
{
|
|
_Source = source;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the data source that was bound to.
|
|
/// </summary>
|
|
public object Source
|
|
{
|
|
get { return (_Source); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartDataBindingStartEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartDataBindingStartEventArgs
|
|
/// </summary>
|
|
public class ChartDataBindingStartEventArgs : ChartCancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private bool _AutoGenerateSeries;
|
|
private object _Source;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartDataBindingStartEventArgs
|
|
///</summary>
|
|
///<param name="chartBase">Associated ChartControl</param>
|
|
///<param name="row">Associated ChartPanel</param>
|
|
///<param name="source">The data source being bound to</param>
|
|
///<param name="autoGenerateSeries">Whether to auto-generate panel series</param>
|
|
public ChartDataBindingStartEventArgs(
|
|
BaseChart chartBase, object source, bool autoGenerateSeries)
|
|
: base(chartBase)
|
|
{
|
|
_Source = source;
|
|
_AutoGenerateSeries = autoGenerateSeries;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether to auto-generate
|
|
/// the the panel series from the bound data.
|
|
/// </summary>
|
|
public bool AutoGenerateSeries
|
|
{
|
|
get { return (_AutoGenerateSeries); }
|
|
set { _AutoGenerateSeries = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated data source being bound to.
|
|
/// </summary>
|
|
public object Source
|
|
{
|
|
get { return (_Source); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartEmptyTextMarkupLinkClickEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartEmptyTextMarkupLinkClickEventArgs
|
|
/// </summary>
|
|
public class ChartEmptyTextMarkupLinkClickEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private string _HRef;
|
|
private string _Name;
|
|
|
|
private ChartContainer _ChartContainer;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// ChartEmptyTextMarkupLinkClickEventArgs
|
|
/// </summary>
|
|
/// <param name="chartControl"></param>
|
|
/// <param name="title"></param>
|
|
/// <param name="name"></param>
|
|
/// <param name="href"></param>
|
|
public ChartEmptyTextMarkupLinkClickEventArgs(
|
|
ChartContainer chartContainer, string name, string href)
|
|
{
|
|
_HRef = href;
|
|
_Name = name;
|
|
|
|
_ChartContainer = chartContainer;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink HRef
|
|
/// </summary>
|
|
public string HRef
|
|
{
|
|
get { return (_HRef); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink Name
|
|
/// </summary>
|
|
public string Name
|
|
{
|
|
get { return (_Name); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartContainer
|
|
/// </summary>
|
|
public ChartContainer ChartContainer
|
|
{
|
|
get { return (_ChartContainer); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartGetElementStyleEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartGetElementStyleEventArgs
|
|
/// </summary>
|
|
public class ChartGetElementStyleEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartElement _ChartElement;
|
|
private StyleType _StyleType;
|
|
private BaseVisualStyle _Style;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartGetElementStyleEventArgs
|
|
///</summary>
|
|
public ChartGetElementStyleEventArgs(
|
|
ChartElement chartElement, StyleType styleType, BaseVisualStyle style)
|
|
{
|
|
_ChartElement = chartElement;
|
|
_StyleType = styleType;
|
|
_Style = style;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the ChartElement.
|
|
/// </summary>
|
|
public ChartElement ChartElement
|
|
{
|
|
get { return (_ChartElement); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the StyleType.
|
|
/// </summary>
|
|
public StyleType StyleType
|
|
{
|
|
get { return (_StyleType); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Style.
|
|
/// </summary>
|
|
public BaseVisualStyle Style
|
|
{
|
|
get { return (_Style); }
|
|
|
|
set
|
|
{
|
|
if (value == null)
|
|
throw new Exception("Style cannot be null.");
|
|
|
|
_Style = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartGetPieSeriesPointStyleEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartGetPieSeriesPointStyleEventArgs
|
|
/// </summary>
|
|
public class ChartGetPieSeriesPointStyleEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieSeriesPoint _PieSeriesPoint;
|
|
private StyleType _StyleType;
|
|
private BaseVisualStyle _Style;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// ChartGetPieSeriesPointStyleEventArgs
|
|
/// </summary>
|
|
/// <param name="pieSeriesPoint"></param>
|
|
/// <param name="styleType"></param>
|
|
/// <param name="style"></param>
|
|
public ChartGetPieSeriesPointStyleEventArgs(
|
|
PieSeriesPoint pieSeriesPoint, StyleType styleType, BaseVisualStyle style)
|
|
{
|
|
_PieSeriesPoint = pieSeriesPoint;
|
|
_StyleType = styleType;
|
|
_Style = style;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the PieSeriesPoint.
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (_PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the StyleType.
|
|
/// </summary>
|
|
public StyleType StyleType
|
|
{
|
|
get { return (_StyleType); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Style.
|
|
/// </summary>
|
|
public BaseVisualStyle Style
|
|
{
|
|
get { return (_Style); }
|
|
|
|
set
|
|
{
|
|
if (value == null)
|
|
throw new Exception("Style cannot be null.");
|
|
|
|
_Style = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartMatrixResizedEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartMatrixResizedEventArgs
|
|
/// </summary>
|
|
public class ChartMatrixResizedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartPanel _ChartPanel;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// ChartMatrixResizedEventArgs
|
|
/// </summary>
|
|
/// <param name="chartPanel"></param>
|
|
public ChartMatrixResizedEventArgs(ChartPanel chartPanel)
|
|
{
|
|
_ChartPanel = chartPanel;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartPanel
|
|
/// </summary>
|
|
public ChartPanel ChartPanel
|
|
{
|
|
get { return (_ChartPanel); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartMouseClickEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartMouseClickEventArgs
|
|
/// </summary>
|
|
public class ChartMouseClickEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _BaseChart;
|
|
private object _HitItem;
|
|
private MouseEventArgs _MouseEventArgs;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// ChartMouseClickEventArgs
|
|
/// </summary>
|
|
/// <param name="baseChart"></param>
|
|
/// <param name="item"></param>
|
|
/// <param name="e"></param>
|
|
public ChartMouseClickEventArgs(BaseChart baseChart, object item, MouseEventArgs e)
|
|
{
|
|
_BaseChart = baseChart;
|
|
_HitItem = item;
|
|
_MouseEventArgs = e;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated hit item.
|
|
/// </summary>
|
|
public object HitItem
|
|
{
|
|
get { return (_HitItem); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated MouseEventArgs
|
|
/// </summary>
|
|
public MouseEventArgs MouseEventArgs
|
|
{
|
|
get { return (_MouseEventArgs); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartMouseDoubleClickEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartMouseDoubleClickEventArgs
|
|
/// </summary>
|
|
public class ChartMouseDoubleClickEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _BaseChart;
|
|
private ItemHitArea _HitArea;
|
|
private ChartVisualElement _HitElement;
|
|
private object _HitItem;
|
|
private MouseEventArgs _MouseEventArgs;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// ChartMouseDoubleClickEventArgs
|
|
/// </summary>
|
|
/// <param name="baseChart"></param>
|
|
/// <param name="hitArea"></param>
|
|
/// <param name="hitItem"></param>
|
|
/// <param name="e"></param>
|
|
public ChartMouseDoubleClickEventArgs(BaseChart baseChart,
|
|
ItemHitArea hitArea, ChartVisualElement hitElement, object hitItem, MouseEventArgs e)
|
|
{
|
|
_BaseChart = baseChart;
|
|
|
|
_HitArea = hitArea;
|
|
_HitItem = hitItem;
|
|
_HitElement = hitElement;
|
|
|
|
_MouseEventArgs = e;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated hit area.
|
|
/// </summary>
|
|
public ItemHitArea HitArea
|
|
{
|
|
get { return (_HitArea); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated hit item.
|
|
/// </summary>
|
|
public object HitItem
|
|
{
|
|
get { return (_HitItem); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated hit Visual Chart Element.
|
|
/// </summary>
|
|
public ChartVisualElement HitElement
|
|
{
|
|
get { return (_HitElement); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated MouseEventArgs
|
|
/// </summary>
|
|
public MouseEventArgs MouseEventArgs
|
|
{
|
|
get { return (_MouseEventArgs); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartPanelCancelEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartPanelCancelEventArgs
|
|
/// </summary>
|
|
public class ChartPanelCancelEventArgs : ChartPanelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private bool _Cancel;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartPanelCancelEventArgs
|
|
///</summary>
|
|
///<param name="chartControl">Associated ChartControl</param>
|
|
///<param name="chartControl">Associated ChartPanel</param>
|
|
public ChartPanelCancelEventArgs(ChartPanel chartPanel)
|
|
: base(chartPanel)
|
|
{
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether to cancel the default operation.
|
|
/// </summary>
|
|
public bool Cancel
|
|
{
|
|
get { return (_Cancel); }
|
|
set { _Cancel = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartPanelEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartPanelEventArgs
|
|
/// </summary>
|
|
public class ChartPanelEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartPanel _ChartPanel;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartPanelEventArgs
|
|
///</summary>
|
|
///<param name="chartControl">Associated ChartControl</param>
|
|
///<param name="chartControl">Associated ChartPanel</param>
|
|
public ChartPanelEventArgs(ChartPanel chartPanel)
|
|
{
|
|
_ChartPanel = chartPanel;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartPanel
|
|
/// </summary>
|
|
public ChartPanel ChartPanel
|
|
{
|
|
get { return (_ChartPanel); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartPointLabelUpdateEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartPointLabelUpdateEventArgs
|
|
/// </summary>
|
|
public class ChartPointLabelUpdateEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private List<PointLabel> _PointLabels;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartPointLabelUpdateEventArgs
|
|
///</summary>
|
|
public ChartPointLabelUpdateEventArgs(
|
|
BaseChart chart, ChartSeries chartSeries, List<PointLabel> pointLabels)
|
|
{
|
|
_Chart = chart;
|
|
_ChartSeries = chartSeries;
|
|
_PointLabels = pointLabels;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart.
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries.
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated list of PointLabels.
|
|
/// </summary>
|
|
public List<PointLabel> PointLabels
|
|
{
|
|
get { return (_PointLabels); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartScrollEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartScrollEventArgs
|
|
/// </summary>
|
|
public class ChartScrollEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartContainer _ChartContainer;
|
|
private ScrollEventArgs _ScrollEventArgs;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartScrollEventArgs
|
|
///</summary>
|
|
///<param name="ChartContainer"></param>
|
|
///<param name="scrollEventArgs"></param>
|
|
public ChartScrollEventArgs(
|
|
ChartContainer chartContainer, ScrollEventArgs scrollEventArgs)
|
|
{
|
|
_ChartContainer = chartContainer;
|
|
_ScrollEventArgs = scrollEventArgs;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the ChartContainer that was scrolled
|
|
/// </summary>
|
|
public ChartContainer ChartContainer
|
|
{
|
|
get { return (_ChartContainer); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the scroll event args
|
|
/// </summary>
|
|
public ScrollEventArgs ScrollEventArgs
|
|
{
|
|
get { return (_ScrollEventArgs); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartScrollBarValueChangedEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartScrollBarValueChangedEventArgs
|
|
/// </summary>
|
|
public class ChartScrollBarValueChangedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartContainer _ChartContainer;
|
|
|
|
private int _OldValue;
|
|
private int _NewValue;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// ChartScrollBarValueChangedEventArgs
|
|
///</summary>
|
|
///<param name="chartContainer"></param>
|
|
///<param name="oldValue"></param>
|
|
///<param name="newValue"></param>
|
|
public ChartScrollBarValueChangedEventArgs(
|
|
ChartContainer chartContainer, int oldValue, int newValue)
|
|
{
|
|
_ChartContainer = chartContainer;
|
|
|
|
_OldValue = oldValue;
|
|
_NewValue = newValue;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartContainer
|
|
/// </summary>
|
|
public ChartContainer ChartContainer
|
|
{
|
|
get { return (_ChartContainer); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the old scroll Value
|
|
/// </summary>
|
|
public int OldValue
|
|
{
|
|
get { return (_OldValue); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the new scroll Value
|
|
/// </summary>
|
|
public int NewValue
|
|
{
|
|
get { return (_NewValue); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChartTitleMarkupLinkClickEventArgs
|
|
|
|
/// <summary>
|
|
/// ChartTitleMarkupLinkClickEventArgs
|
|
/// </summary>
|
|
public class ChartTitleMarkupLinkClickEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private string _HRef;
|
|
private string _Name;
|
|
|
|
private ChartNote _Title;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// ChartTitleMarkupLinkClickEventArgs
|
|
/// </summary>
|
|
/// <param name="chartControl"></param>
|
|
/// <param name="title"></param>
|
|
/// <param name="name"></param>
|
|
/// <param name="href"></param>
|
|
public ChartTitleMarkupLinkClickEventArgs(
|
|
ChartNote title, string name, string href)
|
|
{
|
|
_HRef = href;
|
|
_Name = name;
|
|
|
|
_Title = title;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink HRef
|
|
/// </summary>
|
|
public string HRef
|
|
{
|
|
get { return (_HRef); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink Name
|
|
/// </summary>
|
|
public string Name
|
|
{
|
|
get { return (_Name); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Title
|
|
/// </summary>
|
|
public ChartNote Title
|
|
{
|
|
get { return (_Title); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairAxisLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// GetCrosshairAxisLabelEventArgs
|
|
/// </summary>
|
|
public class GetCrosshairAxisLabelEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartAxis _ChartAxis;
|
|
private object _Value;
|
|
private string _LabelText;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// GetCrosshairAxisLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="axis">ChartAxis</param>
|
|
/// <param name="value">object</param>
|
|
/// <param name="labelText">string List</param>
|
|
public GetCrosshairAxisLabelEventArgs(
|
|
ChartAxis axis, object value, string labelText)
|
|
{
|
|
_ChartAxis = axis;
|
|
_Value = value;
|
|
_LabelText = labelText;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartAxis
|
|
/// </summary>
|
|
public ChartAxis ChartAxis
|
|
{
|
|
get { return (_ChartAxis); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartXy
|
|
/// </summary>
|
|
public ChartXy ChartXy
|
|
{
|
|
get { return ((ChartXy)_ChartAxis.Parent); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated label Value
|
|
/// </summary>
|
|
public object Value
|
|
{
|
|
get { return (_Value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the label Text
|
|
/// </summary>
|
|
public string LabelText
|
|
{
|
|
get { return (_LabelText); }
|
|
set { _LabelText = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairLabelHeaderEventArgs
|
|
|
|
/// <summary>
|
|
/// GetCrosshairLabelHeaderEventArgs
|
|
/// </summary>
|
|
public class GetCrosshairLabelHeaderEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _Chart;
|
|
private CrosshairPoint _CrosshairPoint;
|
|
private List<CrosshairPoint> _CrosshairPoints;
|
|
private string _Text;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// GetCrosshairLabelHeaderEventArgs
|
|
/// </summary>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="cp">CrosshairPoint</param>
|
|
/// <param name="cps">CrosshairPoint List</param>
|
|
/// <param name="text">Default header text</param>
|
|
public GetCrosshairLabelHeaderEventArgs(
|
|
BaseChart chart, CrosshairPoint cp, List<CrosshairPoint> cps, string text)
|
|
{
|
|
_Chart = chart;
|
|
_CrosshairPoint = cp;
|
|
_CrosshairPoints = cps;
|
|
_Text = text;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated CrosshairPoint (for which
|
|
/// the header text is defined for)
|
|
/// </summary>
|
|
public CrosshairPoint CrosshairPoint
|
|
{
|
|
get { return (_CrosshairPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the full list of CrosshairPoints
|
|
/// </summary>
|
|
public List<CrosshairPoint> CrosshairPoints
|
|
{
|
|
get { return (_CrosshairPoints); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the CrosshairPoint header Text
|
|
/// </summary>
|
|
public string Text
|
|
{
|
|
get { return (_Text); }
|
|
set { _Text = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetCrosshairLabelItemEventArgs
|
|
|
|
/// <summary>
|
|
/// GetCrosshairLabelItemEventArgs
|
|
/// </summary>
|
|
public class GetCrosshairLabelItemEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _Chart;
|
|
private CrosshairPoint _CrosshairPoint;
|
|
private string _Text;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// GetCrosshairLabelItemEventArgs
|
|
/// </summary>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="cp">CrosshairPoint</param>
|
|
/// <param name="text">Item text</param>
|
|
public GetCrosshairLabelItemEventArgs(
|
|
BaseChart chart, CrosshairPoint cp, string text)
|
|
{
|
|
_Chart = chart;
|
|
_CrosshairPoint = cp;
|
|
_Text = text;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated CrosshairPoint
|
|
/// </summary>
|
|
public CrosshairPoint CrosshairPoint
|
|
{
|
|
get { return (_CrosshairPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the CrosshairPoint item Text
|
|
/// </summary>
|
|
public string Text
|
|
{
|
|
get { return (_Text); }
|
|
set { _Text = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetPieCenterLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// GetPieCenterLabelEventArgs
|
|
/// </summary>
|
|
public class GetPieCenterLabelEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _PieChart;
|
|
private string _LabelText;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// GetPieCenterLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="text"></param>
|
|
public GetPieCenterLabelEventArgs(PieChart pieChart, string text)
|
|
{
|
|
_PieChart = pieChart;
|
|
_LabelText = text;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Center Label Text
|
|
/// </summary>
|
|
public string LabelText
|
|
{
|
|
get { return (_LabelText); }
|
|
set { _LabelText = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetSliceLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// GetSliceLabelEventArgs
|
|
/// </summary>
|
|
public class GetSliceLabelEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _Chart;
|
|
private PieSeries _ChartSeries;
|
|
private PieSeriesPoint _Psp;
|
|
private bool _InnerLabel;
|
|
private string _Text;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// GetSliceLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="chart"></param>
|
|
/// <param name="chartSeries"></param>
|
|
/// <param name="psp"></param>
|
|
/// <param name="inner"></param>
|
|
/// <param name="text"></param>
|
|
/// <returns></returns>
|
|
public GetSliceLabelEventArgs(PieChart chart,
|
|
PieSeries chartSeries, PieSeriesPoint psp, bool inner, string text)
|
|
{
|
|
_Chart = chart;
|
|
_ChartSeries = chartSeries;
|
|
_Psp = psp;
|
|
_InnerLabel = inner;
|
|
_Text = text;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries
|
|
/// </summary>
|
|
public PieSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (_Psp); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets whether the request is for the inner
|
|
/// or outer label of the slice.
|
|
/// </summary>
|
|
public bool InnerLabel
|
|
{
|
|
get { return (_InnerLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the label Text
|
|
/// </summary>
|
|
public string Text
|
|
{
|
|
get { return (_Text); }
|
|
set { _Text = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetTickmarkLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// GetTickmarkLabelEventArgs
|
|
/// </summary>
|
|
public class GetTickmarkLabelEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartAxis _ChartAxis;
|
|
private object _Value;
|
|
private string _LabelText;
|
|
private Color _LabelColor = Color.Empty;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// GetTickmarkLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="axis">ChartAxis</param>
|
|
/// <param name="value">object</param>
|
|
/// <param name="labelText">string List</param>
|
|
public GetTickmarkLabelEventArgs(
|
|
ChartAxis axis, object value, string labelText)
|
|
{
|
|
_ChartAxis = axis;
|
|
_Value = value;
|
|
_LabelText = labelText;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartAxis
|
|
/// </summary>
|
|
public ChartAxis ChartAxis
|
|
{
|
|
get { return (_ChartAxis); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartXy
|
|
/// </summary>
|
|
public ChartXy ChartXy
|
|
{
|
|
get { return ((ChartXy)_ChartAxis.Parent); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated label Value
|
|
/// </summary>
|
|
public object Value
|
|
{
|
|
get { return (_Value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the label Text
|
|
/// </summary>
|
|
public string LabelText
|
|
{
|
|
get { return (_LabelText); }
|
|
set { _LabelText = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the label Color
|
|
/// </summary>
|
|
public Color LabelColor
|
|
{
|
|
get { return (_LabelColor); }
|
|
set { _LabelColor = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GetToolTipEventArgs
|
|
|
|
/// <summary>
|
|
/// GetToolTipEventArgs
|
|
/// </summary>
|
|
public class GetToolTipEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _BaseChart;
|
|
private BaseSeries _BaseSeries;
|
|
private SeriesPoint _SeriesPoint;
|
|
|
|
private string _ToolTip;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// GetToolTipEventArgs
|
|
/// </summary>
|
|
/// <param name="baseChart"></param>
|
|
/// <param name="baseSeries"></param>
|
|
/// <param name="sp"></param>
|
|
/// <param name="toolTip"></param>
|
|
public GetToolTipEventArgs(BaseChart baseChart,
|
|
BaseSeries baseSeries, SeriesPoint sp, string toolTip)
|
|
{
|
|
_BaseChart = baseChart;
|
|
_BaseSeries = baseSeries;
|
|
_SeriesPoint = sp;
|
|
|
|
_ToolTip = toolTip;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart.
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseSeries.
|
|
/// </summary>
|
|
public BaseSeries BaseSeries
|
|
{
|
|
get { return (_BaseSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated SeriesPoint.
|
|
/// </summary>
|
|
public SeriesPoint SeriesPoint
|
|
{
|
|
get { return (_SeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart.
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_BaseChart as PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeries.
|
|
/// </summary>
|
|
public PieSeries PieSeries
|
|
{
|
|
get { return (_BaseSeries as PieSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint.
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (_SeriesPoint as PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the associated ToolTip text
|
|
/// </summary>
|
|
public string ToolTip
|
|
{
|
|
get { return (_ToolTip); }
|
|
set { _ToolTip = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region LegendItemCheckedChangedEventArgs
|
|
|
|
/// <summary>
|
|
/// LegendItemCheckedChangedEventArgs
|
|
/// </summary>
|
|
public class LegendItemCheckedChangedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartLegend _Legend;
|
|
private ChartLegendItem _LegendItem;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// LegendItemCheckedChangedEventArgs
|
|
///</summary>
|
|
///<param name="legend">Associated legend</param>
|
|
///<param name="legendItem">Associated legend item</param>
|
|
public LegendItemCheckedChangedEventArgs(
|
|
ChartLegend legend, ChartLegendItem legendItem)
|
|
{
|
|
_Legend = legend;
|
|
_LegendItem = legendItem;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated Legend.
|
|
/// </summary>
|
|
public ChartLegend Legend
|
|
{
|
|
get { return (_Legend); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated LegendItem.
|
|
/// </summary>
|
|
public ChartLegendItem LegendItem
|
|
{
|
|
get { return (_LegendItem); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieCenterMarkupLinkClickEventArgs
|
|
|
|
/// <summary>
|
|
/// PieCenterMarkupLinkClickEventArgs
|
|
/// </summary>
|
|
public class PieCenterMarkupLinkClickEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _PieChart;
|
|
|
|
private string _HRef;
|
|
private string _Name;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// PieCenterMarkupLinkClickEventArgs
|
|
///</summary>
|
|
///<param name="pieChart"></param>
|
|
///<param name="name"></param>
|
|
///<param name="href"></param>
|
|
public PieCenterMarkupLinkClickEventArgs(PieChart pieChart, string name, string href)
|
|
{
|
|
_HRef = href;
|
|
_Name = name;
|
|
|
|
_PieChart = pieChart;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink HRef
|
|
/// </summary>
|
|
public string HRef
|
|
{
|
|
get { return (_HRef); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink Name
|
|
/// </summary>
|
|
public string Name
|
|
{
|
|
get { return (_Name); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieDetachChangedEventArgs
|
|
|
|
/// <summary>
|
|
/// PieDetachChangedEventArgs
|
|
/// </summary>
|
|
public class PieDetachChangedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _PieChart;
|
|
private PieSeries _PieSeries;
|
|
private PieSelectionMode _PieSelectionMode;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PieDetachChangedEventArgs
|
|
/// </summary>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="pieSeries"></param>
|
|
/// <param name="psm"></param>
|
|
public PieDetachChangedEventArgs(
|
|
PieChart pieChart, PieSeries pieSeries, PieSelectionMode psm)
|
|
{
|
|
_PieChart = pieChart;
|
|
_PieSeries = pieSeries;
|
|
|
|
_PieSelectionMode = psm;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeries.
|
|
/// </summary>
|
|
public PieSeries PieSeries
|
|
{
|
|
get { return (_PieSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSelectionMode.
|
|
/// </summary>
|
|
public PieSelectionMode PieSelectionMode
|
|
{
|
|
get { return (_PieSelectionMode); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieExplodeChangedEventArgs
|
|
|
|
/// <summary>
|
|
/// PieExplodeChangedEventArgs
|
|
/// </summary>
|
|
public class PieExplodeChangedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _PieChart;
|
|
private PieSeries _PieSeries;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PieExplodeChangedEventArgs
|
|
/// </summary>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="pieSeries"></param>
|
|
public PieExplodeChangedEventArgs(PieChart pieChart, PieSeries pieSeries)
|
|
{
|
|
_PieChart = pieChart;
|
|
_PieSeries = pieSeries;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeries.
|
|
/// </summary>
|
|
public PieSeries PieSeries
|
|
{
|
|
get { return (_PieSeries); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieRingLevelChangingEventArgs
|
|
|
|
/// <summary>
|
|
/// PieRingLevelChangedEventArgs
|
|
/// </summary>
|
|
public class PieRingLevelChangedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _PieChart;
|
|
private PieSeriesPointCollection _SpcOld;
|
|
private PieSeriesPointCollection _SpcNew;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PieRingLevelChanged
|
|
/// </summary>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="spcOld"></param>
|
|
/// <param name="spcNew"></param>
|
|
public PieRingLevelChangedEventArgs(
|
|
PieChart pieChart, PieSeriesPointCollection spcOld, PieSeriesPointCollection spcNew)
|
|
{
|
|
_PieChart = pieChart;
|
|
|
|
_SpcOld = spcOld;
|
|
_SpcNew = spcNew;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the old, post-change PieSeriesPointCollection.
|
|
/// </summary>
|
|
public PieSeriesPointCollection SpcOld
|
|
{
|
|
get { return (_SpcOld); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the new, post-change PieSeriesPointCollection.
|
|
/// </summary>
|
|
public PieSeriesPointCollection SpcNew
|
|
{
|
|
get { return (_SpcNew); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieRingLevelChangingEventArgs
|
|
|
|
/// <summary>
|
|
/// PieRingLevelChanging
|
|
/// </summary>
|
|
public class PieRingLevelChangingEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _PieChart;
|
|
private PieSeriesPointCollection _SpcOld;
|
|
private PieSeriesPointCollection _SpcNew;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PieRingLevelChangingEventArgs
|
|
/// </summary>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="spcOld"></param>
|
|
/// <param name="spcNew"></param>
|
|
public PieRingLevelChangingEventArgs(
|
|
PieChart pieChart, PieSeriesPointCollection spcOld, PieSeriesPointCollection spcNew)
|
|
{
|
|
_PieChart = pieChart;
|
|
|
|
_SpcOld = spcOld;
|
|
_SpcNew = spcNew;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the old, pre-change PieSeriesPointCollection.
|
|
/// </summary>
|
|
public PieSeriesPointCollection SpcOld
|
|
{
|
|
get { return (_SpcOld); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the new, pre-change PieSeriesPointCollection.
|
|
/// </summary>
|
|
public PieSeriesPointCollection SpcNew
|
|
{
|
|
get { return (_SpcNew); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PieSelectionChangedEventArgs
|
|
|
|
/// <summary>
|
|
/// PieSelectionChangedEventArgs
|
|
/// </summary>
|
|
public class PieSelectionChangedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private PieChart _PieChart;
|
|
private PieSeries _PieSeries;
|
|
private PieSeriesPoint _PieSeriesPoint;
|
|
private PieSelectionMode _PieSelectionMode;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PieSelectionChangedEventArgs
|
|
/// </summary>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="pieSeries"></param>
|
|
/// <param name="psp"></param>
|
|
/// <param name="psm"></param>
|
|
public PieSelectionChangedEventArgs(
|
|
PieChart pieChart, PieSeries pieSeries, PieSeriesPoint psp, PieSelectionMode psm)
|
|
{
|
|
_PieChart = pieChart;
|
|
_PieSeries = pieSeries;
|
|
|
|
_PieSeriesPoint = psp;
|
|
_PieSelectionMode = psm;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeries.
|
|
/// </summary>
|
|
public PieSeries PieSeries
|
|
{
|
|
get { return (_PieSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint (may not be
|
|
/// applicable for the associated PieSelectionMode).
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (_PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSelectionMode.
|
|
/// </summary>
|
|
public PieSelectionMode PieSelectionMode
|
|
{
|
|
get { return (_PieSelectionMode); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostLoadLegendDataEventArgs
|
|
|
|
/// <summary>
|
|
/// PostLoadLegendDataEventArgs
|
|
/// </summary>
|
|
public class PostLoadLegendDataEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartLegend _Legend;
|
|
private ChartContainer _ChartContainer;
|
|
|
|
#endregion
|
|
|
|
public PostLoadLegendDataEventArgs(ChartLegend legend)
|
|
{
|
|
_Legend = legend;
|
|
_ChartContainer = legend.ParentChartContainer;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated Legend
|
|
/// </summary>
|
|
public ChartLegend Legend
|
|
{
|
|
get { return (_Legend); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Legend's parent ChartContainer
|
|
/// </summary>
|
|
public ChartContainer ChartContainer
|
|
{
|
|
get { return (_ChartContainer); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderContentBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderContentBackgroundEventArgs
|
|
/// </summary>
|
|
public class PostRenderContentBackgroundEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _BaseChart;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderContentBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="bounds">Bounds</param>
|
|
public PostRenderContentBackgroundEventArgs(Graphics g, BaseChart baseChart, Rectangle bounds)
|
|
{
|
|
_Graphics = g;
|
|
_BaseChart = baseChart;
|
|
_Bounds = bounds;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartXy
|
|
/// </summary>
|
|
public ChartXy ChartXy
|
|
{
|
|
get { return (_BaseChart as ChartXy); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_BaseChart as PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated bounding rectangle
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderFrameBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderFrameBackgroundEventArgs
|
|
/// </summary>
|
|
public class PostRenderFrameBackgroundEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _BaseChart;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderFrameBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="bounds">Bounds</param>
|
|
public PostRenderFrameBackgroundEventArgs(Graphics g, BaseChart baseChart, Rectangle bounds)
|
|
{
|
|
_Graphics = g;
|
|
_BaseChart = baseChart;
|
|
_Bounds = bounds;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartXy
|
|
/// </summary>
|
|
public ChartXy ChartXy
|
|
{
|
|
get { return (_BaseChart as ChartXy); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_BaseChart as PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated bounding rectangle
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPanelBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderPanelBackgroundEventArgs
|
|
/// </summary>
|
|
public class PostRenderPanelBackgroundEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private ChartPanel _ChartPanel;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderPanelBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="bounds">Bounds</param>
|
|
public PostRenderPanelBackgroundEventArgs(Graphics g, ChartPanel panel, Rectangle bounds)
|
|
{
|
|
_Graphics = g;
|
|
_ChartPanel = panel;
|
|
_Bounds = bounds;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartPanel
|
|
/// </summary>
|
|
public ChartPanel ChartPanel
|
|
{
|
|
get { return (_ChartPanel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated bounding rectangle
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesBarEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderSeriesBarEventArgs
|
|
/// </summary>
|
|
public class PostRenderSeriesBarEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private SeriesPoint _SeriesPoint;
|
|
private Rectangle _Bounds;
|
|
private Rectangle _ExtendedBounds;
|
|
private BarSegment _BarSegment;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderSeriesBarEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="series">Chart Series</param>
|
|
/// <param name="sp">SeriesPoint</param>
|
|
public PostRenderSeriesBarEventArgs(Graphics graphics, BaseChart chart,
|
|
ChartSeries series, SeriesPoint sp, Rectangle r, Rectangle r2, BarSegment segment)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_SeriesPoint = sp;
|
|
_Bounds = r;
|
|
_ExtendedBounds = r2;
|
|
_BarSegment = segment;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounds for the bar segment.
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated SeriesPoint
|
|
/// </summary>
|
|
public SeriesPoint SeriesPoint
|
|
{
|
|
get { return (_SeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the 'extended' rectangle for the bar (calculated based
|
|
/// upon the series maximum displayed bar bounds).
|
|
/// </summary>
|
|
public Rectangle ExtendedBounds
|
|
{
|
|
get { return (_ExtendedBounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated 'segment' of the bar being rendered.
|
|
/// </summary>
|
|
public BarSegment BarSegment
|
|
{
|
|
get { return (_BarSegment); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesHiLoBarEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderSeriesHiLoBarEventArgs
|
|
/// </summary>
|
|
public class PostRenderSeriesHiLoBarEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
|
|
private HiLoRenderData _RenderData;
|
|
private HiLoBarSegment _BarSegment;
|
|
|
|
private Point _Pt1;
|
|
private Point _Pt2;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderSeriesHiLoBarEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="chartXy"></param>
|
|
/// <param name="chartSeries"></param>
|
|
/// <param name="rd"></param>
|
|
/// <param name="pt1"></param>
|
|
/// <param name="pt2"></param>
|
|
/// <param name="segment"></param>
|
|
public PostRenderSeriesHiLoBarEventArgs(Graphics g, BaseChart chart,
|
|
ChartSeries series, HiLoRenderData rd, Point pt1, Point pt2, HiLoBarSegment segment)
|
|
{
|
|
_Graphics = g;
|
|
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
|
|
_RenderData = rd;
|
|
_BarSegment = segment;
|
|
|
|
_Pt1 = pt1;
|
|
_Pt2 = pt2;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HiLo RenderData.
|
|
/// </summary>
|
|
public HiLoRenderData RenderData
|
|
{
|
|
get { return (_RenderData); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HiLo BarSegment.
|
|
/// </summary>
|
|
public HiLoBarSegment BarSegment
|
|
{
|
|
get { return (_BarSegment); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the initial segment Point.
|
|
/// </summary>
|
|
public Point Point1
|
|
{
|
|
get { return (_Pt1); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the terminal segment Point.
|
|
/// </summary>
|
|
public Point Point2
|
|
{
|
|
get { return (_Pt2); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSliceEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderSliceEventArgs
|
|
/// </summary>
|
|
public class PostRenderSliceEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private GraphicsPath _GraphicsPath;
|
|
|
|
private PieChart _PieChart;
|
|
private PieSeries _PieSeries;
|
|
private PieSeriesPoint _PieSeriesPoint;
|
|
|
|
private SliceRenderType _SliceRenderType;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderSliceEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="path"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="pieSeries"></param>
|
|
/// <param name="psp"></param>
|
|
/// <param name="type"></param>
|
|
public PostRenderSliceEventArgs(Graphics g, GraphicsPath path,
|
|
PieChart pieChart, PieSeries pieSeries, PieSeriesPoint psp, SliceRenderType rtype)
|
|
{
|
|
_Graphics = g;
|
|
_GraphicsPath = path;
|
|
|
|
_PieChart = pieChart;
|
|
_PieSeries = pieSeries;
|
|
_PieSeriesPoint = psp;
|
|
|
|
_SliceRenderType = rtype;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeries
|
|
/// </summary>
|
|
public PieSeries PieSeries
|
|
{
|
|
get { return (_PieSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the GraphicsPath for the slice.
|
|
/// </summary>
|
|
public GraphicsPath GraphicsPath
|
|
{
|
|
get { return (_GraphicsPath); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the SliceRenderType - they 'type' of slice element being rendered.
|
|
/// </summary>
|
|
public SliceRenderType SliceRenderType
|
|
{
|
|
get { return (_SliceRenderType); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPieCenterBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderPieCenterBackgroundEventArgs
|
|
/// </summary>
|
|
public class PostRenderPieCenterBackgroundEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private Rectangle _CenterBounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderPieCenterBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="rc"></param>
|
|
public PostRenderPieCenterBackgroundEventArgs(
|
|
Graphics g, PieChart pieChart, Rectangle rc)
|
|
{
|
|
_Graphics = g;
|
|
_PieChart = pieChart;
|
|
_CenterBounds = rc;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Pie Center Bounds.
|
|
/// </summary>
|
|
public Rectangle CenterBounds
|
|
{
|
|
get { return (_CenterBounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPieCenterContentEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderPieCenterContentEventArgs
|
|
/// </summary>
|
|
public class PostRenderPieCenterContentEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private Rectangle _TextBounds;
|
|
private string _CenterLabel;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderPieCenterContentEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="rt"></param>
|
|
/// <param name="centerlabel"></param>
|
|
public PostRenderPieCenterContentEventArgs(
|
|
Graphics g, PieChart pieChart, Rectangle rt, string centerlabel)
|
|
{
|
|
_Graphics = g;
|
|
_PieChart = pieChart;
|
|
_TextBounds = rt;
|
|
_CenterLabel = centerlabel;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Pie Center Text Bounds.
|
|
/// </summary>
|
|
public Rectangle TextBounds
|
|
{
|
|
get { return (_TextBounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the center text label.
|
|
/// </summary>
|
|
public string CenterLabel
|
|
{
|
|
get { return (_CenterLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPointConnectorEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderPointConnectorEventArgs
|
|
/// </summary>
|
|
public class PostRenderPointConnectorEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private PointLabel _PointLabel;
|
|
private bool _IsCrosshairPoint;
|
|
private Point _DataPoint;
|
|
private Point _LabelPoint;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderPointConnectorEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="series">Chart Series</param>
|
|
/// <param name="pointLabel">PointLabel</param>
|
|
/// <param name="isCrosshairPoint">Is the point a crosshair point</param>
|
|
/// <param name="dataPt">Data Point</param>
|
|
/// <param name="labelPt">Label Point</param>
|
|
public PostRenderPointConnectorEventArgs(Graphics graphics, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPt, Point dataPt, Point labelPt)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_PointLabel = pointLabel;
|
|
_IsCrosshairPoint = isCrosshairPt;
|
|
_DataPoint = dataPt;
|
|
_LabelPoint = labelPt;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart.
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries.
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object.
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PointLabel.
|
|
/// </summary>
|
|
public PointLabel PointLabel
|
|
{
|
|
get { return (_PointLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the whether the point is a Crosshair Point.
|
|
/// </summary>
|
|
public bool IsCrosshairPoint
|
|
{
|
|
get { return (_IsCrosshairPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the data-side Connector Point.
|
|
/// </summary>
|
|
public Point DataPoint
|
|
{
|
|
get { return (_DataPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the label-side Connector Point.
|
|
/// </summary>
|
|
public Point LabelPoint
|
|
{
|
|
get { return (_LabelPoint); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderPointLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderPointLabelEventArgs
|
|
/// </summary>
|
|
public class PostRenderPointLabelEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private PointLabel _PointLabel;
|
|
private bool _IsCrosshairPoint;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderPointLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="series">Chart Series</param>
|
|
/// <param name="pointLabel">PointLabel</param>
|
|
/// <param name="isCrosshairPoint">Is the point a crosshair point</param>
|
|
/// <param name="bounds">Display Bounds</param>
|
|
public PostRenderPointLabelEventArgs(Graphics graphics, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPoint, Rectangle bounds)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_PointLabel = pointLabel;
|
|
_IsCrosshairPoint = isCrosshairPoint;
|
|
_Bounds = bounds;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart.
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries.
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object.
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PointLabel.
|
|
/// </summary>
|
|
public PointLabel PointLabel
|
|
{
|
|
get { return (_PointLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the whether the point is a Crosshair Point.
|
|
/// </summary>
|
|
public bool IsCrosshairPoint
|
|
{
|
|
get { return (_IsCrosshairPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounding display rectangle.
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderRadialGridEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderRadialGridEventArgs
|
|
/// </summary>
|
|
public class PostRenderRadialGridEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
|
|
private PieChart _PieChart;
|
|
|
|
private double _OuterRadius;
|
|
private double _InnerRadius;
|
|
private double _ExpDelta;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderRadialGridEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="outerRadius"></param>
|
|
/// <param name="innerRadius"></param>
|
|
/// <param name="exp"></param>
|
|
public PostRenderRadialGridEventArgs(Graphics graphics,
|
|
PieChart pieChart, double outerRadius, double innerRadius, double exp)
|
|
{
|
|
_Graphics = graphics;
|
|
|
|
_PieChart = pieChart;
|
|
|
|
_OuterRadius = outerRadius;
|
|
_InnerRadius = innerRadius;
|
|
_ExpDelta = exp;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart.
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the inner, bounding radius for the grid.
|
|
/// </summary>
|
|
public double InnerRadius
|
|
{
|
|
get { return (_InnerRadius); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the outer, bounding radius for the grid.
|
|
/// </summary>
|
|
public double OuterRadius
|
|
{
|
|
get { return (_OuterRadius); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the expanded/exploded delta for the grid. This is
|
|
/// the adjustment needed if the pie has been expanded. If you
|
|
/// want to render an expanded grid, then this delta should be
|
|
/// added to both the inner and outer radius values.
|
|
/// </summary>
|
|
public double ExpDelta
|
|
{
|
|
get { return (_ExpDelta); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object.
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PostRenderSeriesPointEventArgs
|
|
|
|
/// <summary>
|
|
/// PostRenderSeriesPointEventArgs
|
|
/// </summary>
|
|
public class PostRenderSeriesPointEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private Point _Point;
|
|
private SeriesPoint _SeriesPoint;
|
|
private Size _PointSize;
|
|
private Image _Marker;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PostRenderSeriesPointEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="series">Chart Series</param>
|
|
/// <param name="pt">Marker Point (center)</param>
|
|
/// <param name="sp">SeriesPoint</param>
|
|
/// <param name="pointSize">Max marker point size</param>
|
|
/// <param name="marker">Marker Image</param>
|
|
public PostRenderSeriesPointEventArgs(Graphics graphics,
|
|
BaseChart chart, ChartSeries series, SeriesPoint sp, Point pt, Size pointSize, Image marker)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_Point = pt;
|
|
_SeriesPoint = sp;
|
|
_PointSize = pointSize;
|
|
_Marker = marker;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the center point for the marker
|
|
/// </summary>
|
|
public Point Point
|
|
{
|
|
get { return (_Point); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated SeriesPoint
|
|
/// </summary>
|
|
public SeriesPoint SeriesPoint
|
|
{
|
|
get { return (_SeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the max size for the point marker
|
|
/// </summary>
|
|
public Size PointSize
|
|
{
|
|
get { return (_PointSize); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated marker Image
|
|
/// </summary>
|
|
public Image Marker
|
|
{
|
|
get { return (_Marker); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreLoadLegendDataEventArgs
|
|
|
|
/// <summary>
|
|
/// PreLoadLegendDataEventArgs
|
|
/// </summary>
|
|
public class PreLoadLegendDataEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartLegend _Legend;
|
|
private ChartContainer _ChartContainer;
|
|
|
|
#endregion
|
|
|
|
public PreLoadLegendDataEventArgs(ChartLegend legend)
|
|
{
|
|
_Legend = legend;
|
|
_ChartContainer = legend.ParentChartContainer;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated Legend
|
|
/// </summary>
|
|
public ChartLegend Legend
|
|
{
|
|
get { return (_Legend); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Legend's parent ChartContainer
|
|
/// </summary>
|
|
public ChartContainer ChartContainer
|
|
{
|
|
get { return (_ChartContainer); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderContentBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderContentBackgroundEventArgs
|
|
/// </summary>
|
|
public class PreRenderContentBackgroundEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _BaseChart;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderContentBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="baseChart"></param>
|
|
/// <param name="r"></param>
|
|
public PreRenderContentBackgroundEventArgs(Graphics g, BaseChart baseChart, Rectangle r)
|
|
{
|
|
_Graphics = g;
|
|
_BaseChart = baseChart;
|
|
_Bounds = r;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartXy
|
|
/// </summary>
|
|
public ChartXy ChartXy
|
|
{
|
|
get { return (_BaseChart as ChartXy); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_BaseChart as PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounds for the bar segment.
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderFrameBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderFrameBackgroundEventArgs
|
|
/// </summary>
|
|
public class PreRenderFrameBackgroundEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _BaseChart;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderFrameBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="baseChart"></param>
|
|
/// <param name="r"></param>
|
|
public PreRenderFrameBackgroundEventArgs(Graphics g, BaseChart baseChart, Rectangle r)
|
|
{
|
|
_Graphics = g;
|
|
_BaseChart = baseChart;
|
|
_Bounds = r;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartXy
|
|
/// </summary>
|
|
public ChartXy ChartXy
|
|
{
|
|
get { return (_BaseChart as ChartXy); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_BaseChart as PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounds for the bar segment.
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPanelBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderPanelBackgroundEventArgs
|
|
/// </summary>
|
|
public class PreRenderPanelBackgroundEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private ChartPanel _ChartPanel;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderPanelBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="panel"></param>
|
|
/// <param name="r"></param>
|
|
public PreRenderPanelBackgroundEventArgs(Graphics g, ChartPanel panel, Rectangle r)
|
|
{
|
|
_Graphics = g;
|
|
_ChartPanel = panel;
|
|
_Bounds = r;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartPanel
|
|
/// </summary>
|
|
public ChartPanel ChartPanel
|
|
{
|
|
get { return (_ChartPanel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounds for the bar segment.
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPieCenterBackgroundEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderPieCenterBackgroundEventArgs
|
|
/// </summary>
|
|
public class PreRenderPieCenterBackgroundEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private Rectangle _CenterBounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderPieCenterBackgroundEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="rc"></param>
|
|
public PreRenderPieCenterBackgroundEventArgs(
|
|
Graphics g, PieChart pieChart, Rectangle rc)
|
|
{
|
|
_Graphics = g;
|
|
_PieChart = pieChart;
|
|
_CenterBounds = rc;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Pie Center Bounds.
|
|
/// </summary>
|
|
public Rectangle CenterBounds
|
|
{
|
|
get { return (_CenterBounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPieCenterContentEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderPieCenterContentEventArgs
|
|
/// </summary>
|
|
public class PreRenderPieCenterContentEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private Rectangle _TextBounds;
|
|
private string _CenterLabel;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderPieCenterContentEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="rt"></param>
|
|
/// <param name="centerlabel"></param>
|
|
public PreRenderPieCenterContentEventArgs(
|
|
Graphics g, PieChart pieChart, Rectangle rt, string centerlabel)
|
|
{
|
|
_Graphics = g;
|
|
_PieChart = pieChart;
|
|
_TextBounds = rt;
|
|
_CenterLabel = centerlabel;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Pie Center Text Bounds.
|
|
/// </summary>
|
|
public Rectangle TextBounds
|
|
{
|
|
get { return (_TextBounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the center text label.
|
|
/// </summary>
|
|
public string CenterLabel
|
|
{
|
|
get { return (_CenterLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPointConnectorEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderPointConnectorEventArgs
|
|
/// </summary>
|
|
public class PreRenderPointConnectorEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private PointLabel _PointLabel;
|
|
private bool _IsCrosshairPoint;
|
|
private Point _DataPoint;
|
|
private Point _LabelPoint;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderPointConnectorEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="series">Chart Series</param>
|
|
/// <param name="pointLabel">PointLabel</param>
|
|
/// <param name="isCrosshairPoint">Is the point a crosshair point</param>
|
|
/// <param name="dataPt">Data Point</param>
|
|
/// <param name="labelPt">Label Point</param>
|
|
public PreRenderPointConnectorEventArgs(Graphics graphics, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPt, Point dataPt, Point labelPt)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_PointLabel = pointLabel;
|
|
_IsCrosshairPoint = isCrosshairPt;
|
|
_DataPoint = dataPt;
|
|
_LabelPoint = labelPt;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart.
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries.
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object.
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PointLabel.
|
|
/// </summary>
|
|
public PointLabel PointLabel
|
|
{
|
|
get { return (_PointLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the whether the point is a Crosshair Point.
|
|
/// </summary>
|
|
public bool IsCrosshairPoint
|
|
{
|
|
get { return (_IsCrosshairPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the data-side Connector Point.
|
|
/// </summary>
|
|
public Point DataPoint
|
|
{
|
|
get { return (_DataPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the label-side Connector Point.
|
|
/// </summary>
|
|
public Point LabelPoint
|
|
{
|
|
get { return (_LabelPoint); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderPointLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderPointLabelEventArgs
|
|
/// </summary>
|
|
public class PreRenderPointLabelEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private PointLabel _PointLabel;
|
|
private bool _IsCrosshairPoint;
|
|
private Rectangle _Bounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderPointLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="series">Chart Series</param>
|
|
/// <param name="pointLabel">PointLabel</param>
|
|
/// <param name="isCrosshairPoint">Is the point a crosshair point</param>
|
|
/// <param name="bounds">Display Bounds</param>
|
|
public PreRenderPointLabelEventArgs(Graphics graphics, BaseChart chart,
|
|
ChartSeries series, PointLabel pointLabel, bool isCrosshairPoint, Rectangle bounds)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_PointLabel = pointLabel;
|
|
_IsCrosshairPoint = isCrosshairPoint;
|
|
_Bounds = bounds;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart.
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries.
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object.
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PointLabel.
|
|
/// </summary>
|
|
public PointLabel PointLabel
|
|
{
|
|
get { return (_PointLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the whether the point is a Crosshair Point.
|
|
/// </summary>
|
|
public bool IsCrosshairPoint
|
|
{
|
|
get { return (_IsCrosshairPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounding display rectangle.
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderRadialGridEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderRadialGridEventArgs
|
|
/// </summary>
|
|
public class PreRenderRadialGridEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
|
|
private PieChart _PieChart;
|
|
|
|
private double _OuterRadius;
|
|
private double _InnerRadius;
|
|
private double _ExpDelta;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderRadialGridEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="outerRadius"></param>
|
|
/// <param name="innerRadius"></param>
|
|
/// <param name="exp"></param>
|
|
public PreRenderRadialGridEventArgs(Graphics graphics,
|
|
PieChart pieChart, double outerRadius, double innerRadius, double exp)
|
|
{
|
|
_Graphics = graphics;
|
|
|
|
_PieChart = pieChart;
|
|
|
|
_OuterRadius = outerRadius;
|
|
_InnerRadius = innerRadius;
|
|
_ExpDelta = exp;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart.
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the inner, bounding radius for the grid.
|
|
/// </summary>
|
|
public double InnerRadius
|
|
{
|
|
get { return (_InnerRadius); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the outer, bounding radius for the grid.
|
|
/// </summary>
|
|
public double OuterRadius
|
|
{
|
|
get { return (_OuterRadius); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the expanded/exploded delta for the grid. This is
|
|
/// the adjustment needed if the pie has been expanded. If you
|
|
/// want to render an expanded grid, then this delta should be
|
|
/// added to both the inner and outer radius values.
|
|
/// </summary>
|
|
public double ExpDelta
|
|
{
|
|
get { return (_ExpDelta); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object.
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesBarEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderSeriesBarEventArgs
|
|
/// </summary>
|
|
public class PreRenderSeriesBarEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private SeriesPoint _SeriesPoint;
|
|
private Rectangle _Bounds;
|
|
private Rectangle _FillRangeBounds;
|
|
private BarSegment _BarSegment;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderSeriesBarEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics"></param>
|
|
/// <param name="chart"></param>
|
|
/// <param name="series"></param>
|
|
/// <param name="sp"></param>
|
|
/// <param name="r"></param>
|
|
/// <param name="r2"></param>
|
|
/// <param name="segment"></param>
|
|
public PreRenderSeriesBarEventArgs(Graphics graphics, BaseChart chart,
|
|
ChartSeries series, SeriesPoint sp, Rectangle r, Rectangle r2, BarSegment segment)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_SeriesPoint = sp;
|
|
_Bounds = r;
|
|
_FillRangeBounds = r2;
|
|
_BarSegment = segment;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounds for the bar segment.
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the 'FillRange' bounds for the bar (See ChartXy.FillRange).
|
|
/// </summary>
|
|
public Rectangle FillRangeBounds
|
|
{
|
|
get { return (_FillRangeBounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated SeriesPoint
|
|
/// </summary>
|
|
public SeriesPoint SeriesPoint
|
|
{
|
|
get { return (_SeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated 'segment' of the bar being rendered.
|
|
/// </summary>
|
|
public BarSegment BarSegment
|
|
{
|
|
get { return (_BarSegment); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesHiLoBarEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderSeriesHiLoBarEventArgs
|
|
/// </summary>
|
|
public class PreRenderSeriesHiLoBarEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
|
|
private HiLoRenderData _RenderData;
|
|
private HiLoBarSegment _BarSegment;
|
|
|
|
private Point _Pt1;
|
|
private Point _Pt2;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderSeriesHiLoBarEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="chartXy"></param>
|
|
/// <param name="chartSeries"></param>
|
|
/// <param name="rd"></param>
|
|
/// <param name="pt1"></param>
|
|
/// <param name="pt2"></param>
|
|
/// <param name="segment"></param>
|
|
public PreRenderSeriesHiLoBarEventArgs(Graphics g, BaseChart chart,
|
|
ChartSeries series, HiLoRenderData rd, Point pt1, Point pt2, HiLoBarSegment segment)
|
|
{
|
|
_Graphics = g;
|
|
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
|
|
_RenderData = rd;
|
|
_BarSegment = segment;
|
|
|
|
_Pt1 = pt1;
|
|
_Pt2 = pt2;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HiLo RenderData.
|
|
/// </summary>
|
|
public HiLoRenderData RenderData
|
|
{
|
|
get { return (_RenderData); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HiLo BarSegment.
|
|
/// </summary>
|
|
public HiLoBarSegment BarSegment
|
|
{
|
|
get { return (_BarSegment); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the initial segment Point.
|
|
/// </summary>
|
|
public Point Point1
|
|
{
|
|
get { return (_Pt1); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the terminal segment Point.
|
|
/// </summary>
|
|
public Point Point2
|
|
{
|
|
get { return (_Pt2); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated SeriesPoint
|
|
/// </summary>
|
|
public SeriesPoint SeriesPoint
|
|
{
|
|
get { return (_RenderData.Sp); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated SeriesPoint index
|
|
/// </summary>
|
|
public int SeriesPointIndex
|
|
{
|
|
get { return (_RenderData.Index); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSeriesPointEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderSeriesPointEventArgs
|
|
/// </summary>
|
|
public class PreRenderSeriesPointEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private ChartSeries _ChartSeries;
|
|
private Point _Point;
|
|
private SeriesPoint _SeriesPoint;
|
|
private Size _PointSize;
|
|
private Image _Marker;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderSeriesPointEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="series">Chart Series</param>
|
|
/// <param name="pt">Marker Point (center)</param>
|
|
/// <param name="sp">SeriesPoint</param>
|
|
/// <param name="pointSize">Max marker point size</param>
|
|
/// <param name="marker">Marker Image</param>
|
|
public PreRenderSeriesPointEventArgs(Graphics graphics,
|
|
BaseChart chart, ChartSeries series, SeriesPoint sp, Point pt, Size pointSize, Image marker)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_ChartSeries = series;
|
|
_Point = pt;
|
|
_SeriesPoint = sp;
|
|
_PointSize = pointSize;
|
|
_Marker = marker;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the center point for the marker
|
|
/// </summary>
|
|
public Point Point
|
|
{
|
|
get { return (_Point); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated SeriesPoint
|
|
/// </summary>
|
|
public SeriesPoint SeriesPoint
|
|
{
|
|
get { return (_SeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the max size for the point marker
|
|
/// </summary>
|
|
public Size PointSize
|
|
{
|
|
get { return (_PointSize); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the associated marker Image
|
|
/// </summary>
|
|
public Image Marker
|
|
{
|
|
get { return (_Marker); }
|
|
set { _Marker = value; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PreRenderSliceEventArgs
|
|
|
|
/// <summary>
|
|
/// PreRenderSliceEventArgs
|
|
/// </summary>
|
|
public class PreRenderSliceEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private GraphicsPath _GraphicsPath;
|
|
|
|
private PieChart _PieChart;
|
|
private PieSeries _PieSeries;
|
|
private PieSeriesPoint _PieSeriesPoint;
|
|
|
|
private SliceRenderType _SliceRenderType;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// PreRenderSliceEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="path"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="pieSeries"></param>
|
|
/// <param name="psp"></param>
|
|
/// <param name="rtype"></param>
|
|
public PreRenderSliceEventArgs(Graphics g, GraphicsPath path,
|
|
PieChart pieChart, PieSeries pieSeries, PieSeriesPoint psp, SliceRenderType rtype)
|
|
{
|
|
_Graphics = g;
|
|
_GraphicsPath = path;
|
|
|
|
_PieChart = pieChart;
|
|
_PieSeries = pieSeries;
|
|
_PieSeriesPoint = psp;
|
|
|
|
_SliceRenderType = rtype;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeries
|
|
/// </summary>
|
|
public PieSeries PieSeries
|
|
{
|
|
get { return (_PieSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the GraphicsPath for the slice.
|
|
/// </summary>
|
|
public GraphicsPath GraphicsPath
|
|
{
|
|
get { return (_GraphicsPath); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the SliceRenderType - they 'type' of slice element being rendered.
|
|
/// </summary>
|
|
public SliceRenderType SliceRenderType
|
|
{
|
|
get { return (_SliceRenderType); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ReferenceLineMarkupLinkClickEventArgs
|
|
|
|
/// <summary>
|
|
/// ReferenceLineMarkupLinkClickEventArgs
|
|
/// </summary>
|
|
public class ReferenceLineMarkupLinkClickEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private string _HRef;
|
|
private string _Name;
|
|
|
|
private ReferenceLine _ReferenceLine;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// ReferenceLineMarkupLinkClickEventArgs
|
|
/// </summary>
|
|
/// <param name="referenceLine"></param>
|
|
/// <param name="name"></param>
|
|
/// <param name="href"></param>
|
|
public ReferenceLineMarkupLinkClickEventArgs(
|
|
ReferenceLine referenceLine, string name, string href)
|
|
{
|
|
_HRef = href;
|
|
_Name = name;
|
|
|
|
_ReferenceLine = referenceLine;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink HRef
|
|
/// </summary>
|
|
public string HRef
|
|
{
|
|
get { return (_HRef); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated HyperLink Name
|
|
/// </summary>
|
|
public string Name
|
|
{
|
|
get { return (_Name); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ReferenceLine
|
|
/// </summary>
|
|
public ReferenceLine ReferenceLine
|
|
{
|
|
get { return (_ReferenceLine); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairCalloutEventArgs
|
|
|
|
/// <summary>
|
|
/// RenderCrosshairCalloutEventArgs
|
|
/// </summary>
|
|
public class RenderCrosshairCalloutEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private Rectangle _Bounds;
|
|
private Point _Point;
|
|
private CrosshairVisualStyle _Style;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// RenderCrosshairCalloutEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="bounds">Callout bounds</param>
|
|
/// <param name="pt">Mouse point</param>
|
|
/// <param name="style">Crosshair style</param>
|
|
public RenderCrosshairCalloutEventArgs(Graphics graphics,
|
|
BaseChart chart, Rectangle bounds, Point pt, CrosshairVisualStyle style)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_Bounds = bounds;
|
|
_Point = pt;
|
|
_Style = style;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Crosshair style
|
|
/// </summary>
|
|
public CrosshairVisualStyle Style
|
|
{
|
|
get { return (_Style); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounding chart Rectangle
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated mouse position
|
|
/// </summary>
|
|
public Point Point
|
|
{
|
|
get { return (_Point); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// RenderCrosshairLabelEventArgs
|
|
/// </summary>
|
|
public class RenderCrosshairLabelEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private Rectangle _Bounds;
|
|
private List<CrosshairPoint> _CrosshairPoints;
|
|
private Point _Point;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// RenderCrosshairLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="cps">CrosshairPoint list</param>
|
|
/// <param name="bounds"></param>
|
|
/// <param name="pt">Mouse Point</param>
|
|
public RenderCrosshairLabelEventArgs(Graphics graphics,
|
|
BaseChart chart, List<CrosshairPoint> cps, Rectangle bounds, Point pt)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_CrosshairPoints = cps;
|
|
_Bounds = bounds;
|
|
_Point = pt;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the list of CrosshairPoints
|
|
/// </summary>
|
|
public List<CrosshairPoint> CrosshairPoints
|
|
{
|
|
get { return (_CrosshairPoints); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounding chart Rectangle
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated mouse position
|
|
/// </summary>
|
|
public Point Point
|
|
{
|
|
get { return (_Point); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderCrosshairLabelItemEventArgs
|
|
|
|
/// <summary>
|
|
/// RenderCrosshairLabelItemEventArgs
|
|
/// </summary>
|
|
public class RenderCrosshairLabelItemEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private BaseChart _Chart;
|
|
private CrosshairPoint _CrosshairPoint;
|
|
private Rectangle _Bounds;
|
|
private CrosshairVisualStyle _Style;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// RenderCrosshairLabelItemEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics">Graphics</param>
|
|
/// <param name="chart">BaseChart</param>
|
|
/// <param name="cp">CrosshairPoint</param>
|
|
/// <param name="bounds">Bounding rectangle</param>
|
|
/// <param name="style">Style</param>
|
|
public RenderCrosshairLabelItemEventArgs(Graphics graphics,
|
|
BaseChart chart, CrosshairPoint cp, Rectangle bounds, CrosshairVisualStyle style)
|
|
{
|
|
_Graphics = graphics;
|
|
_Chart = chart;
|
|
_CrosshairPoint = cp;
|
|
_Bounds = bounds;
|
|
_Style = style;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_Chart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated CrosshairPoint
|
|
/// </summary>
|
|
public CrosshairPoint CrosshairPoint
|
|
{
|
|
get { return (_CrosshairPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the Crosshair style
|
|
/// </summary>
|
|
public CrosshairVisualStyle Style
|
|
{
|
|
get { return (_Style); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the bounding chart Rectangle
|
|
/// </summary>
|
|
public Rectangle Bounds
|
|
{
|
|
get { return (_Bounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderPieRingOutEventArgs
|
|
|
|
/// <summary>
|
|
/// RenderSliceCenterLineEventArgs
|
|
/// </summary>
|
|
public class RenderPieRingOutEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private Rectangle _RingOutBounds;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// RenderPieRingOutEventArgs
|
|
/// </summary>
|
|
/// <param name="g"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="r"></param>
|
|
public RenderPieRingOutEventArgs(Graphics graphics, PieChart pieChart, Rectangle r)
|
|
{
|
|
_Graphics = graphics;
|
|
|
|
_PieChart = pieChart;
|
|
_RingOutBounds = r;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Ring-Out indicator bounds.
|
|
/// </summary>
|
|
public Rectangle RingOutBounds
|
|
{
|
|
get { return (_RingOutBounds); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceCenterLineEventArgs
|
|
|
|
/// <summary>
|
|
/// RenderSliceCenterLineEventArgs
|
|
/// </summary>
|
|
public class RenderSliceCenterLineEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private PieSeriesPoint _PieSeriesPoint;
|
|
private Point _PtInner;
|
|
private Point _PtOuter;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// RenderSliceCenterLineEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="psp"></param>
|
|
/// <param name="ptInner"></param>
|
|
/// <param name="ptOuter"></param>
|
|
public RenderSliceCenterLineEventArgs(Graphics graphics,
|
|
PieChart pieChart, PieSeriesPoint psp, Point ptInner, Point ptOuter)
|
|
{
|
|
_Graphics = graphics;
|
|
|
|
_PieChart = pieChart;
|
|
_PieSeriesPoint = psp;
|
|
|
|
_PtInner = ptInner;
|
|
_PtOuter = ptOuter;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (_PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the inner Point for the CenterLine.
|
|
/// </summary>
|
|
public Point PtInner
|
|
{
|
|
get { return (_PtInner); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the outer Point for the CenterLine.
|
|
/// </summary>
|
|
public Point PtOuter
|
|
{
|
|
get { return (_PtOuter); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceInnerLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// RenderSliceInnerLabelEventArgs
|
|
/// </summary>
|
|
public class RenderSliceInnerLabelEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private PieSeriesPoint _PieSeriesPoint;
|
|
private string _Text;
|
|
private bool _Displayed;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// RenderSliceInnerLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="psp"></param>
|
|
/// <param name="text"></param>
|
|
/// <param name="displayed"></param>
|
|
public RenderSliceInnerLabelEventArgs(Graphics graphics,
|
|
PieChart pieChart, PieSeriesPoint psp, string text, bool displayed)
|
|
{
|
|
_Graphics = graphics;
|
|
|
|
_PieChart = pieChart;
|
|
_PieSeriesPoint = psp;
|
|
|
|
_Text = text;
|
|
_Displayed = displayed;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (_PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the label text.
|
|
/// </summary>
|
|
public string Text
|
|
{
|
|
get { return (_Text); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether the label text was displayed. This value
|
|
/// will determine whether the lable will be displayed as an outer
|
|
/// label when SliceLabelDisplayMode is set to InnerXorOuter.
|
|
/// </summary>
|
|
public bool Displayed
|
|
{
|
|
get { return (_Displayed); }
|
|
set { _Displayed = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region RenderSliceOuterLabelEventArgs
|
|
|
|
/// <summary>
|
|
/// RenderSliceOuterLabelEventArgs
|
|
/// </summary>
|
|
public class RenderSliceOuterLabelEventArgs : CancelEventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private Graphics _Graphics;
|
|
private PieChart _PieChart;
|
|
private PieSeriesPoint _PieSeriesPoint;
|
|
private PieLabel _PieLabel;
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// RenderSliceOuterLabelEventArgs
|
|
/// </summary>
|
|
/// <param name="graphics"></param>
|
|
/// <param name="pieChart"></param>
|
|
/// <param name="psp"></param>
|
|
/// <param name="pl"></param>
|
|
public RenderSliceOuterLabelEventArgs(
|
|
Graphics graphics, PieChart pieChart, PieSeriesPoint psp, PieLabel pl)
|
|
{
|
|
_Graphics = graphics;
|
|
_PieChart = pieChart;
|
|
_PieSeriesPoint = psp;
|
|
_PieLabel = pl;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeriesPoint
|
|
/// </summary>
|
|
public PieSeriesPoint PieSeriesPoint
|
|
{
|
|
get { return (_PieSeriesPoint); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the PieLabel defining the label.
|
|
/// </summary>
|
|
public PieLabel PieLabel
|
|
{
|
|
get { return (_PieLabel); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Graphics object
|
|
/// </summary>
|
|
public Graphics Graphics
|
|
{
|
|
get { return (_Graphics); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SelectionChangedEventArgs
|
|
|
|
/// <summary>
|
|
/// SelectionChangedEventArgs
|
|
/// </summary>
|
|
public class SelectionChangedEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private ChartVisualElement _Item;
|
|
|
|
private bool _OldState;
|
|
private bool _NewState;
|
|
|
|
private int _SelectedCount;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// SelectionChangedEventArgs
|
|
///</summary>
|
|
///<param name="item">Associated items changing selected state</param>
|
|
///<param name="oldState">Old selected state</param>
|
|
///<param name="newState">New selected state</param>
|
|
///<param name="selectedCount">Resultant total selected item count</param>
|
|
public SelectionChangedEventArgs(
|
|
ChartVisualElement item, bool oldState, bool newState, int selectedCount)
|
|
{
|
|
_Item = item;
|
|
|
|
_OldState = oldState;
|
|
_NewState = newState;
|
|
|
|
_SelectedCount = selectedCount;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated item.
|
|
/// </summary>
|
|
public ChartVisualElement Item
|
|
{
|
|
get { return (_Item); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the old / previous selected state.
|
|
/// </summary>
|
|
public bool OldState
|
|
{
|
|
get { return (_OldState); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the new / current selected state.
|
|
/// </summary>
|
|
public bool NewState
|
|
{
|
|
get { return (_NewState); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the resultant selected item count.
|
|
/// </summary>
|
|
public int SelectedCount
|
|
{
|
|
get { return (_SelectedCount); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region SeriesDataBindingCompleteEventArgs
|
|
|
|
/// <summary>
|
|
/// SeriesDataBindingCompleteEventArgs
|
|
/// </summary>
|
|
public class SeriesDataBindingCompleteEventArgs : EventArgs
|
|
{
|
|
#region Private variables
|
|
|
|
private BaseChart _BaseChart;
|
|
private BaseSeries _BaseSeries;
|
|
|
|
private object _Source;
|
|
|
|
#endregion
|
|
|
|
///<summary>
|
|
/// SeriesDataBindingCompleteEventArgs
|
|
///</summary>
|
|
public SeriesDataBindingCompleteEventArgs(BaseChart chart, BaseSeries series, object source)
|
|
{
|
|
_BaseChart = chart;
|
|
_BaseSeries = series;
|
|
|
|
_Source = source;
|
|
}
|
|
|
|
#region Public properties
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseChart that was bound.
|
|
/// </summary>
|
|
public BaseChart BaseChart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated Chart that was bound.
|
|
/// </summary>
|
|
public BaseChart Chart
|
|
{
|
|
get { return (_BaseChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartXy that was bound.
|
|
/// </summary>
|
|
public ChartXy ChartXy
|
|
{
|
|
get { return (_BaseChart as ChartXy); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieChart that was bound.
|
|
/// </summary>
|
|
public PieChart PieChart
|
|
{
|
|
get { return (_BaseChart as PieChart); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated BaseSeries that was bound.
|
|
/// </summary>
|
|
public BaseSeries BaseSeries
|
|
{
|
|
get { return (_BaseSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated ChartSeries that was bound.
|
|
/// </summary>
|
|
public ChartSeries ChartSeries
|
|
{
|
|
get { return (_BaseSeries as ChartSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the associated PieSeries that was bound.
|
|
/// </summary>
|
|
public PieSeries PieSeries
|
|
{
|
|
get { return (_BaseSeries as PieSeries); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the data source that was bound to.
|
|
/// </summary>
|
|
public object Source
|
|
{
|
|
get { return (_Source); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Attributes
|
|
|
|
/// <summary>
|
|
/// Attribute to control the visibility of individual fields
|
|
/// or properties in an IList data source to the ChartControl.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
|
public class IsVisibleToChartControl : Attribute
|
|
{
|
|
private bool _Visible;
|
|
|
|
/// <summary>
|
|
/// IsVisibleToChartControl
|
|
/// </summary>
|
|
/// <param name="visible"></param>
|
|
public IsVisibleToChartControl(bool visible)
|
|
{
|
|
_Visible = visible;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Visible
|
|
/// </summary>
|
|
public bool Visible
|
|
{
|
|
get { return (_Visible); }
|
|
set { _Visible = value; }
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|