@@ -10,7 +10,7 | |||
|
10 | 10 | \list |
|
11 | 11 | \o area |
|
12 | 12 |
\o line |
|
13 | \o bar | |
|
13 | \o grouped bar | |
|
14 | 14 |
\o percent bar |
|
15 | 15 | \o pie |
|
16 | 16 | \o scatter |
@@ -25,62 +25,72 | |||
|
25 | 25 | series->add(0, 6); |
|
26 | 26 | series->add(2, 4); |
|
27 | 27 | ... |
|
28 | chart->addSeries(series); | |
|
28 | chartView->chart()->addSeries(series); | |
|
29 | 29 | \endcode |
|
30 | 30 | |
|
31 | 31 | \raw HTML |
|
32 | 32 | <table cellpadding="2" cellspacing="1" border="0" width="100%" class="indextable"> |
|
33 | 33 | <tr> |
|
34 |
<th class="titleheader" width=" |
|
|
35 | List of classes | |
|
34 | <th class="titleheader" width="25%"> | |
|
35 | Common | |
|
36 | </th> | |
|
37 | <th class="titleheader" width="25%"> | |
|
38 | XY type | |
|
39 | </th> | |
|
40 | <th class="titleheader" width="25%"> | |
|
41 | Pie type | |
|
42 | </th> | |
|
43 | <th class="titleheader" width="25%"> | |
|
44 | Bar type | |
|
45 | </th> | |
|
46 | <th class="titleheader" width="25%"> | |
|
47 | Other files | |
|
36 | 48 | </th> |
|
37 | 49 | </tr> |
|
38 | 50 | <tr> |
|
39 | 51 | <td valign="top"> |
|
40 | 52 | <ul> |
|
41 | <li><a href="qareaseries.html">QAreaSeries</a></li> | |
|
42 | <li><a href="qbarseries.html">QBarSeries</a></li> | |
|
43 | <li><a href="qbarset.html">QBarSet</a></li> | |
|
44 | 53 | <li><a href="qchart.html">QChart</a></li> |
|
45 | 54 | <li><a href="qaxis.html">QAxis</a></li> |
|
55 | <li><a href="qaxiscategories.html">QAxisCategories</a></li> | |
|
46 | 56 | <li><a href="qchartview.html">QChartView</a></li> |
|
57 | <li><a href="qlegend.html">QLegend</a></li> | |
|
58 | <li><a href="qabstractseries.html">QAbstractSeries</a></li> | |
|
59 | <li><a href="qchartglobal.html">QChartGlobal</a></li> | |
|
60 | </ul> | |
|
61 | </td> | |
|
62 | <td valign="top"> | |
|
63 | <ul> | |
|
47 | 64 | <li><a href="qlineseries.html">QLineSeries</a></li> |
|
48 |
<li><a href="q |
|
|
49 | <li><a href="qpieseries.html">QPieSeries</a></li> | |
|
50 | <li><a href="qpieslice.html">QPieSlice</a></li> | |
|
65 | <li><a href="qareaseries.html">QAreaSeries</a></li> | |
|
51 | 66 | <li><a href="qscatterseries.html">QScatterSeries</a></li> |
|
52 | <li><a href="qabstractseries.html">QAbstractSeries</a></li> | |
|
53 | 67 | <li><a href="qsplineseries.html">QSplineSeries</a></li> |
|
54 |
<li><a href="q |
|
|
55 |
<li><a href="q |
|
|
56 |
<li><a href="q |
|
|
57 | <li><a href="qpiemodelmapper.html">QPieModelMapper</a></li> | |
|
68 | <li><a href="qxymodelmapper.html">QXYModelMapper</a></li> | |
|
69 | <li><a href="qhxymodelmapper.html">QHXYModelMapper</a></li> | |
|
70 | <li><a href="qvxymodelmapper.html">QVXYModelMapper</a></li> | |
|
71 | </ul> | |
|
72 | </td> | |
|
73 | <td valign="top"> | |
|
58 | 74 |
|
|
75 | <li><a href="qpieseries.html">QPieSeries</a></li> | |
|
76 | <li><a href="qpieslice.html">QPieSlice</a></li> | |
|
77 | <li><a href="qpiemodelmapper.html">QPieModelMapper</a></li> | |
|
59 | 78 |
|
|
60 | 79 |
|
|
61 | 80 | </ul> |
|
62 | <li><a href="qbarmodelmapper.html">QBarModelMapper</a></li> | |
|
81 | </td> | |
|
82 | <td valign="top"> | |
|
63 | 83 |
|
|
84 | <li><a href="qbarseries.html">QBarSeries</a></li> | |
|
85 | <li><a href="qbarset.html">QBarSet</a></li> | |
|
86 | <li><a href="qgroupedbarseries.html">QGroupedBarSeries</a></li> | |
|
87 | <li><a href="qpercentbarseries.html">QPercentBarSeries</a></li> | |
|
88 | <li><a href="qstackedbarseries.html">QStackedBarSeries</a></li> | |
|
89 | <li><a href="qbarmodelmapper.html">QBarModelMapper</a></li> | |
|
64 | 90 |
|
|
65 | 91 |
|
|
66 | 92 |
|
|
67 | <li><a href="qxymodelmapper.html">QXYModelMapper</a></li> | |
|
68 | <ul> | |
|
69 | <li><a href="qhxymodelmapper.html">QHXYModelMapper</a></li> | |
|
70 | <li><a href="qvxymodelmapper.html">QVXYModelMapper</a></li> | |
|
71 | </ul> | |
|
72 | </ul> | |
|
73 | 93 | </td> |
|
74 | </tr> | |
|
75 | </table> | |
|
76 | ||
|
77 | <table cellpadding="2" cellspacing="1" border="0" width="100%" class="indextable"> | |
|
78 | <tr> | |
|
79 | <th class="titleheader" width="33%"> | |
|
80 | Other files: | |
|
81 | </th> | |
|
82 | </tr> | |
|
83 | <tr> | |
|
84 | 94 | <td valign="top"> |
|
85 | 95 | <ul> |
|
86 | 96 | <li><a href="qchartglobal.html">QChartGlobal</a></li> |
@@ -30,7 +30,7 CustomTableModel::CustomTableModel(QObject *parent) : | |||
|
30 | 30 | qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); |
|
31 | 31 | |
|
32 | 32 | m_columnCount = 7; |
|
33 |
m_rowCount = |
|
|
33 | m_rowCount = 10; | |
|
34 | 34 | |
|
35 | 35 | m_labels.append("Apples"); |
|
36 | 36 | m_labels.append("Oranges"); |
@@ -251,6 +251,14 void TableWidget::updateChartType(bool toggle) | |||
|
251 | 251 | // m_mapper->setFirst(3); |
|
252 | 252 | // m_mapper->setCount(4); |
|
253 | 253 | |
|
254 | QAxisCategories* xCategories = m_chart->axisX()->categories(); | |
|
255 | xCategories->insert(50, "Jeden"); | |
|
256 | xCategories->insert(100, "Dwa"); | |
|
257 | xCategories->insert(150, "Trzy"); | |
|
258 | xCategories->insert(200, "Cztery"); | |
|
259 | xCategories->insert(250, "Piec"); | |
|
260 | xCategories->insert(300, "szesc"); | |
|
261 | ||
|
254 | 262 | m_mapper = new QVXYModelMapper; |
|
255 | 263 | m_mapper->setModel(m_model); |
|
256 | 264 | m_mapper->setSeries(m_series); |
@@ -483,6 +491,19 void TableWidget::updateChartType(bool toggle) | |||
|
483 | 491 | |
|
484 | 492 | m_barSeries = new QGroupedBarSeries(); |
|
485 | 493 | |
|
494 | // QAxisCategories* xCategories = m_chart->axisX()->categories(); | |
|
495 | // xCategories->insert(0, "Jeden"); | |
|
496 | // xCategories->insert(1, "Dwa"); | |
|
497 | // xCategories->insert(2, "Trzy"); | |
|
498 | // xCategories->insert(3, "Cztery"); | |
|
499 | // xCategories->insert(4, "Piec"); | |
|
500 | // xCategories->insert(5, "szesc"); | |
|
501 | ||
|
502 | QStringList categories; | |
|
503 | categories << "June" << "July" << "August" << "September" << "October" << "November"; | |
|
504 | ||
|
505 | m_chart->axisX()->categories()->insert(categories); | |
|
506 | ||
|
486 | 507 | int first = 3; |
|
487 | 508 | int count = 6; |
|
488 | 509 | m_barMapper = new QVBarModelMapper; |
@@ -495,10 +516,10 void TableWidget::updateChartType(bool toggle) | |||
|
495 | 516 | // barSeries->setModelMapper(mapper); |
|
496 | 517 | m_chart->addSeries(m_barSeries); |
|
497 | 518 | |
|
498 | QStringList categories; | |
|
499 | categories << "June" << "July" << "August" << "September" << "October" << "November"; | |
|
519 | // QStringList categories; | |
|
520 | // categories << "June" << "July" << "August" << "September" << "October" << "November"; | |
|
500 | 521 | |
|
501 | m_chart->axisX()->categories()->insert(categories); | |
|
522 | // m_chart->axisX()->categories()->insert(categories); | |
|
502 | 523 | |
|
503 | 524 | QList<QBarSet*> barsets = m_barSeries->barSets(); |
|
504 | 525 | for (int i = 0; i < barsets.count(); i++) { |
General Comments 0
You need to be logged in to leave comments.
Login now