ChartCanvasAxis.PlotLines

Syntax

PlotLines: Array of Objects;

Description

The PlotLines property determines an array of custom axis lines.

Comments

Use JSON or the setSettings method to set the property value and the getSettings method to get the property value.

Array can contain objects with the following fields:

{
LineColor: String, // Line color
LineStyle: String, // Line style
LineWidth: Number, // Line width
ValueFunction: PP.Ui.Chart.LevelLinesNames, // Function type that describes line
Value: Number, // Line level, if constant is selected as a function (PP.Ui.Chart.LevelLinesNames.constant)
ZIndex: Number, // Line render parameter: <=  0 - line is rendered behind the series, > 0 - line is rendered in front of the series
Label: Object, // Line label 
    Text: String, // Line text
    Font: PP.Font, // Font settings
    Align: String, // Text alignment: "Start", "Center", "End"
}

Example

Executing the example requires the web application with opened instance of the express report, with selected chart. It is required to enter code in the console:

// Get chart instance
dView = PP.App.getModuleObject().getReportBox().getDataView();
chart = dView.getChartView().getInstance();
// Get chart horizontal axis
axis = chart.getXAxis();
// Get horizontal axis settings
settings = axis.getSettings();
// Get property value
console.log(settings.PlotLines);

After executing the example the property value is displayed in the console.

See also:

ChartCanvasAxis