##// END OF EJS Templates
Fix/hide legend in some examples and demos
Jani Honkonen -
r1400:45c4e29a5671
parent child
Show More
@@ -31,6 +31,7 int main(int argc, char *argv[])
31 QMainWindow window;
31 QMainWindow window;
32 Chart *chart = new Chart;
32 Chart *chart = new Chart;
33 chart->setTitle("Dynamic spline chart");
33 chart->setTitle("Dynamic spline chart");
34 chart->legend()->hide();
34 chart->setAnimationOptions(QChart::AllAnimations);
35 chart->setAnimationOptions(QChart::AllAnimations);
35 QChartView chartView(chart);
36 QChartView chartView(chart);
36 chartView.setRenderHint(QPainter::Antialiasing);
37 chartView.setRenderHint(QPainter::Antialiasing);
@@ -31,9 +31,9 int main(int argc, char *argv[])
31
31
32 //![1]
32 //![1]
33 QLineSeries* series = new QLineSeries();
33 QLineSeries* series = new QLineSeries();
34 series->setName("line");
35 *series << QPointF(0, 6) << QPointF(2, 4) << QPointF(3, 8) << QPointF(7, 4) << QPointF(10,5);
34 *series << QPointF(0, 6) << QPointF(2, 4) << QPointF(3, 8) << QPointF(7, 4) << QPointF(10,5);
36 QChart* chart = new QChart();
35 QChart* chart = new QChart();
36 chart->legend()->hide();
37 chart->addSeries(series);
37 chart->addSeries(series);
38 //![1]
38 //![1]
39
39
@@ -31,7 +31,6 int main(int argc, char *argv[])
31
31
32 //![1]
32 //![1]
33 QLineSeries* series = new QLineSeries();
33 QLineSeries* series = new QLineSeries();
34 series->setName("line");
35 //![1]
34 //![1]
36
35
37 //![2]
36 //![2]
@@ -45,6 +44,7 int main(int argc, char *argv[])
45
44
46 //![3]
45 //![3]
47 QChart* chart = new QChart();
46 QChart* chart = new QChart();
47 chart->legend()->hide();
48 chart->addSeries(series);
48 chart->addSeries(series);
49 chart->setTitle("Simple line chart example");
49 chart->setTitle("Simple line chart example");
50 //![3]
50 //![3]
@@ -55,6 +55,7 TableWidget::TableWidget(QWidget *parent)
55 // series 1
55 // series 1
56 //! [4]
56 //! [4]
57 QLineSeries *series = new QLineSeries;
57 QLineSeries *series = new QLineSeries;
58 series->setName("Line 1");
58 QVXYModelMapper *mapper = new QVXYModelMapper(this);
59 QVXYModelMapper *mapper = new QVXYModelMapper(this);
59 mapper->setXColumn(0);
60 mapper->setXColumn(0);
60 mapper->setYColumn(1);
61 mapper->setYColumn(1);
@@ -76,6 +77,7 TableWidget::TableWidget(QWidget *parent)
76 // series 2
77 // series 2
77 //! [6]
78 //! [6]
78 series = new QLineSeries;
79 series = new QLineSeries;
80 series->setName("Line 2");
79
81
80 mapper = new QVXYModelMapper(this);
82 mapper = new QVXYModelMapper(this);
81 mapper->setXColumn(2);
83 mapper->setXColumn(2);
@@ -45,6 +45,7 int main(int argc, char *argv[])
45
45
46 //![3]
46 //![3]
47 QChart* chart = new QChart();
47 QChart* chart = new QChart();
48 chart->legend()->hide();
48 chart->addSeries(series);
49 chart->addSeries(series);
49 chart->setTitle("Simple spline chart example");
50 chart->setTitle("Simple spline chart example");
50 chart->axisY()->setRange(0, 10);
51 chart->axisY()->setRange(0, 10);
General Comments 0
You need to be logged in to leave comments. Login now