Author |
Topic  |
|
redamx343
2 Posts |
Posted - 10 Nov 2006 : 12:05:09
|
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 some examples of what you've tried. |
 |
|
redamx343
2 Posts |
Posted - 10 Nov 2006 : 12:57:36
|
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);}
|
 |
|
quinncurtis
1164 Posts |
Posted - 10 Nov 2006 : 13:09:43
|
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.
|
 |
|
|
Topic  |
|
|
|