From 55a73b8deea2d9735de4575216c66b096d130fa6 2012-07-03 10:23:39 From: Marek Rosa Date: 2012-07-03 10:23:39 Subject: [PATCH] Updated chartthemes demo --- diff --git a/demos/chartthemes/themewidget.cpp b/demos/chartthemes/themewidget.cpp index 5c8bdc3..85763ef 100644 --- a/demos/chartthemes/themewidget.cpp +++ b/demos/chartthemes/themewidget.cpp @@ -200,6 +200,7 @@ QChart* ThemeWidget::createAreaChart() const area->setName(name + QString::number(nameIndex)); nameIndex++; chart->addSeries(area); + chart->createDefaultAxes(); lowerSeries = upperSeries; } @@ -229,6 +230,7 @@ QChart* ThemeWidget::createBarChart(int valueCount) const } chart->addSeries(series); chart->createDefaultAxes(); + chart->setAxisX(axis, series); return chart; } @@ -296,6 +298,7 @@ QChart* ThemeWidget::createSplineChart() const series->setName(name + QString::number(nameIndex)); nameIndex++; chart->addSeries(series); + chart->createDefaultAxes(); } return chart; } @@ -315,6 +318,7 @@ QChart* ThemeWidget::createScatterChart() const series->setName(name + QString::number(nameIndex)); nameIndex++; chart->addSeries(series); + chart->createDefaultAxes(); } return chart; } diff --git a/examples/barmodelmapper/tablewidget.cpp b/examples/barmodelmapper/tablewidget.cpp index 6168712..dc10e21 100644 --- a/examples/barmodelmapper/tablewidget.cpp +++ b/examples/barmodelmapper/tablewidget.cpp @@ -89,8 +89,9 @@ TableWidget::TableWidget(QWidget *parent) QStringList categories; categories << "April" << "May" << "June" << "July" << "August"; QCategoriesAxis* axis = new QCategoriesAxis(); - axis->append(categories); + axis->append(categories); chart->createDefaultAxes(); + chart->setAxisX(axis, series); //! [6] //! [7] diff --git a/src/axis/qvaluesaxis.cpp b/src/axis/qvaluesaxis.cpp index 24f656c..54eabc4 100644 --- a/src/axis/qvaluesaxis.cpp +++ b/src/axis/qvaluesaxis.cpp @@ -168,7 +168,7 @@ void QValuesAxis::setRange(qreal min, qreal max) emit rangeChanged(d->m_min,d->m_max); emit d->changed(d->m_min, d->m_max, d->m_ticksCount, d->m_niceNumbers); } - d->setRange(min,max); +// d->setRange(min,max); } /*!