##// END OF EJS Templates
removed legend from wavechart and added axes to it
Marek Rosa -
r1622:ab2f3a56145e
parent child
Show More
@@ -164,7 +164,6 Rectangle {
164 //![3]
164 //![3]
165
165
166 Component.onCompleted: {
166 Component.onCompleted: {
167 // createDefaultAxes();
168 setAxisX(categoryAxis,myBarSeries)
167 setAxisX(categoryAxis,myBarSeries)
169 setAxisX(categoryAxis,lineSeries1)
168 setAxisX(categoryAxis,lineSeries1)
170 setAxisX(categoryAxis,lineSeries2)
169 setAxisX(categoryAxis,lineSeries2)
@@ -36,6 +36,8 WaveChart::WaveChart(QChart* chart, QWidget* parent) :
36 blue.setWidth(3);
36 blue.setWidth(3);
37 m_series->setPen(blue);
37 m_series->setPen(blue);
38
38
39 chart->legend()->setVisible(false);
40
39 QTime now = QTime::currentTime();
41 QTime now = QTime::currentTime();
40 qsrand((uint) now.msec());
42 qsrand((uint) now.msec());
41
43
@@ -46,6 +48,7 WaveChart::WaveChart(QChart* chart, QWidget* parent) :
46 }
48 }
47
49
48 chart->addSeries(m_series);
50 chart->addSeries(m_series);
51 chart->createDefaultAxes();
49
52
50 QObject::connect(&m_timer, SIGNAL(timeout()), this, SLOT(update()));
53 QObject::connect(&m_timer, SIGNAL(timeout()), this, SLOT(update()));
51 m_timer.setInterval(5000);
54 m_timer.setInterval(5000);
General Comments 0
You need to be logged in to leave comments. Login now