public class

Chart

extends ContentNode
java.lang.Object
   ↳ com.pdftron.layout.ContentElement
     ↳ com.pdftron.layout.ContentNode
       ↳ com.pdftron.layout.Chart

Class Overview

A Chart is a content element that displays a chart described by a JSON definition.

Summary

Public Methods
double getHeight()
double getWidth()
void setDefinition(String json)
Sets the JSON definition of the chart.
void setHeight(double heightPoints)
Sets the height of the chart.
void setWidth(double widthPoints)
Sets the width of the chart.
[Expand]
Inherited Methods
From class com.pdftron.layout.ContentNode
From class com.pdftron.layout.ContentElement
From class java.lang.Object

Public Methods

public double getHeight ()

Returns
  • The height of the chart in points

public double getWidth ()

Returns
  • The width of the chart in points

public void setDefinition (String json)

Sets the JSON definition of the chart.

The definition fully replaces the previous content of the chart. The size of the chart is preserved.

Parameters
json The chart definition, in JSON

public void setHeight (double heightPoints)

Sets the height of the chart.

Parameters
heightPoints The height in points

public void setWidth (double widthPoints)

Sets the width of the chart.

Parameters
widthPoints The width in points