ChartLegend Class

A chart legend.

Declaration

export class ChartLegend extends SerializableModel

Remarks

Use the ChartItem.legend and ScatterChartItem.legend properties to get access to the chart legend.

constructor

Initializes a new instance of the ChartLegend class.

Declaration

constructor(
    JSON?: any,
    serializer?: ModelSerializer
)

Parameters

Name Type Description
JSON any

A JSON object used for dashboard deserialization. Do not pass this parameter directly.

serializer ModelSerializer

An object used for dashboard deserialization. Do not pass this parameter directly.

Properties

insidePosition Property

Specifies the legend position and orientation within a chart diagram.

Declaration

insidePosition: ko.Observable<ChartLegendInsidePosition>

Property Value

Type Description
Observable<ChartLegendInsidePosition>

A ChartLegendInsidePosition enumeration member that specifies the legend position and orientation within a chart diagram.

Remarks

Set the ChartLegend.isInsideDiagram property to true before specifying the legend position within a chart diagram.

isInsideDiagram Property

Specifies whether the chart’s legend is placed inside the diagram.

Declaration

isInsideDiagram: ko.Observable<boolean>

Property Value

Type Description
Observable<boolean>

true if the chart’s legend is placed inside the diagram; otherwise, false.

Remarks

Set the isInsideDiagram property to false before specifying the legend position and orientation outside the chart diagram.

outsidePosition Property

Specifies the legend position and orientation outside the chart diagram.

Declaration

outsidePosition: ko.Observable<ChartLegendOutsidePosition>

Property Value

Type Description
Observable<ChartLegendOutsidePosition>

A ChartLegendOutsidePosition enumeration member that specifies the legend position and orientation outside the chart diagram.

Remarks

Set the ChartLegend.isInsideDiagram property to false before specifying the legend position outside the chart diagram.

visible Property

Specifies whether the chart’s legend is visible.

Declaration

visible: ko.Observable<boolean>

Property Value

Type Description
Observable<boolean>

true if the chart’s legend is visible; otherwise, false.

Methods

getInfo Method

For internal use.

Declaration

getInfo(): ISerializationInfoArray

Returns

Type Description
ISerializationInfoArray

An array of objects that provide serialization info.