Subtitle

This section is regarding Methods and Properties available in the Subtitle element.

Example :
    chart.subtitles[0].get(“text”);
    chart.subtitles[0].set(“fontColor”, “red”);
Note
  • Chart should be rendered before you can access subtitle & its methods / properties.

Subtitle Methods:

Method Description Example
get(String propertyName) Returns the specified property of subtitle chart.subtitles[0].get(“text”)
set(String propertyName, Mixed value [,Boolean updateChart = true]) Sets the specified property of subtitle & optionally updates (default) the chart chart.subtitles[0].set(“horizontalAlign”, “left”);
remove([Boolean updateChart = true]) Removes subtitle from the array of subtitle. chart.subtitles[1].remove();

Read-Only Subtitle Properties:

Can be accessed via get method or dot notation.

Property Description Example
bounds Bounding rectangle of subtitle: {x1, x2, y1, y2} chart.bounds / chart.subtitles[0].get(“bounds”)

Writable Properties in Subtitle:

All Subtitle options become available as properties after Chart Render. You can access them either via get method or dot notation. But you can change / set those values only via set method.

Please refer to Subtitle Element for complete list of properties available.

Try Editing The Code

  Also See:    


If you have any questions, please feel free to ask in our forums.Ask Question