##// END OF EJS Templates
Make splinechart compile
Jani Honkonen -
r832:6772dd97cfaa
parent child
Show More
@@ -14,7 +14,7 SUBDIRS += \
14 #presenterchart \
14 #presenterchart \
15 scatterchart \
15 scatterchart \
16 scatterinteractions \
16 scatterinteractions \
17 #splinechart \
17 splinechart \
18 stackedbarchart \
18 stackedbarchart \
19 stackedbarchartdrilldown \
19 stackedbarchartdrilldown \
20 #tablemodelchart \
20 #tablemodelchart \
@@ -76,12 +76,12 SplineWidget::SplineWidget(QWidget *parent)
76
76
77 //! [3]
77 //! [3]
78 // create chart view
78 // create chart view
79 QChartView* chart = new QChartView;
79 QChart* chart = new QChart;
80 chart->addSeries(series);
80 chart->addSeries(series);
81 chart->addSeries(series2);
81 chart->addSeries(series2);
82 chart->addSeries(series3);
82 chart->addSeries(series3);
83
83
84 chart->setChartTitle("Spline chart example");
84 chart->setTitle("Spline chart example");
85 chart->axisX()->setMax(1500);
85 chart->axisX()->setMax(1500);
86 chart->axisY()->setMax(500);
86 chart->axisY()->setMax(500);
87
87
@@ -106,7 +106,8 SplineWidget::SplineWidget(QWidget *parent)
106 buttonsLayout->addStretch();
106 buttonsLayout->addStretch();
107
107
108 QGridLayout* mainLayout = new QGridLayout;
108 QGridLayout* mainLayout = new QGridLayout;
109 mainLayout->addWidget(chart, 1, 0);
109 QChartView *chartView = new QChartView(chart);
110 mainLayout->addWidget(chartView, 1, 0);
110 mainLayout->addLayout(buttonsLayout, 1, 1);
111 mainLayout->addLayout(buttonsLayout, 1, 1);
111 setLayout(mainLayout);
112 setLayout(mainLayout);
112 //! [5]
113 //! [5]
General Comments 0
You need to be logged in to leave comments. Login now