W
Windmill•6mo ago
cytadela8

Chartjs options not working

Hi, do chartjs options actually work? I'm trying to scale the x axis properly (I have dates on the x axis). Specifying the "options" seems to have no effect. I'm trying to use following options:
{
"scales": {
"x": {
"type": "time",
"time": {
"unit": "second",
"displayFormats": {
"second": "YYYY-MM-DD HH:mm:ss"
}
},
"title": {
"display": true,
"text": "Time"
}
},
"y": {
"title": {
"display": true,
"text": "Value"
}
}
}
}
{
"scales": {
"x": {
"type": "time",
"time": {
"unit": "second",
"displayFormats": {
"second": "YYYY-MM-DD HH:mm:ss"
}
},
"title": {
"display": true,
"text": "Time"
}
},
"y": {
"title": {
"display": true,
"text": "Value"
}
}
}
}
4 Replies
rubenf
rubenf•6mo ago
@Faton ^
cytadela8
cytadela8•6mo ago
So I kind of found a way to solve this by moving to Plotly. Plotly properly handles dates by default 🙃
Faton
Faton•6mo ago
Thanks for the feedback! There was a bug for scales option in particular. Other options works correctly. I will make a fix and ping you when it's deployed
cytadela8
cytadela8•6mo ago
Thanks!!! 😄
Want results from more Discord servers?
Add your server
More Posts