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#)
 Y-axis 1k instead of 1000
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

redamx343

2 Posts

Posted - 10 Nov 2006 :  12:05:09  Show Profile  Reply with Quote
I am having trouble making my axis values use metric notation.
For example i want my y-axis value to be 1M instead of 1000000.

Thank You.

quinncurtis

1164 Posts

Posted - 10 Nov 2006 :  12:44:47  Show Profile  Reply with Quote
Show some examples of what you've tried.
Go to Top of Page

redamx343

2 Posts

Posted - 10 Nov 2006 :  12:57:36  Show Profile  Reply with Quote
it works for my first y-axis but not my second,third,....

if i were to graph a set of values on yaxis1 it will use a format like "15M"
the same values on yaxis 2 will use a format like "15000000"
i want them all to use metric notation like "15m"

Thank You

code ex.

pTransform1 = new CartesianCoordinates( ChartObj.LINEAR_SCALE, ChartObj.LINEAR_SCALE);
pTransform2 = new CartesianCoordinates( ChartObj.LINEAR_SCALE, ChartObj.LINEAR_SCALE);

SimpleDataset Dataset1 = new SimpleDataset("First", x1,y1);
SimpleDataset Dataset2 = new SimpleDataset("Second",x1,y2);

pTransform1.AutoScale(Dataset1, ChartObj.AUTOAXES_FAR, ChartObj.AUTOAXES_FAR);
pTransform2.AutoScale(Dataset2, ChartObj.AUTOAXES_FAR, ChartObj.AUTOAXES_FAR);

pTransform1.SetGraphBorderDiagonal(0.075, .1, .98, 0.75) ;
pTransform2.SetGraphBorderDiagonal(0.075, .1, .98, 0.75) ;

xAxis = new LinearAxis(pTransform1, ChartObj.X_AXIS);
xAxis.SetLineWidth(2);
chartVu.AddChartObject(xAxis);

yAxis1 = new LinearAxis(pTransform1, ChartObj.Y_AXIS);
yAxis1.SetAxisIntercept(0.0);
yAxis1.SetChartObjAttributes(attrib1);
chartVu.AddChartObject(yAxis1);

yAxis2 = new LinearAxis(pTransform2, ChartObj.Y_AXIS);
yAxis2.SetAxisTickDir(ChartObj.AXIS_MAX);
yAxis2.SetAxisIntercept(XmaxValue);
yAxis2.SetChartObjAttributes(attrib2);
chartVu.AddChartObject(yAxis2);}
Go to Top of Page

quinncurtis

1164 Posts

Posted - 10 Nov 2006 :  13:09:43  Show Profile  Reply with Quote
You only show the axes code, not the axis labels code. Your problem is in the axis labels.

You should probably be explictly setting the axis labels format property to the BUSINESSFORMAT numeric format.

yAxisLabel1.SetAxisLabelsFormat(ChartObj.BUSINESSFORMAT)

or you could use

yAxisLabel1.AxisLabelsFormat = ChartObj.BUSINESSFORMAT


Read Chapter 8 - Axis Labels, of the QCChart2D manual.
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