TdxCustomChartControl Class
The base class for the Chart control.
Declaration
TdxCustomChartControl = class(
TcxControl,
IdxSkinSupport,
IdxChartOwner,
IcxCustomCanvasSupport
)
Remarks
The TdxCustomChartControl
class implements base chart control functionality including diagram management, base appearance settings, support for additional visual elements (such as legend panes and supplementary titles), and user interaction options.
Main API Members
The list below outlines key members of the TdxCustomChartControl
class. These members allow you to manage diagrams and customize Chart control appearance settings.
Appearance and Behavior
- Appearance | LookAndFeel
- Provide access to general appearance settings.
- BiDiMode
- Specifies the active bidirectional mode.
- CalculateHitTest
- Calculates HitTest information for any point within the Chart control client area.
- HitTest | OnHotTrackElement | OnMouseMove
- Allow you to identify the visual Chart element under the mouse pointer and respond to hot-tracking different visual elements.
- Legend
- Provides access to legend pane settings.
- Palette
Allows you to switch between color palettes whose color sets are applied to individual simple series values and XY series.
If the active palette does not have enough explicitly defined colors to draw all affected series or series values differently, the Chart control generates interpolated colors based on existing colors.
Tip
Use the TdxChartPaletteRepository component to create, manage, and apply custom palettes. All stored custom palettes are available in the same list as predefined palettes.
- Titles
- Allows you to manage Chart control titles.
- ToolTips
- Allows you to switch between tooltip display modes at the Chart control level and customize general tooltip settings.
- ZoomOptions | ScrollOptions
- Provide access to zoom and scroll settings for all XY diagrams in the control.
Diagram Management
- AddDiagram<T>(string) | AddDiagram(TdxChartDiagramClass,string)
- Create a new diagram.
- DiagramCount | VisibleDiagramCount
- Return the total number of diagrams and the number of currently visible diagrams.
- VisibleDiagrams | Diagrams
- Provide access to visible and hidden diagrams by their indexes.
Tip
To delete a diagram, release it directly in code (call the Free procedure in Delphi or use the delete
keyword in C++Builder).
Data Import and Export
- ExportToImage
- These two overloaded methods save the current state of the Chart control client area as an individual image in any supported format.
- ExportToBMP | ExportToEMF | ExportToGIF | ExportToJPEG | ExportToPNG | ExportToSVG | ExportToTIFF | ExportToWMF
- Export the current state of the Chart control client area as an individual image in corresponding formats.
- ExportToDOCX | ExportToXLSX
- Save the current state of the Chart control client area as an inline or floating image container in the resulting DOCX or XLSX document.
Note
The result of all export to image operations depends on the pixel size of the Chart control client area on the current screen.
Refer to individual method descriptions and the following help topic for details: VCL Chart Data Export.
- SaveToStream | LoadFromStream
- Allow you to store series data from all diagrams in a memory stream. Since these methods work only with series data, you need to create and configure all required diagrams and series to successfully load previously saved data.
Print Functionality
To print the Chart control and export its content as a PDF document, add a TdxComponentPrinter component to your project and create a Chart report link.
Refer to the following topic for detailed information and code examples: Chart Print Functionality.
General-Purpose API Members
- BeginUpdate | EndUpdate | CancelUpdate
- Allow you to avoid excessive redraw operations during batch data and appearance changes.
- OnChange
- Allows you to respond to any setting or diagram change in the Chart control.
Report Link
The TdxChartControlReportLink class implements the Chart control’s print functionality.
Terminal TdxCustomChartControl Class Descendants
Do not use the TdxCustomChartControl
class directly. Use the TdxChartControl class instead.