Hi Kevin,
It depends on exact what you mean by "auto-adjust the width". If by "auto-adjust the width", you mean to make the chart smaller like a photograph (which means everything is smaller when the chart is smaller), you can always use HTML to do this. For example:
<!-- scale the image to be 50% of the containing element's size -->
<img src='mychartimage.png' style='width:50%;height:auto'>
(If you are using the ASP.NET framework, style attributes can be added to the ASP.NET tags.)
For more details, please refer to the HTML documentation.
Another interpretation of "auto-adjust the width" is to draw a different chart when the size changes. For example, in the Windows Performance Monitor (enter "perfmon" in the command line), the chart will "auto-adjust" to fit the window size. When the chart auto-adjust, the font size or line width does not change. The plot area size changes, and there may be more or less grid line and axis labels. For this type of resizing, because the chart is completely redrawn with a different layout, the browser needs to send its window size to the server (the server has no way of knowing the browser window size unless the browser sends its size to the server), and the server needs to create the new charts based on the size and send them back to the browser.
Hope this can help.
Regards
Peter Kwan |