private async void ReloadChart_influx(object Chartdata) { ChartData chart = (ChartData)Chartdata; chart.set.Clear(); chart.cur.Clear(); chart.onff.Clear(); chart.Rectangles.Clear(); chart.onfftime = 0; InfluxDBClient client = head.getClient(); var tables = await DB_influx.ExcuteInflux(client, DB_influx.GetQuery(chart.searches)); if (tables.Count == 0) { MessageBox.Show("데이터를 찾을 수 없습니다."); return; } ChartDataInput(ref chart, tables); int index = Vms.IndexOf(chart); Vms.Remove(chart); chart.ReFresh(); Vms.Insert(index, chart); }
// CHART 생성 함수 private async void CreateChart_influx(object Searchdata) { SearchData data = (SearchData)Searchdata; var chart = new ChartData(head.val); InfluxDBClient client = head.getClient(); //var tables = await DB_influx.ExcuteInflux(client, DB_influx.GetQuery_Group(data)); var tables = await DB_influx.ExcuteInflux(client, DB_influx.GetQuery(data)); if (tables.Count == 0) { MessageBox.Show($"[ROOM:{data.ROOM_ID}] 데이터를 찾을 수 없습니다."); return; } Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate { Vms.Add(chart); ChartDataInput(ref chart, tables); chart.searches = new SearchData(data); chart.Drawing(); })); }