ChartEditMode.DrawContext

Syntax

DrawContext: CanvasRenderingContext2D;

Description

The DrawContext property determines context of the chart draw area in edit mode.

Comments

Use JSON to set the property value and the getDrawContext method to get the property value.

Context is an object that provides methods and properties for drawing items in the canvas.

Example

Executing the example requires that the HTML page contains the Chart component named chart (see Example of Creating the Chart Component). Get font settings of chart draw area context in edit mode:

console.log("Settings of draw area context font: " + chart.getEditMode().getDrawContext().font);

As a result, settings of font used for chart draw area context in edit mode, are displayed to the browser console:

Settings of draw area context font: 10px sans-serif

See also:

ChartToolTip