ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Dynamic width
Posted by Kevin on May-07-2012 20:40
I created a few charts on the same page.
On the iPad (or when the browser is minimized), I need to scroll to watch them.
Is it possible to auto-adjust the width (depending on the browser's width)?

  Re: Dynamic width
Posted by Peter Kwan on May-08-2012 01:18
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