I have a PanelBar control with 3 panels, each holding a Chart control with column items. I am using the HtmlHelper build the charts. The PanelBar is in a container that spans 100% of the screen. By default, the charts in the panels render at about 25% of the width - and that means charts with a lot of categories are seriously compressed and unreadable.
I've tried using the Width option of ChartArea (inside Chart), and while that works, I can't always be sure the double I set this to will be right for all user's browsers. There is no string option, so Width has to be a number of pixels.
Using HtmlAttributes (adding style) also has no effect.
How can I get the charts to occupy 100% of the container other than just guessing using ChartArea's Width or resorting to JavaScript to redraw the chart after the page is rendered?
So I decided to move this out of a PanelBar control and into a standard Bootstrap set of tabs. Now I get 100% across the page but a new problem.
On initial page load, the first tab shows a results table (which should be there) and the first chart (which should not). The second tab has the first and second charts (should only have the first). The third tab has the second and third charts (only the second should be here) and finally the fourth has the fourth chart (which is correct).
After I've clicked all 4 tabs, I can go back to the first tab and now all tabs show the correct contents without reloading, etc.