-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimeSeries.cpp
More file actions
42 lines (34 loc) · 1.06 KB
/
TimeSeries.cpp
File metadata and controls
42 lines (34 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* File: TimeSeries.cpp
* Author: heshan
*
* Created on April 1, 2018, 11:25 PM
*/
#include "TimeSeries.h"
#include <wx/sizer.h>
#include <iostream>
TimeSeries::TimeSeries() { }
wxLineChartData TimeSeries::load(wxVector<wxString> labels,std::string series1Name, wxVector<wxDouble> points1, std::string series2Name, wxVector<wxDouble> points2) {
wxLineChartData chartData(labels);
wxLineChartDataset * chart;
chart = new wxLineChartDataset(
series1Name,
wxColor(40, 153, 193),
wxColor(255, 255, 255),
wxColor(40, 153, 193, 0x11),
points1);
chart->ShowDots(false);
wxLineChartDataset::ptr dataset1(chart);
chartData.AddDataset(dataset1);
wxLineChartDataset * chart2;
chart2 = new wxLineChartDataset(
series2Name,
wxColor(253, 56, 50),
wxColor(255, 255, 255),
wxColor(253, 56, 50, 0x11),
points2);
chart2->ShowDots(false);
wxLineChartDataset::ptr dataset2(chart2);
chartData.AddDataset(dataset2);
return chartData;
}