##// END OF EJS Templates
Fix the warning in chartviewer
Marek Rosa -
r2213:245df962f0c3
parent child
Show More
@@ -40,13 +40,15 public:
40 datetimeaxis->setTickCount(10);
40 datetimeaxis->setTickCount(10);
41 datetimeaxis->setFormat("yyyy");
41 datetimeaxis->setFormat("yyyy");
42
42
43 qreal day = 1000l * 60l * 60l * 24l;
44
43 QString name("Series ");
45 QString name("Series ");
44 int nameIndex = 0;
46 int nameIndex = 0;
45 foreach (DataList list, table) {
47 foreach (DataList list, table) {
46 QLineSeries *series = new QLineSeries(chart);
48 QLineSeries *series = new QLineSeries(chart);
47 foreach (Data data, list) {
49 foreach (Data data, list) {
48 QPointF point = data.first;
50 QPointF point = data.first;
49 series->append(1000l * 60l * 60l * 24l * 365l * 30l + point.x() * 1000l * 60l * 60l * 24l * 365l, point.y());
51 series->append(day * 365l * 30l + point.x() * day * 365l, point.y());
50 }
52 }
51 series->setName(name + QString::number(nameIndex));
53 series->setName(name + QString::number(nameIndex));
52 nameIndex++;
54 nameIndex++;
@@ -40,13 +40,15 public:
40 datetimeaxis->setTickCount(10);
40 datetimeaxis->setTickCount(10);
41 datetimeaxis->setFormat("yyyy");
41 datetimeaxis->setFormat("yyyy");
42
42
43 qreal day = 1000l * 60l * 60l * 24l;
44
43 QString name("Series ");
45 QString name("Series ");
44 int nameIndex = 0;
46 int nameIndex = 0;
45 foreach (DataList list, table) {
47 foreach (DataList list, table) {
46 QLineSeries *series = new QLineSeries(chart);
48 QLineSeries *series = new QLineSeries(chart);
47 foreach (Data data, list) {
49 foreach (Data data, list) {
48 QPointF point = data.first;
50 QPointF point = data.first;
49 series->append(point.x(), 1000l * 60l * 60l * 24l * 365l * 30l + point.y() * 1000l * 60l * 60l * 24l * 365l);
51 series->append(point.x(), day * 365l * 30l + point.y() * day * 365l);
50 }
52 }
51 series->setName(name + QString::number(nameIndex));
53 series->setName(name + QString::number(nameIndex));
52 nameIndex++;
54 nameIndex++;
General Comments 0
You need to be logged in to leave comments. Login now