I have a Canvas JS chart . I have defined onclick event on the bar plots. There are separate charts on the page with display set to none.
<div id="chartContainer2000" style="height: 370px; width: 100%; display:none"></div>
The OnClick event sets the style.display to ‘block’. But if I set it to ‘inline’, no chart is displayed. Only if I set it to “block” the chart is displayed but with a smaller size. I want it to be 370pxby1000px. I have tried setting x.style.height=360px in the onclick event but still it does not happen.
The picture that comes is this after OnClick:

The picture in expected size is shown if inspect element is selected :

Please suggest how to make the chart to show in actual size after OnClick ?