how do i set the correct height when using javascript google bar chart
-
28-09-2019 - |
Question
i am using google bar chart and in the options there is a height property. depending on my dataset i need to set a different height as things either get squeezed together or there is tons of whitespace above and below the bar chart.
is there anyway to have the chart know how much height it needs based on the number of items in the datatable?
Solution
Have you run into issues dynamically resizing based on dataset size?
e.g., on the Code Playground:
line 31 width:600, height: data.getNumberOfRows() * 80,
OTHER TIPS
no, at least not using the bar chart API but it wouldn't be too hard for you to make a method :D
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow