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#)
 Size of graph in panel
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fsjodin

26 Posts

Posted - 08 Aug 2006 :  21:26:08  Show Profile  Reply with Quote
Hi.

How do I make a ChartView occupy the entire panel it is contained in?

When I add my ChartView containing the SimpleLinePlot to a panel there is lots of empty space on both sides of the chart, and at the top and bottom.

I have set the Dock to Fill and it resizes properly when I resize the form but the chart is not drawn where it utilizes all of the space available. There is a lot of empty space, especially to the left and right of the chart.

Thanks

quinncurtis

1164 Posts

Posted - 08 Aug 2006 :  23:37:28  Show Profile  Reply with Quote
We tested our LinePlotSalesVolume example, which is simple graph in a form. While displaying Form1 in the designer, we set the Dock property of the LinePlotSalesVolume control in the form to Fill, and the graph fills the entire form. Running the program, the graph fills the entire form. Resizing the form, and the graph resizes to fill the entire form.

What happens when you do the same ?
Go to Top of Page

fsjodin

26 Posts

Posted - 09 Aug 2006 :  09:29:14  Show Profile  Reply with Quote
When I do that it does put the Sales Volume plot in the center and it does resize properly when I resize the form. However I would not say that the plot fills the available area.
I would say the graph occupies perhaps a total of 60-70% of the actual space available. There is a lot of empty space to the left and right of the chart. Is there any way I can send you a screenshot to illustrate what I mean?

Thanks




Edited by - fsjodin on 09 Aug 2006 09:32:58
Go to Top of Page

quinncurtis

1164 Posts

Posted - 09 Aug 2006 :  09:35:15  Show Profile  Reply with Quote
We cannot explain why your compiler is acting differently than our own.

Please answer the following questions:

1. What product are you using: QCChart2D for .Net, or QCChart2D CF for .Net Compact Framework?

2. What language are you using: VB or C# ?

3. What compiler revision are you using ? VS 2002, VS 2003 or VS 2005 ?
Go to Top of Page

fsjodin

26 Posts

Posted - 09 Aug 2006 :  09:58:50  Show Profile  Reply with Quote
I just sent two screenshots to support@quinn-curtis.com illustrating what I am seeing.

1. QCChart2D for .Net

2. C#

3. VS 2003


Thanks

Go to Top of Page

quinncurtis

1164 Posts

Posted - 09 Aug 2006 :  10:17:15  Show Profile  Reply with Quote
What you want is the graph to fill the ChartView, NOT the ChartView UserControl to fill the panel it is placed in. This has nothing to do with the Dock property of the ChartView UserControl, which works exactly as it should, placing the ChartView UserControl with respect to the parent containter

The position and size of the graph in the ChartView is set using the coordinate systems SetGraphBorderDiagonal method, which is used in every example program and described in the manual.

// Original code from LinePlotSalesVolume
TimeCoordinates pTransform1 = new TimeCoordinates();
pTransform1.AutoScale(DatasetArray, ChartObj.AUTOAXES_FAR , ChartObj.AUTOAXES_FAR);
pTransform1.SetGraphBorderDiagonal(0.15, .15, .9, 0.8) ;


If you want the graph larger in the ChartView, define the border with smaller margins.

pTransform1.SetGraphBorderDiagonal(0.075, .1, .95, 0.9) ;
Go to Top of Page

fsjodin

26 Posts

Posted - 09 Aug 2006 :  10:32:39  Show Profile  Reply with Quote
Excellent. That was what I was looking for. Thanks!



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