Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Linear Axis max pixel size
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

KnightHawk

22 Posts

Posted - 21 Aug 2009 :  13:36:23  Show Profile  Reply with Quote
I was wondering how many pixels long, or pixels high a LinearAxis can be. From a first glance, it seems that an axis can only be rendered to 2^15 pixels while the numericAxisLabels can still continue to display on a ChartView after 2^15 pixels. (The grid lines end, but the labels continue at 2^15 pixels).

Is there a way to have a linearAxis be more than 2^15 pixels long?

KnightHawk

22 Posts

Posted - 21 Aug 2009 :  14:50:53  Show Profile  Reply with Quote
2^15 = 32768.

I am creating a chart that is to be converted to an image, and then transferred to a .pdf. The .pdf has to be of high quality (very good resolution) and can be as long as needed. The data can have a range between 0 - 4000. The range corresponds to inches. So if I want a 72DPI resolution, I need 4000" * 72 DPI = 288000 pixels.

I found that a UserControl can only have 32767 pixels of width or height. This is because they use only a 16bit int value for the size of a window (width or height).

Do you know the theoretical limit to how large an axis can be?

The ChartView.getBufferedImage() can create charts over 32767 pixels long, (I can still see the numericAxisLabel write numbers out all the way to the bottom of the image), yet the LinearAxis stops at 32767 pixels.

How does the ChartView image display a NumericAxisLabel over 32767 pixels, but not the LinearAxis?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 21 Aug 2009 :  15:03:13  Show Profile  Reply with Quote
Our previous reply was not correct, and was deleted.

In the conversion from physical to pixel coordinates, calculated pixel values must be "clamped" to reasonable values, otherwise users will try and plot values of 10^20 in plotting areas scaled for +-10^-10, resulting in numeric overflows in the GDI and elsewhere. So we clamp all pixel calculations to +-2^15, to prevent such overflows. If some anomaly permits the axis labels out farther than that, it's just an accident with no useful purpose in relation to normal use of the software. We have no plans to change these limits. If you want to experiment with this limit, just get the QCChart2D source code and we will point you at the constant you need change.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07