From: stockiNail Date: Thu, 31 Dec 2020 15:19:58 +0000 (+0100) Subject: Adds backgroundColor and borderColor options to the documentation (#8257) X-Git-Tag: v3.0.0-beta.8~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a22288dc2d513ad0200164ccfe9f84c85e6fc95d;p=thirdparty%2FChart.js.git Adds backgroundColor and borderColor options to the documentation (#8257) --- diff --git a/docs/docs/general/colors.md b/docs/docs/general/colors.md index 1dc508333..828d223ca 100644 --- a/docs/docs/general/colors.md +++ b/docs/docs/general/colors.md @@ -2,7 +2,13 @@ title: Colors --- -When supplying colors to Chart options, you can use a number of formats. You can specify the color as a string in hexadecimal, RGB, or HSL notations. If a color is needed, but not specified, Chart.js will use the global default color. This color is stored at `Chart.defaults.color`. It is initially set to `'rgba(0, 0, 0, 0.1)'`. +When supplying colors to Chart options, you can use a number of formats. You can specify the color as a string in hexadecimal, RGB, or HSL notations. If a color is needed, but not specified, Chart.js will use the global default color. There are 3 color options, stored at `Chart.defaults`, to set: + +| Name | Type | Default | Description +| ---- | ---- | ------- | ----------- +| `backgroundColor` | `Color` | `rgba(0, 0, 0, 0.1)` | Background color. +| `borderColor` | `Color` | `rgba(0, 0, 0, 0.1)` | Border color. +| `color` | `Color` | `#666` | Font color. You can also pass a [CanvasGradient](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient) object. You will need to create this before passing to the chart, but using it you can achieve some interesting effects.