ChartAxisTick.setAngle

Syntax

setAngle(value: Number);

Parameters

value. Label rotation angle.

Description

The setAngle method sets label rotation angle.

Example

Executing the example requires an instance of the ChartAxisTick class named axisTick (see ChartAxisTick Constructor). Set label rotation angle and show the label:

// Set label rotation angle
axisTick.setAngle(30);
// Redraw the chart
chart.redraw();
// Draw the label
axisTick.drawSelf();

As a result, the label is drawn at an angle:

Get length of the angled label:

// Get length of the angled label
console.log("Length of the angled label: " + axisTick.getAngleSize(30*Math.PI/180));

Length of the angled label: 67.07367219082653

See also:

ChartAxisTick