|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -34,20 +34,29 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
34 | 34 | This class can be used when the underlying data needs to be given extra meaning. |
|
35 | 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 |
|
|
38 |
\ |
|
|
39 | QChartView *chartView = new QChartView; | |
|
40 | QLineSeries *series = new QLineSeries; | |
|
41 | // ... | |
|
42 | chartView->chart()->addSeries(series); | |
|
43 | ||
|
44 | QCategoryAxis *axisX = new QCategoryAxis; | |
|
45 | axisX->setStartValue(15); | |
|
46 | axisX->append("First", 20); | |
|
47 | axisX->append("Second", 37); | |
|
48 | axisX->append("Third", 52); | |
|
49 | chartView->chart()->setAxisX(axisX, series); | |
|
50 | \endcode | |
|
37 | Example code on how to use QCategoryAxis: | |
|
38 | \table | |
|
39 | \row | |
|
40 | \o \br | |
|
41 | \br | |
|
42 | \code | |
|
43 | QChartView *chartView = new QChartView; | |
|
44 | QLineSeries *series = new QLineSeries; | |
|
45 | // ... | |
|
46 | chartView->chart()->addSeries(series); | |
|
47 | ||
|
48 | QCategoryAxis *axisY = new QCategoryAxis; | |
|
49 | axisY->setMin(0); | |
|
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 | 62 | \qmlclass CategoryAxis QCategoryAxis |
General Comments 0
You need to be logged in to leave comments.
Login now