1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
@@ -34,20 +34,29 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
34 | This class can be used when the underlying data needs to be given extra meaning. |
|
34 | This class can be used when the underlying data needs to be given extra meaning. | |
35 | Unlike with the QBarCategoryAxis the QCategoryAxis allows the categories ranges widths to be specified freely. |
|
35 | Unlike with the QBarCategoryAxis the QCategoryAxis allows the categories ranges widths to be specified freely. | |
36 |
|
36 | |||
37 |
Example code on how to use QCategoryAxis |
|
37 | Example code on how to use QCategoryAxis: | |
38 |
\ |
|
38 | \table | |
39 | QChartView *chartView = new QChartView; |
|
39 | \row | |
40 | QLineSeries *series = new QLineSeries; |
|
40 | \o \br | |
41 | // ... |
|
41 | \br | |
42 | chartView->chart()->addSeries(series); |
|
42 | \code | |
43 |
|
43 | QChartView *chartView = new QChartView; | ||
44 | QCategoryAxis *axisX = new QCategoryAxis; |
|
44 | QLineSeries *series = new QLineSeries; | |
45 | axisX->setStartValue(15); |
|
45 | // ... | |
46 | axisX->append("First", 20); |
|
46 | chartView->chart()->addSeries(series); | |
47 | axisX->append("Second", 37); |
|
47 | ||
48 | axisX->append("Third", 52); |
|
48 | QCategoryAxis *axisY = new QCategoryAxis; | |
49 | chartView->chart()->setAxisX(axisX, series); |
|
49 | axisY->setMin(0); | |
50 | \endcode |
|
50 | axisY->setMax(52); | |
|
51 | axisY->setStartValue(15); | |||
|
52 | axisY->append("First", 20); | |||
|
53 | axisY->append("Second", 37); | |||
|
54 | axisY->append("Third", 52); | |||
|
55 | chartView->chart()->setAxisY(axisY, series); | |||
|
56 | \endcode | |||
|
57 | \o \br | |||
|
58 | \inlineimage api_category_axis.png | |||
|
59 | \endtable | |||
51 | */ |
|
60 | */ | |
52 | /*! |
|
61 | /*! | |
53 | \qmlclass CategoryAxis QCategoryAxis |
|
62 | \qmlclass CategoryAxis QCategoryAxis |
General Comments 0
You need to be logged in to leave comments.
Login now