Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I center the chart? #146

Open
palmy-investing opened this issue Jun 20, 2023 · 0 comments
Open

How can I center the chart? #146

palmy-investing opened this issue Jun 20, 2023 · 0 comments

Comments

@palmy-investing
Copy link

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 + "%"; }),}
          }
        },
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant