* base background color
* @see Defaults.backgroundColor
*/
- backgroundColor: Scriptable<Color, ScriptableContext<TType>>;
+ backgroundColor: ScriptableAndArray<Color, ScriptableContext<TType>>;
+ /**
+ * base hover background color
+ * @see Defaults.hoverBackgroundColor
+ */
+ hoverBackgroundColor: ScriptableAndArray<Color, ScriptableContext<TType>>;
/**
* base border color
* @see Defaults.borderColor
*/
- borderColor: Scriptable<Color, ScriptableContext<TType>>;
+ borderColor: ScriptableAndArray<Color, ScriptableContext<TType>>;
+ /**
+ * base hover border color
+ * @see Defaults.hoverBorderColor
+ */
+ hoverBorderColor: ScriptableAndArray<Color, ScriptableContext<TType>>;
/**
* base font
* @see Defaults.font
// @ts-expect-error should be number
Chart.defaults.font.size = () => '10';
+Chart.defaults.backgroundColor = 'red';
+Chart.defaults.backgroundColor = ['red', 'blue'];
+Chart.defaults.backgroundColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';
+
+Chart.defaults.borderColor = 'red';
+Chart.defaults.borderColor = ['red', 'blue'];
+Chart.defaults.borderColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';
+
+Chart.defaults.hoverBackgroundColor = 'red';
+Chart.defaults.hoverBackgroundColor = ['red', 'blue'];
+Chart.defaults.hoverBackgroundColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';
+
+Chart.defaults.hoverBorderColor = 'red';
+Chart.defaults.hoverBorderColor = ['red', 'blue'];
+Chart.defaults.hoverBorderColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';
+
Chart.defaults.font = {
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
size: 10