Skip to main content
Version: 6.5

Angle lines

The angle lines options are used to configure angled lines that radiate from the center of the chart to the point labels.

caution

The angle lines can be ONLY applied to radial axes.
These options only apply if display is true.

The RadialAngleLines provides all set and get methods to manage the configuration, as following:

// creates a radial axis 
RadialAxis axis = new RadialAxis(chart);
// enables the angle lines
axis.getAngleLines().setDisplay(true);
// sets and gets the line width value
axis.getAngleLines().setLineWidth(2);

int lineWidth = axis.getAngleLines().getLineWidth();

Table with options:

NameTypeScriptableDescription
borderDashint[]YesLength and spacing of dashes on grid lines. See MDN.
borderDashOffsetdoubleYesOffset for line dashes. See MDN.
colorString - IsColorYesColor of angled lines.
displayboolean-If true, angle lines are shown.
lineWidthintYesWidth of angled lines.

Scriptable

Scriptable options at grid level accept a callback which is called for each of the underlying data values. See more details in Configuring charts section.

All scriptable options callbacks will get a ScaleContext instance.

// creates a radial axis 
RadialAxis axis = new RadialAxis(chart);
// enables the angle lines
axis.getAngleLines().setDisplay(true);
// sets the option by a callback
axis.getAngleLines().setColor(new ColorCallback<ScaleContext>(){

@Override
public IsColor invoke(ScaleContext context){
// logic
return color;
}
});

The following options can be set by a callback:

NameCallbackReturned types
borderDashBorderDashCallback<ScaleContext>int
borderDashOffsetBorderDashOffsetCallback<ScaleContext>double
colorColorCallback<ScaleContext>String - IsColor
lineWidthWidthCallback<ScaleContext>int