javascript - ECharts automatic height -


is possible create echarts line chart without specifying it's container height - make responsive actual data.

the number of items in y axis can vary.

by default, when don't define height of container, 0 , chart not visible.


in example there 6 items (months) in y axis, if wanted show 12 months in same container, without making bars 50% narrower? enter image description here

if know how many rows or bars going have, can use calculate height of container.

for example, if each row 31px , fixed height of graph header & footer 200px use:

var chartheight = datavalues.length * 31 + 200; $('#graph-container').css({'height': chartheight}); 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -