hoverBackgroundColor and hoverBorderColor should accept Color/Color[]

This commit is contained in:
Glen
2018-12-02 14:05:33 +02:00
parent efbcbdebaf
commit 76d38d894f
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -9,7 +9,9 @@ const plugin = {
}
};
const chart: Chart = new Chart(new CanvasRenderingContext2D(), {
const ctx = new CanvasRenderingContext2D();
const chart: Chart = new Chart(ctx, {
type: "bar",
plugins: [plugin, plugin],
data: {
@@ -17,6 +19,8 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), {
datasets: [
{
backgroundColor: "#000000",
hoverBackgroundColor: ctx.createLinearGradient(0, 0, 0, 100),
hoverBorderColor: ctx.createLinearGradient(0, 0, 0, 100),
borderWidth: 1,
label: "test",
data: [1, null, 3]
+2 -2
View File
@@ -554,8 +554,8 @@ declare namespace Chart {
borderSkipped?: PositionType;
data?: Array<number | null | undefined> | ChartPoint[];
fill?: boolean | number | string;
hoverBackgroundColor?: string | string[];
hoverBorderColor?: string | string[];
hoverBackgroundColor?: ChartColor | ChartColor[];
hoverBorderColor?: ChartColor | ChartColor[];
hoverBorderWidth?: number | number[];
label?: string;
lineTension?: number;