extjslayouthbox

extjs6 stretch chart to fit screen vertically in hbox not working


In my extjs6 layout, I want the chart to stretch to fit vertically the entire screen. I thought changing the height of chart to 100% but it is not working. Can someone please show me how to accomplish this?

https://fiddle.sencha.com/#fiddle/2kkv&view/editor


Solution

  • You just need to subtract the height (36) of both the title bars title: 'TEST' and title: 'Bar Chart' from window.innerHeight and assign this height to chart like below:-

    height: window.innerHeight - (36+36)
    

    Working Fiddle