Hi Gabriel,
Yes, ChartDirector can create similar scale. In C#, the code is like:
// x-axis scale is from 125 to 8000, with some margins before 125 and after 8000,
// with no ticks and with the x-axis on top
c.xAxis().setLogScale2(125, 8000, null);
c.xAxis().setMargin(c.getPlotArea().getWidth() / 14, c.getPlotArea().getWidth() / 14);
c.xAxis().setTickLength(0, 0);
c.setXAxisOnTop();
// The top row of labels, using bold font and shifted upwards for 15 pixels
double[] topLabels = { 125, 250, 500, 1000, 2000, 4000, 8000};
for (int i = 0; i < topLabels.Length; ++i)
c.xAxis().addMark(topLabels[i], 0x000000, "<*yOffset=15*>" + topLabels[i], "Times New
Roman Bold", 10).setDrawOnTop(false);
// The bottom row of labels, using dash lines as grid lines
double[] otherLabels = {750, 1500, 3000, 6000};
for (int i = 0; i < otherLabels.Length; ++i) {
Mark m = c.xAxis().addMark(otherLabels[i], -1, "" + otherLabels[i], "Arial");
m.setDrawOnTop(false);
m.setMarkColor(c.dashLineColor(0x000000, Chart.DashLine), 0x000000);
}
Hope this can help.
Regards
Peter Kwan
|