If you want to plot a line a line chart, you can use:
LineLayer *layer = c->addLineLayer(DoubleArray(&(yData), yData.size()), 0xff0000, "My Line");
Do not use Axis.setLabels to configure the x-axis labels. By using setXData to provide the x-coordinates, ChartDirector will automatically determine the x-axis scale and labels based on your data. The x-axis will be like the y-axis. The labels will depend on your data.
If you want to specify the x-axis scale yourself, you can use Axis.setLinearScale:
// Scale from 0 to 10, with each label incremented by 1 so that the labels are
// 0, 1, 2, 3, ...., 10.
c->xAxis()->setLinearScale(0, 10, 1);
The followings are some examples that uses setXData. You can see the labels are automatic: