QChart添加自定义标签坐标轴

QChart添加自定义标签坐标轴:

 m_AChart1DScatter->_pChart->removeAxis(m_AChart1DScatter->_pValueAxisH);//添加之前可以先删除原来的坐标
 QStringList categories;
 categories << QString::fromLocal8Bit("1月")<<QString::fromLocal8Bit("2月")<<QString::fromLocal8Bit("3月")<<QString::fromLocal8Bit("4月")<<QString::fromLocal8Bit("5月")<<QString::fromLocal8Bit("6月");
 QBarCategoryAxis* axisX = new QBarCategoryAxis();
 axisX->append(categories);
 chart->addAxis(axisX, Qt::AlignBottom);

你可能感兴趣的:(qt,开发语言)