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
 QCChart3D 3D Charting Tools for .Net (VB and C#)
 Grid problem between Y/Z
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

oliversleep

35 Posts

Posted - 12 Aug 2010 :  11:12:19  Show Profile  Reply with Quote
Hi,

I'm currenly using 3DGraph component to display a map.
But I have a problem, I would like to display the 3 axis (X, Y and Z) with a grid on each one.

here is my code :

LinearAxis xAxis1 = new LinearAxis(pTransform, ChartObj.X_AXIS);
            xAxis1.SetAxisLimits(0, maxX);
            xAxis1.SetAxisLimits(0, maxX);
            xAxis1.SetColor(Color.White);
            chartView1.AddChartObject(xAxis1);
            
            LinearAxis xAxis2 = new LinearAxis(pTransform, ChartObj.X_AXIS);
            xAxis2.SetLocation(new Point3D(0, maxY, 0));
            xAxis2.SetAxisLimits(0, maxX);
            xAxis2.SetColor(Color.White);
            chartView1.AddChartObject(xAxis2);
            
            LinearAxis xAxis3 = new LinearAxis(pTransform, ChartObj.X_AXIS);
            xAxis3.SetLocation(new Point3D(maxX, 0, maxZ));
            xAxis3.SetAxisLimits(0, maxX);
            xAxis3.SetColor(Color.White);
            chartView1.AddChartObject(xAxis3);
            
            LinearAxis yAxis1 = new LinearAxis(pTransform, ChartObj.Y_AXIS);
            yAxis1.SetAxisLimits(0, maxY);
            yAxis1.SetColor(Color.White);
            chartView1.AddChartObject(yAxis1);

            LinearAxis yAxis2 = new LinearAxis(pTransform, ChartObj.Y_AXIS);
            yAxis2.SetLocation(new Point3D(maxX, 0, 0));
            yAxis2.SetAxisLimits(0, maxY);
            yAxis2.SetColor(Color.White);
            chartView1.AddChartObject(yAxis2);
            
            LinearAxis yAxis3 = new LinearAxis(pTransform, ChartObj.Y_AXIS);
            yAxis3.SetLocation(new Point3D(0, 0, maxZ));
            yAxis3.SetAxisLimits(0, maxY);
            yAxis3.SetColor(Color.White);
            chartView1.AddChartObject(yAxis3);
            
            LinearAxis zAxis1 = new LinearAxis(pTransform, ChartObj.Z_AXIS);
            zAxis1.SetLocation(new Point3D(0, 0, 0));
            zAxis1.SetAxisLimits(0, maxZ);
            zAxis1.SetColor(Color.White);
            chartView1.AddChartObject(zAxis1);
            
            LinearAxis zAxis2 = new LinearAxis(pTransform, ChartObj.Z_AXIS);
            zAxis2.SetLocation(new Point3D(0, maxY, 0));
            zAxis2.SetAxisLimits(0, maxZ);
            zAxis2.SetColor(Color.White);
            chartView1.AddChartObject(zAxis2);
            
            LinearAxis zAxis3 = new LinearAxis(pTransform, ChartObj.Z_AXIS);
            zAxis3.SetLocation(new Point3D(maxX, 0, 0));
            zAxis3.SetAxisLimits(0, maxZ);
            zAxis3.SetColor(Color.White);
            chartView1.AddChartObject(zAxis3);
            
            
            //Display the grids
            
            Grid xgrid1 = new Grid(xAxis1, yAxis1, ChartObj.X_AXIS, ChartObj.GRID_MAJOR);
            xgrid1.SetColor(Color.White);
            chartView1.AddChartObject(xgrid1);
            
            Grid xgrid2 = new Grid(xAxis1, yAxis1, ChartObj.Y_AXIS, ChartObj.GRID_MAJOR);
            xgrid2.SetColor(Color.White);
            chartView1.AddChartObject(xgrid2);
            
            Grid zgrid1 = new Grid(xAxis1, zAxis1, ChartObj.Z_AXIS, ChartObj.GRID_MAJOR);
            zgrid1.SetColor(Color.White);
            chartView1.AddChartObject(zgrid1);
            
            Grid ygrid1 = new Grid(xAxis1, zAxis3, ChartObj.X_AXIS, ChartObj.GRID_MAJOR);
            ygrid1.SetColor(Color.Purple);
            chartView1.AddChartObject(ygrid1);


It's ok for the planes:
X/Y
X/Z


_________| z
_________|
_________|
________/_\
_______/___\
____y /_____\ x

But I don't arrive to put a grid on Y/Z plane (the left plane).
Do you have an idea to do this ?


Thanks !

quinncurtis

1586 Posts

Posted - 12 Aug 2010 :  11:48:41  Show Profile  Reply with Quote
For any grids in the YZ plane use the constructor that takes all three axis parameters, and the explicitly set the GridAxisPlane.

Grid yzgrid1 = new Grid(xAxis1, yAxis1, zAxis1, ChartObj.Y_AXIS, ChartObj.GRID_MAJOR);
yzgrid1.GridAxisPlane = ChartObj.YZ_MINX_PLANE;
chartVu.AddChartObject(yzgrid1);

Grid yzgrid2 = new Grid(xAxis1, yAxis1, zAxis1,ChartObj.Z_AXIS, ChartObj.GRID_MAJOR);
yzgrid2.GridAxisPlane = ChartObj.YZ_MINX_PLANE;
chartVu.AddChartObject(yzgrid2);

Go to Top of Page

oliversleep

35 Posts

Posted - 12 Aug 2010 :  14:36:09  Show Profile  Reply with Quote
Thanks a lot, I'll try it tomorrow.

But why is it necessary to use all three axis parameters, and the explicitly set the GridAxisPlane for the YZ plane instead the others plans ?

Is there a reason?
Go to Top of Page

quinncurtis

1586 Posts

Posted - 12 Aug 2010 :  15:40:34  Show Profile  Reply with Quote
The 2-axis parameter version is there to be compatible with the original QCChart2D 2D charting software. It is meant to be used primarily for XY plane grids in 2 1/2D charts without explicit z-axis scaling. In general, use the three axis version in all cases.
Go to Top of Page

oliversleep

35 Posts

Posted - 13 Aug 2010 :  03:41:10  Show Profile  Reply with Quote
I'm sorry but it's not working.

Here is the link to my result image :

http://oliversleep.net/webtools/quinn-curtis.PNG

OK : grid are OK
KO : what I would like.

I only use my code with your 2 grids but it doesn't work.

Do you know why ?

Tks !
Go to Top of Page

quinncurtis

1586 Posts

Posted - 13 Aug 2010 :  08:56:13  Show Profile  Reply with Quote
Sorry, we don't know what the problem is, but we are sure it can be resolved. Send the complete source of your example to support@quinn-curtis.com and we will look at it.
Go to Top of Page

oliversleep

35 Posts

Posted - 13 Aug 2010 :  09:12:14  Show Profile  Reply with Quote
I just send you an email with a little source of my problem.

Thanks !
Go to Top of Page

quinncurtis

1586 Posts

Posted - 13 Aug 2010 :  09:44:16  Show Profile  Reply with Quote
Your background is black. All your other grids are white. You neglected to make the YZ grids white; the default black color does not show against the black background.


Grid yzgrid1 = new Grid(xAxis1, yAxis1, zAxis1, ChartObj.Y_AXIS, ChartObj.GRID_MAJOR);
yzgrid1.SetColor(Color.White);
yzgrid1.GridAxisPlane = ChartObj.YZ_MINX_PLANE;
chartView1.AddChartObject(yzgrid1);

Grid yzgrid2 = new Grid(xAxis1, yAxis1, zAxis1, ChartObj.Z_AXIS, ChartObj.GRID_MAJOR);
yzgrid2.SetColor(Color.White);
yzgrid2.GridAxisPlane = ChartObj.YZ_MINX_PLANE;
chartView1.AddChartObject(yzgrid2);
Go to Top of Page

oliversleep

35 Posts

Posted - 13 Aug 2010 :  09:50:00  Show Profile  Reply with Quote
Oh

I'm sorry to ask you for this stupid response (hum, stupid question)...

I'm confused.

Thanks a lot !
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07