mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
hoverBackgroundColor and hoverBorderColor should accept Color/Color[]
This commit is contained in:
@@ -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]
|
||||
|
||||
Vendored
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user