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?
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
Post a Comment