apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.4k stars 1.3k forks source link

horizontal bar chart size does not take up 100% width, depending on data value entered #3293

Open BackUpAccount112 opened 2 years ago

BackUpAccount112 commented 2 years ago

Description

Trying to make a horizontal marked bar at 100% width of parent container, but seems to behave quite randomly depending on data value entered

Steps to Reproduce

  1. Change y axis value and/or goals value in the data.series of reproduction link

Expected Behavior

Chart will use 100% width of parent container

Actual Behavior

Chart width does not take up 100% of parent container and leaves space on the right hand side, amount of space seems to change quite randomly depending on values of data entered

Screenshots

See here at 200 y axis value and 200 goals value it will use 100% width of container as expected

Screenshot 2022-07-29 at 17 23 08

See here at 100 y axis value and 100 goals value it will not

Screenshot 2022-07-29 at 17 33 30

Reproduction Link

https://codesandbox.io/s/youthful-minsky-45ukkj?file=/src/App.js

brianlagunas commented 2 years ago

Pease fix your repro link, or this issue will be closed. Currently it does not contain any code to render a chart and does not reproduce the issue you have reported.

BackUpAccount112 commented 2 years ago

Pease fix your repro link, or this issue will be closed. Currently it does not contain any code to render a chart and does not reproduce the issue you have reported.

tried to fix it hopefully it works now