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

bar chart with width '100%' and xaxis.type="datetime" has spacing around the chart #4522

Closed
zee0786 opened this issue Jun 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@zee0786
Copy link

zee0786 commented Jun 12, 2024

Description
Steps to Reproduce
1- draw a vertical bar chart with type= datetime
2- After giving all the required params the graph just ignores the available width provided.,

Actual behaviour

  • there is some space before and after the plot

Expected Behavior
it should take up the full width if the width provided is '100%'.

Reproduction Link
https://codesandbox.io/p/sandbox/react-basic-example-forked-6n82ky?file=%2Fsrc%2FApp.js

@zee0786 zee0786 added the bug Something isn't working label Jun 12, 2024
@brianlagunas
Copy link
Member

Your reproduction link does not work. Please update it.

Your react sample works, but you are hardcoding the width to 500, so I am confused on what you are trying to report.

@zee0786
Copy link
Author

zee0786 commented Jun 13, 2024

I have updated the access to reproduction link above and this is what I am getting. The extra white space that needs to be filled up with the plot has been marked in yellow. Also the size of this white space is directly proportional to the columnWidth applied in

plotOptions: {
bar: {
columnWidth:'80%'
},
},

more the value of columnWidth more the graph plot area shrinks.

image

@junedchhipa junedchhipa changed the title chart width given '100%' not working with type="datetime" bar chart with width '100%' and xaxis.type="datetime" has spacing around the chart Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants