mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Merge pull request #19527 from mernen/fix-react-chartjs-2
react-chartjs-2: remove invalid options
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import { Bar } from 'react-chartjs-2';
|
||||
import { ChartData, ChartOptions } from 'chart.js';
|
||||
|
||||
const data = {
|
||||
const data: ChartData = {
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
datasets: [{
|
||||
label: 'Sales',
|
||||
@@ -22,13 +23,11 @@ const data = {
|
||||
fill: false,
|
||||
backgroundColor: '#71B37C',
|
||||
borderColor: '#71B37C',
|
||||
hoverBackgroundColor: '#71B37C',
|
||||
hoverBorderColor: '#71B37C',
|
||||
yAxisID: 'y-axis-1'
|
||||
}]
|
||||
};
|
||||
|
||||
const options = {
|
||||
const options: ChartOptions = {
|
||||
responsive: true,
|
||||
tooltips: {
|
||||
mode: 'label'
|
||||
@@ -44,9 +43,6 @@ const options = {
|
||||
display: true,
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
labels: {
|
||||
show: true
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -58,9 +54,6 @@ const options = {
|
||||
id: 'y-axis-1',
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
labels: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -70,9 +63,6 @@ const options = {
|
||||
id: 'y-axis-2',
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
labels: {
|
||||
show: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user