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:
Name | Type | Scriptable | Description |
---|---|---|---|
borderDash | int[] | Yes | Length and spacing of dashes on grid lines. See MDN. |
borderDashOffset | double | Yes | Offset for line dashes. See MDN. |
color | String - IsColor | Yes | Color of angled lines. |
display | boolean | - | If true , angle lines are shown. |
lineWidth | int | Yes | Width 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:
Name | Callback | Returned types |
---|---|---|
borderDash | BorderDashCallback<ScaleContext> | int |
borderDashOffset | BorderDashOffsetCallback<ScaleContext> | double |
color | ColorCallback<ScaleContext> | String - IsColor |
lineWidth | WidthCallback<ScaleContext> | int |