This function only used for Pie Chart type only.

Adds the given colour or data structure as the chart pie colour.


chart_add_pie_colour(chart, colour)
Argument Description
chart The chart id to add to.
colour The colour or ds_list of colours to add to.

Return: Real


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

chart_add_pie_colour(chart, c_red);
chart_add_pie_colour(chart, c_orange);

var temp_colour = ds_list_create();
ds_list_add(temp_colour, c_yellow, c_green, c_blue);
chart_add_label(chart, temp_colour);


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

chart_add_pie_colour(chartBalanced, 2250751);
chart_add_pie_colour(chartBalanced, 16034051);
chart_add_pie_colour(chartBalanced, 3927039);
chart_add_pie_colour(chartBalanced, 6495977);
chart_add_pie_colour(chartBalanced, 4899723);

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

results matching ""

    No results matching ""