chartjs / chartjs/chartjs-chart-financial

How can I center the chart?

Open
#146 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
809
Forks
199
PR merge metrics
No merged PRs in 30d

Description

May sound stupid, but I am not sure how I can display the chart in a more centered way, because it is near the top, which looks confusing:

[https://imgur.com/a/7oVPA9G](imgur pic)

Here are my options:
```
options: {
plugins: {
legend: {
display: false,
},
title: {
display: true,
text: 'OHLC for {{ stock }}',
}
},
scales: {
x: {
type: 'timeseries',
time: {
unit: 'day',
},
},

y:{
beginAtZero: true, type: "linear",ticks: { count: 11, }
},
right: {
beginAtZero: true, position: 'right',
ticks: { count: 11, callback: ((value, index, ticks) => { return value * 100 + "%"; }),}
}
},
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.