Search Results for

    Show / Hide Table of Contents

    Class ChartBase

    Base class for charts

    Inheritance
    System.Object
    System.MarshalByRefObject
    System.ComponentModel.Component
    System.Windows.Forms.Control
    ChartBase
    BreadCrumbs
    HierarchicalChartBase
    GanttChart
    Namespace: FastReport.BG.Common
    Assembly: FastReport.BG.dll
    Syntax
    public abstract class ChartBase : Control, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable

    Constructors

    ChartBase()

    Constructs a chart

    Declaration
    public ChartBase()

    Fields

    hoveredNode

    Hovered node.

    Declaration
    protected NodeBase hoveredNode
    Field Value
    Type Description
    NodeBase

    Properties

    DisplayRectangle

    Gets the rectangle that represents the display area of the control.

    Declaration
    public override Rectangle DisplayRectangle { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle
    Overrides
    System.Windows.Forms.Control.DisplayRectangle

    HoveredNode

    Node hovered by mouse at the moment

    Declaration
    [Browsable(false)]
    public virtual NodeBase HoveredNode { get; set; }
    Property Value
    Type Description
    NodeBase

    LastHitTestInfo

    Last HitTestInfo of the chart

    Declaration
    [Browsable(false)]
    public HitTestInfo LastHitTestInfo { get; set; }
    Property Value
    Type Description
    HitTestInfo

    ToolTipOptions

    ToolTip options structure. Controls how the ToolTip should be shown.

    Declaration
    [TypeConverter(typeof(ExpandableObjectConverter))]
    public ToolTipOptions ToolTipOptions { get; }
    Property Value
    Type Description
    ToolTipOptions

    Methods

    ContextMenuNeeded()

    Executes when chart needs a context menu to show

    Declaration
    protected ContextMenuStrip ContextMenuNeeded()
    Returns
    Type Description
    System.Windows.Forms.ContextMenuStrip

    ContextMenuStrip instance

    CreateContextMenu()

    Executes when chart needs a new context menu

    Declaration
    protected virtual ContextMenuStrip CreateContextMenu()
    Returns
    Type Description
    System.Windows.Forms.ContextMenuStrip

    New ContextMenuStrip instance

    Dispose(Boolean)

    Dispose resources used by Chart

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true to dispose all resources (managed and unmanaged); false - to dispose only unmanaged resources

    Overrides
    System.Windows.Forms.Control.Dispose(System.Boolean)

    DoChange()

    Executes on change

    Declaration
    protected virtual void DoChange()

    Draw(Graphics)

    Draw a chart.

    Declaration
    public abstract void Draw(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    GetNodeAt(Point)

    Get node at the given position

    Declaration
    protected abstract NodeBase GetNodeAt(Point pt)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    Position to search

    Returns
    Type Description
    NodeBase

    Found NodeBase or null

    GetRecordAt(Point)

    Get record of node at the given location

    Declaration
    public RecordBase GetRecordAt(Point location)
    Parameters
    Type Name Description
    System.Drawing.Point location

    Location to search for node with record.

    Returns
    Type Description
    RecordBase

    RecordBase of the found node or null.

    HandleContextPopup(Point)

    Handles context popup action at the given location

    Declaration
    protected virtual bool HandleContextPopup(Point pt)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    location for popup action

    Returns
    Type Description
    System.Boolean

    HitTest(Point)

    Gets information, about the chart using a specific Point.

    Declaration
    public virtual HitTestInfo HitTest(Point pt)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    A Point that represents single x,y coordinate.

    Returns
    Type Description
    HitTestInfo

    HitTest(Int32, Int32)

    Gets information, using the x and y coordinate passed to the method.

    Declaration
    public HitTestInfo HitTest(int x, int y)
    Parameters
    Type Name Description
    System.Int32 x

    The horizontal position of the coordinate.

    System.Int32 y

    The vertical position of the coordinate.

    Returns
    Type Description
    HitTestInfo

    HitTestInfoChanged()

    Executes when HitTestInfo has changed

    Declaration
    protected virtual void HitTestInfoChanged()

    InvalidateHitTestInfo()

    Invalidate chart region with the latest HitTestInfo

    Declaration
    protected virtual void InvalidateHitTestInfo()

    InvalidateNode(NodeBase)

    Invalidates chart region where given node is located

    Declaration
    protected void InvalidateNode(NodeBase node)
    Parameters
    Type Name Description
    NodeBase node

    Node to invalidate

    OnExportParameters(ExportParametersEventArgs)

    Runs the Export event.

    Declaration
    public void OnExportParameters(ExportParametersEventArgs e)
    Parameters
    Type Name Description
    ExportParametersEventArgs e

    ExportChartEventArgs object.

    OnMouseDown(MouseEventArgs)

    Mouse down.

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Overrides
    System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs)

    OnMouseLeave(EventArgs)

    Mouse leave.

    Declaration
    protected override void OnMouseLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    System.Windows.Forms.Control.OnMouseLeave(System.EventArgs)

    OnMouseMove(MouseEventArgs)

    Mouse move.

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Overrides
    System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs)

    OnPaint(PaintEventArgs)

    On paint.

    Declaration
    protected override void OnPaint(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e
    Overrides
    System.Windows.Forms.Control.OnPaint(System.Windows.Forms.PaintEventArgs)

    ProcessCmdKey(ref Message, Keys)

    Process cmd key.

    Declaration
    protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg
    System.Windows.Forms.Keys keyData
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Windows.Forms.Control.ProcessCmdKey(System.Windows.Forms.Message, System.Windows.Forms.Keys)

    UpdateCursor()

    Update the chart cursor for the latest HitTestInfo

    Declaration
    protected virtual void UpdateCursor()

    UpdateHoveredNode(NodeBase, Boolean)

    Update node hover state

    Declaration
    protected virtual void UpdateHoveredNode(NodeBase node, bool hover)
    Parameters
    Type Name Description
    NodeBase node

    Node to update

    System.Boolean hover

    New hover state

    UpdateTooltip()

    Updates the chart tooltip for the latest HitTestInfo

    Declaration
    protected virtual void UpdateTooltip()

    Events

    Change

    Notifies when then Chart has changed

    Declaration
    public event EventHandler Change
    Event Type
    Type Description
    System.EventHandler

    ExportParameters

    Occurs before export to set custom export parameters.

    Declaration
    public event EventHandler<ExportParametersEventArgs> ExportParameters
    Event Type
    Type Description
    System.EventHandler<ExportParametersEventArgs>

    GetNodeColor

    Get node color event

    Declaration
    public event GetNodeColorEventHandler GetNodeColor
    Event Type
    Type Description
    GetNodeColorEventHandler

    HitTestChange

    Notifies when HitTestInfo has changed

    Declaration
    public event EventHandler HitTestChange
    Event Type
    Type Description
    System.EventHandler

    ToolTipDraw

    Triggers on ToolTip draw and allows to override the drawing

    Declaration
    public event ToolTipDrawEventHandler ToolTipDraw
    Event Type
    Type Description
    ToolTipDrawEventHandler

    ToolTipShow

    Triggers before ToolTip show and allows to change the main ToolTip parameters

    Declaration
    public event ToolTipShowEventHandler ToolTipShow
    Event Type
    Type Description
    ToolTipShowEventHandler
    Back to top © 2021-2022 Copyright Fast Reports Inc.