Charts

TX Text Control for Windows Forms supports the insertion of chart controls of the type System.Windows.Forms.DataVisualization.Charting.Chart. This control is part of the .net framework since version 4, but can be added to prior versions. A chart can be positioned like an image or 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 which 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. The TextControl.ChartLayoutDialog method opens a dialog box which offers layout settings like positioning, size and text distances. A chart can be saved with the TX Text Control and the RTF format and is reconstructed during a loading process. With other formats the chart image is saved. If a document with charts is loaded on a system where no chart controls are installed, the chart's image is inserted.

Classes

Class Description
TXTextControl.DataVisualization.ChartCollection An instance of the ChartCollection class contains all charts in a document represented through objects of the type DataVisualization.ChartFrame.
TXTextControl.DataVisualization.ChartEventArgs The ChartEventArgs class provides data for all events that occur with charts.
TXTextControl.DataVisualization.ChartFrame An instance of the ChartFrame class represents a chart and its layout in a Text Control document.

Constructors

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

Events

Event Description
TXTextControl.ServerTextControl.ChartCreated Occurs when a new chart has been created.
TXTextControl.ServerTextControl.ChartDeleted Occurs when a chart has been deleted.

Methods

Method Description
TXTextControl.DataVisualization.ChartCollection.Add Inserts a new chart in a Text Control document.
TXTextControl.DataVisualization.ChartCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.DataVisualization.ChartCollection.GetItem Gets a particular chart from the collection.
TXTextControl.DataVisualization.ChartCollection.Remove Removes a chart from a Text Control document.
TXTextControl.DataVisualization.ChartFrame.AddUndoUnit Add the current state of the chart which is connected with this ChartFrame to the undo stack.
TXTextControl.DataVisualization.ChartFrame.Refresh Refreshes the chart.

Properties

Property Description
TXTextControl.ServerTextControl.Charts Gets a collection of all charts in a document.
TXTextControl.DataVisualization.ChartEventArgs.ChartFrame Gets an object that represents the chart which causes the event.
TXTextControl.DataVisualization.ChartFrame.Chart Gets the chart control associated with the chart frame.
TXTextControl.DataVisualization.ChartFrame.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.
TXTextControl.DataVisualization.ChartFrame.ExportFileName Gets or sets the file name, when the chart's image is exported.
TXTextControl.DataVisualization.ChartFrame.ExportFilterIndex Gets or sets the format used, if a chart's image is exported.
TXTextControl.DataVisualization.ChartFrame.ExportResolution Gets or sets the maximum resolution in dots per inch in which the chart's image is saved.
TXTextControl.DataVisualization.ChartFrame.SaveMode Determines whether the chart's image is stored through its binary data or through a file reference.