chart_add_label

Adds the given label or data structure as the chart label.

Syntax

chart_add_label(chart, label)
Argument Description
chart The chart id to add to.
label String or ds_list to add to chart label.

Return: True

Description

This function should be used to add sets of labels into the specified chart. The label can be made up of either strings or ds_list, so all of the following are acceptable:

chart_add_label(chart, "Monday");
chart_add_label(chart, "Tuesday");
chart_add_label(chart, "Wednesday");

var temp_label = ds_list_create();
ds_list_add(temp_label, "Thursday", "Fryday", "saturday", "Sunday");
chart_add_label(chart, temp_label);

Example

chartBalanced = chart_create(chart_pie, 32, 16, 448, 256);

chart_add_label(chartBalanced, "2011");
chart_add_label(chartBalanced, "2012");
chart_add_label(chartBalanced, "2013");
chart_add_label(chartBalanced, "2014");
chart_add_label(chartBalanced, "2015");
chart_add_label(chartBalanced, "2016");
chart_add_label(chartBalanced, "2017");

The above code will add some labels into the chart indexed in the variable "chartBalanced".

results matching ""

    No results matching ""