Skip to content

SVGraph_MakeLegend()

CapnOdin edited this page Jan 11, 2018 · 9 revisions

Draws a legend with text followed by a colour.

SVGraph_MakeLegend([Data, Colour])

Parameters

Data

A list of the text in the legend.

Colour

A list of colours corresponding to the text, supports HTML Color Names or Color Values. e.g. "lightgrey" or "#FF00FF".

Note: If left blank, a colour will be generated for each entry in the Data parameter.

Remarks

To hide the legend call the function without parameters.

The legend is draggable.

Example

; Constructing Legend
SVGraph_Chart(width := 100, height := 100, margin := 40)
SVGraph_MakeLegend(["A","B","C"],["#ff0000","#00ff00","#0000ff"])

Plot along the x-axis