An instance of the ChartFrame class represents a chart and its layout in a Text Control document. A chart can be positioned in the document like an image or a textframe, either geometrically or as a single character. Geometrically its position can either be relative to a paragraph to which it is anchored or relative to the complete document. The ChartFrame class handles the positioning of the chart in the document. A chart frame is always associated with a chart control of the type System.Windows.Forms.DataVisualization.Charting.Chart. This chart control handles the appearance and the data of the chart. All charts in a document are contained in a ChartCollection. The collection can also be used to add charts to or to remove charts from the document. The chart collection can be obtained from a TextControl or ServerTextControl through the Charts property.

Syntax

public class ChartFrame : FrameBase
Public Class ChartFrame
  Inherits FrameBase

Introduced: X8.

Examples

The following example creates a new ChartFrame called "points" and subsequently adds it to TX Text Control.

System.Windows.Forms.DataVisualization.Charting.Chart myChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
TXTextControl.DataVisualization.ChartFrame chartFrame = new TXTextControl.DataVisualization.ChartFrame(myChart);

chartFrame.Name = "points";
textControl1.Charts.Add(chartFrame, -1);
Dim myChart As System.Windows.Forms.DataVisualization.Charting.Chart = New System.Windows.Forms.DataVisualization.Charting.Chart()
Dim chartFrame As TXTextControl.DataVisualization.ChartFrame = New TXTextControl.DataVisualization.ChartFrame(myChart)

chartFrame.Name = "points"
TextControl1.Charts.Add(chartFrame, -1)

Constructors

Constructor Description
ChartFrame Initializes a new instance of the ChartFrame class.

Methods

Method Description
AddUndoUnit Add the current state of the chart which is connected with this ChartFrame to the undo stack.
ChangeZOrder Changes the frame's z-order.
(Inherited from FrameBase)
Refresh Refreshes the chart.

Properties

Property Description
Alignment Gets or sets the frame's horizontal alignment when it is anchored to a paragraph.
(Inherited from FrameBase)
Bounds Gets the frame's bounding rectangle relative to the upper left corner of the document.
(Inherited from FrameBase)
Chart Gets the chart control associated with the chart frame.
ExportCompressionQuality Sets a value between 1 and 100, which is the quality of a lossy data compression used, if the chart's image is exported.
ExportFileName Gets or sets the file name, when the chart's image is exported.
ExportFilterIndex Gets or sets the format used, if a chart's image is exported.
ExportResolution Gets or sets the maximum resolution in dots per inch in which the chart's image is saved.
ID Gets or sets an identifier for the frame.
(Inherited from FrameBase)
InsertionMode Gets or sets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame.
(Inherited from FrameBase)
Location Gets or sets, in twips, the frame's current location.
(Inherited from FrameBase)
Moveable Determines whether a frame can be moved in the document at run time with the built-in mouse interface.
(Inherited from FrameBase)
Name Gets or sets a name for the frame.
(Inherited from FrameBase)
SaveMode Determines whether the chart's image is stored through its binary data or through a file reference.
Size Gets or sets the frame's size in twips.
(Inherited from FrameBase)
Sizeable Determines whether the frame can be resized at run time with the built-in mouse interface.
(Inherited from FrameBase)
TextDistances Gets or sets the distances, in twips, between the frame and the document's text.
(Inherited from FrameBase)
TextPosition Read only.
(Inherited from FrameBase)