The top-level chart object, manages the title, subtitle, legend generator and Plot3D instance.
The chart implements a listener mechanism to notify listeners whenever a change is made to the chart, its subelements or its dataset. For any change, a Chart3DChangeEvent is sent to all registered listeners.
final DEFAULT_CHART_BOX_COLOR #
The default chart box color.
final DEFAULT_FONT_FAMILY_STR #
The default font family for text elements in charts.
final DEFAULT_SUBTITLE_FONT #
The default subtitle font.
final DEFAULT_TITLE_FONT #
The default title font.
RectanglePainter get background #
Returns the object responsible for painting the background area for the chart.
void set background(RectanglePainter backgroundPainter) #
Sets the background painter and sends a Chart3DChangeEvent to all registered listeners.
Returns the chartbox color (the chartbox draws the "walls" in the background of the plot). The default value is [DEFAULT_CHART_BOX_COLOR].
There is no chartbox drawn for pie charts.
Sets the chartbox color and sends a Chart3DChangeEvent to all registered listeners.
final Dimension3D dimensions #
Returns the dimensions of the chart (the same as the dimensions of the plot belonging to the chart).
Sets the anchor point for the chart legend and sensd a Chart3DChangeEvent to all registered listeners.
void set legendBuilder(LegendBuilder builder) #
Sets the legend builder for the chart and sends a change event to all registered listeners.
void set legendOrientation(Orientation orientation) #
Sets the legend orientation and sends a change event to all registered listeners.
num get margin #
Returns the margin. The default value is 0.25 (25 percent).
void set margin(num margin) #
Sets the margin used when auto-zooming the content to fit the current rendering bounds and sends a change event to all registered listeners.
bool get notify #
Returns the flag that controls whether or not change events are sent to registered listeners. You can set this to false temporarily if you have a lot of changes to make to a chart and you don't want to trigger chart repaints until you are finished.
void set notify(bool notify) #
Sets the flag that controls whether or not change events are sent to
registered listeners. If
true, this method will generate
a change notification based on the assumption that there have been
accumulated chart changes while the flag was set to
Returns the anchor point for the chart title (and subtitle if there is one).
Sets the anchor point for the chart title and sends a change event to all registered listeners.
Returns the offset from the center of the bounds for the rendering.
void draw(CanvasRenderingContext2D context, Rectangle bounds) #
Renders the chart within the specified bounds of the canvas.
void drawAxes(CanvasRenderingContext2D context, ChartBox3D chartBox, List<Point> pts) #
Draws the axis to the given context. The chartBox contains vertices that determine the end points of the axes, as well as anchor vertices for the tick labels that will be overlaid on the chart after the 3D objects are rendered. The pts list contains the projected points for all the vertices of all the objects that make up the chart.
This method is called internally, you won't normally call it directly.
void drawPieLabels(CanvasRenderingContext2D context, num w, num h, num depth) #
Returns the color for the gridlines for the x-axis, or
Returns the color for the gridlines for the y-axis, or
Returns the color for the gridlines for the z-axis, or
List<num> findAxisTickUnits(CanvasRenderingContext2D context, num w, num h, num depth) #
true if gridlines are visible for the x-axis and
true if gridlines are visible for the y-axis and
true if gridlines are visible for the z-axis and
bool longest(num x, num a, num b, num c) #
void plot3DChanged(Plot3DChangeEvent) #
Receives notification of a change to the chart's plot or the plot's subelements.
void receive(ChartElementVisitor visitor) #
Receives a visitor - the visitor's
visit() method will be called for
each ChartElement within this chart structure.