summaryrefslogtreecommitdiffstats
path: root/examples/scatterchart
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-08-09 14:00:04 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2013-08-09 14:01:09 +0300
commit35a909ad090b682464aaf3eb9d9f508c33c62f86 (patch)
treed192785a6d42f13343e5dd02056ac6a63cf26df3 /examples/scatterchart
parentc0bd9987bd8262a629518c744062beab17a3a9ee (diff)
Q3DScatter: Axes taken into use for lines and labels
-uniform scaling still needs labeling fix Change-Id: I29c89a260124f6abaceee6d8b5b1938ef1fa19c0 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples/scatterchart')
-rw-r--r--examples/scatterchart/scatterchart.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/examples/scatterchart/scatterchart.cpp b/examples/scatterchart/scatterchart.cpp
index 20c88e59..eeccf533 100644
--- a/examples/scatterchart/scatterchart.cpp
+++ b/examples/scatterchart/scatterchart.cpp
@@ -40,7 +40,7 @@
#include "scatterchart.h"
#include "qscatterdataproxy.h"
-#include "qcategoryaxis.h"
+#include "qvalueaxis.h"
using namespace QtDataVis3D;
@@ -70,24 +70,10 @@ void ScatterDataModifier::start()
void ScatterDataModifier::addData()
{
- QStringList rowLabels;
- rowLabels << "something -1.0" << "something -0.8" << "something -0.6" << "something -0.4"
- << "something -0.2" << "something 0.0" << "something 0.2" << "something 0.4"
- << "something 0.6" << "something 0.8" << "something 1.0";
- QStringList columnLabels;
- columnLabels << "other -1.0" << "other -0.8" << "other -0.6" << "other -0.4" << "other -0.2"
- << "other 0.0" << "other 0.2" << "other 0.4" << "other 0.6" << "other 0.8"
- << "other 1.0";
-
- // Set segment count and step
- m_chart->setSegmentCount(10, 0.1f, -1.0f);
-
// Add labels
- m_chart->rowAxis()->setTitle("Somethings");
- m_chart->columnAxis()->setTitle("Others");
- m_chart->valueAxis()->setTitle("Values");
- m_chart->rowAxis()->setCategoryLabels(columnLabels);
- m_chart->columnAxis()->setCategoryLabels(rowLabels);
+ m_chart->valueAxisX()->setTitle("Somethings");
+ m_chart->valueAxisY()->setTitle("Values");
+ m_chart->valueAxisZ()->setTitle("Others");
QScatterDataArray *dataArray = new QScatterDataArray;
dataArray->resize(numberOfItems);
@@ -154,7 +140,7 @@ void ScatterDataModifier::changeTransparency()
m_chart->setLabelTransparency((LabelTransparency)transparency);
if (++transparency > TransparencyNoBackground)
- transparency = TransparencyFromTheme;
+ transparency = TransparencyNone;
}
void ScatterDataModifier::changeFont(const QFont &font)