##// END OF EJS Templates
QBarCategoryAxis: docs snippet added
Marek Rosa -
r1891:5326f86b27dc
parent child
Show More
@@ -35,6 +35,21 QTCOMMERCIALCHART_BEGIN_NAMESPACE
35 BarCategoryAxis can be setup to show axis line with tick marks, grid lines and shades.
35 BarCategoryAxis can be setup to show axis line with tick marks, grid lines and shades.
36 Categories are drawn between ticks. Note that you can use this also with lineseries too.
36 Categories are drawn between ticks. Note that you can use this also with lineseries too.
37 See the \l {Line and BarChart Example} {Line and BarChart Example} to learn how to do that.
37 See the \l {Line and BarChart Example} {Line and BarChart Example} to learn how to do that.
38
39 Example code on how to use QBarCategoryAxis.
40 \code
41 QChartView *chartView = new QChartView;
42 QBarSeries *series = new QBarSeries;
43 // ...
44 chartView->chart()->addSeries(series);
45 chartView->chart()->createDefaultAxes();
46
47 QBarCategoryAxis *axisX = new QBarCategoryAxis;
48 QStringList categories;
49 categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun";
50 axisX->append(categories);
51 chartView->chart()->setAxisX(series, axisX);
52 \endcode
38 */
53 */
39
54
40 /*!
55 /*!
General Comments 0
You need to be logged in to leave comments. Login now