Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RingArray<PerformanceInfo>[] ring = new
RingArray<PerformanceInfo>[3]; ////RingArray型の配列を三個用意
EnumerableDataSource<PerformanceInfo>[] ds = new
EnumerableDataSource<PerformanceInfo>[3]; ////加算するデータソース型の配列を三個宣言
LineGraph[] chart = new LineGraph[3];
public OLineChart(ChartPlotter cp, int num) {
this.cp = cp;  //こっちでのcpに代入
lineColor[0] = Colors.Red;
lineColor[1] = Colors.Blue;
lineColor[2] = Colors.Green;
for (int i = 0; i < num; i++) {
ring[i] = new RingArray<PerformanceInfo>(200);
//200のリングの長さ  一個ずつ設定
ds[i] = new
EnumerableDataSource<PerformanceInfo>(ring[i]); /// ring[0]はds[0]、他も同様
ds[i].SetXMapping(pi => pi.Time);
ds[i].SetYMapping(pi => pi.Value);
chart[i] = cp.AddLineGraph(ds[i], lineColor[i], 1.0);
cp.LegendVisible = false;
public void add(int id, int x, int y) {
ring[id].Add(new PerformanceInfo(x, y));
chart[id].DataSource = null;
chart[id].DataSource = ds[id];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.