Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ See [these examples](example) for more information
data: Chart.ChartData | (canvas: HTMLCanvasElement | null) => Chart.ChartData;
options?: Chart.ChartOptions;
fallbackContent?: React.ReactNode;
plugins?: Chart.PluginServiceRegistrationOptions[];
getDatasetAtEvent?: (dataset: Array<{}>, event: React.MouseEvent<HTMLCanvasElement>) => void;
getElementAtEvent?: (element: [{}], event: React.MouseEvent<HTMLCanvasElement>) => void;
getElementsAtEvent?: (elements: Array<{}>, event: React.MouseEvent<HTMLCanvasElement>) => void;
plugins?: Chart.Plugin[];
getDatasetAtEvent?: (dataset: Chart.InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void;
getElementAtEvent?: (element: Chart.InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void;
getElementsAtEvent?: (elements: Chart.InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void;
```

#### id
Expand Down Expand Up @@ -92,7 +92,7 @@ If true, will tear down and redraw chart on all updates

#### type

Type: `'line' | 'bar' | 'horizontalBar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble' | 'pie' | 'scatter'`
Type: `'bar' | 'line' | 'scatter' | 'bubble' | 'pie' | 'doughnut' | 'polarArea' | 'radar'`

Chart.js chart type (required only on ChartComponent)

Expand Down
3 changes: 3 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export interface Props<
options?: ChartOptions<TOtherType>;
plugins?: Plugin<TOtherType>[];
redraw?: boolean;
/**
* @todo Replace with `children` prop.
*/
fallbackContent?: ReactNode;
getDatasetAtEvent?: (
dataset: InteractionItem[],
Expand Down
38 changes: 2 additions & 36 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3209,14 +3209,6 @@
"@typescript-eslint/typescript-estree" "5.1.0"
debug "^4.3.2"

"@typescript-eslint/[email protected]":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.0.0.tgz#aea0fb0e2480c1169a02e89d9005ac3f2835713f"
integrity sha512-5RFjdA/ain/MDUHYXdF173btOKncIrLuBmA9s6FJhzDrRAyVSA+70BHg0/MW6TE+UiKVyRtX91XpVS0gVNwVDQ==
dependencies:
"@typescript-eslint/types" "5.0.0"
"@typescript-eslint/visitor-keys" "5.0.0"

"@typescript-eslint/[email protected]":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.1.0.tgz#6f1f26ad66a8f71bbb33b635e74fec43f76b44df"
Expand All @@ -3225,29 +3217,11 @@
"@typescript-eslint/types" "5.1.0"
"@typescript-eslint/visitor-keys" "5.1.0"

"@typescript-eslint/[email protected]":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.0.0.tgz#25d93f6d269b2d25fdc51a0407eb81ccba60eb0f"
integrity sha512-dU/pKBUpehdEqYuvkojmlv0FtHuZnLXFBn16zsDmlFF3LXkOpkAQ2vrKc3BidIIve9EMH2zfTlxqw9XM0fFN5w==

"@typescript-eslint/[email protected]":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.1.0.tgz#a8a75ddfc611660de6be17d3ad950302385607a9"
integrity sha512-sEwNINVxcB4ZgC6Fe6rUyMlvsB2jvVdgxjZEjQUQVlaSPMNamDOwO6/TB98kFt4sYYfNhdhTPBEQqNQZjMMswA==

"@typescript-eslint/[email protected]":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.0.0.tgz#bc20f413c6e572c7309dbe5fa3be027984952af3"
integrity sha512-V/6w+PPQMhinWKSn+fCiX5jwvd1vRBm7AX7SJQXEGQtwtBvjMPjaU3YTQ1ik2UF1u96X7tsB96HMnulG3eLi9Q==
dependencies:
"@typescript-eslint/types" "5.0.0"
"@typescript-eslint/visitor-keys" "5.0.0"
debug "^4.3.1"
globby "^11.0.3"
is-glob "^4.0.1"
semver "^7.3.5"
tsutils "^3.21.0"

"@typescript-eslint/[email protected]":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.1.0.tgz#132aea34372df09decda961cb42457433aa6e83d"
Expand All @@ -3261,14 +3235,6 @@
semver "^7.3.5"
tsutils "^3.21.0"

"@typescript-eslint/[email protected]":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.0.0.tgz#b789f7cd105e59bee5c0983a353942a5a48f56df"
integrity sha512-yRyd2++o/IrJdyHuYMxyFyBhU762MRHQ/bAGQeTnN3pGikfh+nEmM61XTqaDH1XDp53afZ+waXrk0ZvenoZ6xw==
dependencies:
"@typescript-eslint/types" "5.0.0"
eslint-visitor-keys "^3.0.0"

"@typescript-eslint/[email protected]":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.1.0.tgz#e01a01b27eb173092705ae983aa1451bd1842630"
Expand Down Expand Up @@ -5745,7 +5711,7 @@ [email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9:
dependencies:
ms "2.0.0"

debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
Expand Down Expand Up @@ -7567,7 +7533,7 @@ [email protected]:
merge2 "^1.3.0"
slash "^3.0.0"

globby@^11.0.1, globby@^11.0.2, globby@^11.0.3, globby@^11.0.4:
globby@^11.0.1, globby@^11.0.2, globby@^11.0.4:
version "11.0.4"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5"
integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==
Expand Down