Chart Object Model

The Chart class exposes many of its programmable functions using a hierarchical object model. The objects contained in a Chart instance provide the API properties and methods you call to configure Chart objects.

The diagram below shows the Chart object hierarchy.

Chart object model

Chart

Chart is the parent class. It provides the methods and properties that change the chart's appearance, including perspective, plot layout, and series layout, and that specify the data source for the entire chart.

To create an instance of the Chart class, embed an Applet tag in your HTML file.

ChartElementApi

ChartElementApi is not exposed for use. However, its methods and properties are inherited by TextElement and Plot.

TextElement

TextElement provides the methods and properties that change the appearance of the chart legend, titles, and footnote. It inherits all the functionality of ChartElementApi. In addition, TextElement properties manipulate text colors, fonts, and attributes.

For each chart component whose text you want to manipulate, obtain a reference to the appropriate TextElement object. Following is a list of the methods you call to obtain references to TextElement objects:

  • findLegend()
  • findTitle()
  • findFootnote()
  • findXAxisTitle()
  • findYAxisTitle()

    Plot

    Plot provides the methods and properties that change the appearance of the chart plot. It inherits all the functionality of ChartElementApi. In addition, Plot properties change the width and color of the plot outline and change the fill color of the plot area. [[But it seems as though the only property it inherits is Visible. Is this true?]]

    To obtain a reference to a Plot object, call findPlot().

    Axis

    Axis provides the methods and properties that change the appearance of the x- and y-axes. For example, using Axis, you can set the scale type, make minor tick marks visible, and change the font, size, and color of axis labels.

    To obtain a reference to an Axis object, call findXAxis() for the x-axis and findYAxis() for the y-axis.

    Series

    Series provides the methods and properties that change the appearance of a data series in the chart. For example, using Series, you set the series layout, specify fill colors, and specify the series data source.

    To obtain a reference to a Series object, call findSeries().

    See also
    Chart Applet Overview
    Chart API Index