How to recreate website examples? #10313
-
Hello, I'm having a hard to recreate the "Performance!" example from the homepage. I copied the whole example from github and changed only the label and the datasets:
Unfortunately, the result looks totally different. Can somebody tell me what I am doing wrong. |
Beta Was this translation helpful? Give feedback.
Answered by
LeeLenaleee
Apr 22, 2022
Replies: 1 comment 1 reply
-
You have putted your options in the data field but it is supposed to be in the root. Your config (simplefied): new Chart('canvasId', {
type: 'line',
data: {
labels: [],
datasets: [],
options: {}
}
}) Correct config (simplefied): new Chart('canvasId', {
type: 'line',
data: {
labels: [],
datasets: []
},
options: {}
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rockiger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have putted your options in the data field but it is supposed to be in the root.
Your config (simplefied):
Correct config (simplefied):