@@ -58,7 +58,7 int main(int argc, char *argv[]) | |||||
58 | //![3] |
|
58 | //![3] | |
59 | QChart* chart = new QChart(); |
|
59 | QChart* chart = new QChart(); | |
60 | chart->addSeries(series); |
|
60 | chart->addSeries(series); | |
61 |
chart->setTitle(" |
|
61 | chart->setTitle("Percentbarchart example"); | |
62 | //![3] |
|
62 | //![3] | |
63 |
|
63 | |||
64 | //![4] |
|
64 | //![4] |
@@ -58,7 +58,7 int main(int argc, char *argv[]) | |||||
58 | //![3] |
|
58 | //![3] | |
59 | QChart* chart = new QChart(); |
|
59 | QChart* chart = new QChart(); | |
60 | chart->addSeries(series); |
|
60 | chart->addSeries(series); | |
61 |
chart->setTitle("S |
|
61 | chart->setTitle("Stackedbarchart example"); | |
62 | chart->createDefaultAxes(); |
|
62 | chart->createDefaultAxes(); | |
63 | //![3] |
|
63 | //![3] | |
64 |
|
64 |
@@ -44,6 +44,7 void DrilldownChart::changeSeries(DrilldownBarSeries *series) | |||||
44 | addSeries(series); |
|
44 | addSeries(series); | |
45 |
|
45 | |||
46 | createDefaultAxes(); |
|
46 | createDefaultAxes(); | |
|
47 | setAxisX(axis,series); | |||
47 |
|
48 | |||
48 | setTitle(series->name()); |
|
49 | setTitle(series->name()); | |
49 | } |
|
50 | } |
@@ -281,7 +281,9 QString QBarSet::label() const | |||||
281 | void QBarSet::append(const qreal value) |
|
281 | void QBarSet::append(const qreal value) | |
282 | { |
|
282 | { | |
283 | // Convert to QPointF |
|
283 | // Convert to QPointF | |
|
284 | int index = d_ptr->m_values.count(); | |||
284 | d_ptr->append(QPointF(d_ptr->m_values.count(), value)); |
|
285 | d_ptr->append(QPointF(d_ptr->m_values.count(), value)); | |
|
286 | emit valuesAdded(index,1); | |||
285 | } |
|
287 | } | |
286 |
|
288 | |||
287 | /*! |
|
289 | /*! | |
@@ -302,8 +304,7 void QBarSet::append(const QList<qreal> &values) | |||||
302 | */ |
|
304 | */ | |
303 | QBarSet& QBarSet::operator << (const qreal &value) |
|
305 | QBarSet& QBarSet::operator << (const qreal &value) | |
304 | { |
|
306 | { | |
305 |
|
|
307 | append(value); | |
306 | d_ptr->append(QPointF(d_ptr->m_values.count(), value)); |
|
|||
307 | return *this; |
|
308 | return *this; | |
308 | } |
|
309 | } | |
309 |
|
310 |
General Comments 0
You need to be logged in to leave comments.
Login now