GetVectorOfColors | R Documentation |
This function takes into account a range of parameters
including the chart type and other charting parameters, visualization template,
and other colors specified through the palette
.
GetVectorOfColors(
template,
input.data,
filter,
chart.type,
scatter.colors.column = FALSE,
multi.color.series = FALSE,
palette = NULL,
palette.custom.color = NULL,
palette.custom.gradient.start = NULL,
palette.custom.gradient.end = NULL,
palette.custom.palette = NULL,
color.values = NULL,
small.multiples = FALSE,
type = "Series"
)
template |
A list specifying color palettes and other visualization options. |
input.data |
Input data for the visualization. The is usually a vector or table.
It should be normalized from |
filter |
Optional filter which can be used with the input data. The label of the filter is used when appropriate. |
chart.type |
Type of chart to plot |
scatter.colors.column |
For scatterplot data, the column of data which is used to determine the colors of each point. |
multi.color.series |
For bar and column charts, a logical indicating
how colors are used. By default, this value is set to FALSE, in which case
the number of colors returned is equal to the number of data series (or columns)
in |
palette |
Specifies the color vector to output. It can be;
(1) A named palette from grDevices, RColorBrewer colorspace, or colorRamps;
(2) "Group colors" - this option returns a value of NULL so that the charts will use
defaults specified instead the charting function.
It is usually only applicable for the line of best fit (i.e. apply
the colors for each data series to their respective live of best fit), or
Pie subslice (create a gradient for the subslices based centered on the color of
the main (inner) slice. No checks are applied because this option is only
made available in the GUI controls when this option is relevant.
(3) A vector of colors which will be recycled to length |
palette.custom.color |
A single color provided as a hex or character string.
Only used if |
palette.custom.gradient.start |
A color specifying the start of
the gradient when |
palette.custom.gradient.end |
A color specifying the end of the
gradient when |
palette.custom.palette |
A vector or comma separated list of colors
which will be recycled to the desired length unless |
color.values |
An optional numeric vector or matrix which can
be used with gradual palettes (either a custom gradient or one of
the sequential color palettes). The names of the vector or matrix
should be the same as the names of |
small.multiples |
Logical indicating whether the |
type |
Describes the type of data which the color vector will be applied to.
One of "Series" or "Pie subslice". By default, |
A vector or matrix of colors (as hex codes) with the appropriate number of colors taking into account the input.data, chart.type, the template and other parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.