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#)
 AutoScale and histogram plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hamfree

11 Posts

Posted - 30 Mar 2009 :  10:59:04  Show Profile  Reply with Quote
Hi,

I have a histogram plot that has bars with a width of between 5,000 and 15,000. The height of the bars is in the range from 1 to 10. If I call AutoScale() on this GroupDataset, the y-axis is set to the range from 0 to 20,000 and I cannot see the bars of course. I have to manually adjust the y-scale (0-10) to see my bars.
AutoScale seems to look at the y value groups to calculate the optimal y-scale, but in fact the second y-group for a histogram plot is the width and should only affect the autoscale algorithm for the x-scale!

Do you have any suggestions/workarounds?

hamfree

quinncurtis

1164 Posts

Posted - 30 Mar 2009 :  12:03:52  Show Profile  Reply with Quote
That is what the GroupDataset.SetAutoScaleNumberGroups method is for. It tells the coordinate auto-scale routines to use only the specified number of groups in the calculation. In the example code below, the number of groups is limited to 1.

GroupDataset Dataset1 = new GroupDataset("Actual Sales",x1,y1);
Dataset1.SetAutoScaleNumberGroups(1);
CartesianCoordinates pTransform1 = new CartesianCoordinates();
pTransform1.AutoScale(Dataset1);
Go to Top of Page

hamfree

11 Posts

Posted - 31 Mar 2009 :  03:18:41  Show Profile  Reply with Quote
Thank you! It works perfectly!

hamfree
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