Chart Custom Color Scheme Component

Chart Custom Color Scheme

Function: a!colorSchemeCustom()

A custom list of colors to apply to any chart.

See also: Chart Color Schemes, UX Charts Best Practices.

Parameters

Name Keyword Types Description

Colors

Colors

Text

List of colors to use in the custom color scheme. Valid values: any valid hex colors. Maximum colors allowed: 12.

Notes

  • If there are more series than colors provided, the colors enumerate through the list again from the beginning.
  • Users can still configure the colors of individual chart series while using a custom color scheme. Any series configurations will take precedence over automatically assigned color scheme colors.

Examples

Copy and paste an example into EXPRESSION MODE:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
a!pieChartField(
  label: "Opportunity Sources",
  labelPosition: "ABOVE",
  series: {
    a!chartSeries(label: "Other", data: 10),
    a!chartSeries(label: "Website", data: 20),
    a!chartSeries(label: "Client Referrals", data: 30)
  },
  colorScheme: a!colorSchemeCustom(
    colors: {"#05286B", "#379683", "#5CDB95"}
  ),
  showDataLabels: true, 
  showAsPercentage: true
)

Displays the following:

screenshot of a pie chart displaying opportunity sources

Open in Github Built: Thu, Feb 23, 2023 (02:59:22 PM)

On This Page

FEEDBACK