@@ -129,7 +129,7 DataTable ThemeWidget::generateRandomData(int listCount,int valueMax,int valueCo | |||||
129 | yValue = yValue + (qreal) (qrand() % valueMax) / (qreal) valueCount; |
|
129 | yValue = yValue + (qreal) (qrand() % valueMax) / (qreal) valueCount; | |
130 | QPointF value((j + (qreal) rand() / (qreal) RAND_MAX) * ((qreal) m_valueMax / (qreal) valueCount), |
|
130 | QPointF value((j + (qreal) rand() / (qreal) RAND_MAX) * ((qreal) m_valueMax / (qreal) valueCount), | |
131 | yValue); |
|
131 | yValue); | |
132 |
QString label = " |
|
132 | QString label = "Slice " + QString::number(i) + ":" + QString::number(j); | |
133 | dataList << Data(value, label); |
|
133 | dataList << Data(value, label); | |
134 | } |
|
134 | } | |
135 | dataTable << dataList; |
|
135 | dataTable << dataList; | |
@@ -219,7 +219,7 QChart* ThemeWidget::createBarChart(int valueCount) const | |||||
219 | // QPercentBarSeries* series = new QPercentBarSeries(categories, chart); |
|
219 | // QPercentBarSeries* series = new QPercentBarSeries(categories, chart); | |
220 | QStackedBarSeries* series = new QStackedBarSeries(categories, chart); |
|
220 | QStackedBarSeries* series = new QStackedBarSeries(categories, chart); | |
221 | for (int i(0); i < m_dataTable.count(); i++) { |
|
221 | for (int i(0); i < m_dataTable.count(); i++) { | |
222 |
QBarSet *set = new QBarSet(" |
|
222 | QBarSet *set = new QBarSet("Bar set " + QString::number(i)); | |
223 | foreach (Data data, m_dataTable[i]) |
|
223 | foreach (Data data, m_dataTable[i]) | |
224 | *set << data.first.y(); |
|
224 | *set << data.first.y(); | |
225 | series->appendBarSet(set); |
|
225 | series->appendBarSet(set); |
General Comments 0
You need to be logged in to leave comments.
Login now