메인화면, 서브화면, 개별보기화면, 실시간트렌드화면 차트의 범례를 변경한 셀이름으로 치환

This commit is contained in:
shark219-hub
2024-11-27 12:20:53 +09:00
parent 3781977741
commit 155e5cb93c
4 changed files with 36 additions and 22 deletions

View File

@@ -318,6 +318,13 @@ namespace vmsnet
if (cmb_tanks.SelectedIndex < 0) return;
if (System.Diagnostics.Debugger.IsAttached) Console.WriteLine($"grp selectedindex val={cmb_tanks.SelectedIndex}");
/* 작성자: 이재웅, 작성일: 2024-11-22, 내용: 차트/Scatter/Volt/Time 초기화 */
this.formsPlot1.Plot.Clear();
this.Streamer1 = new ScottPlot.Plottables.Scatter[0];
this.dataVolt = new List<float>[0];
this.dataTime = new List<double>[0];
/**********************************************************************/
//현재등록된 목록을 모두 삭제
this.ds1.channel.Clear();
this.formsPlot1.Plot.Remove<ScottPlot.Plottables.DataStreamer>(); //데이터스트림삭제
@@ -460,7 +467,8 @@ namespace vmsnet
Streamer1[idx - 1] = this.formsPlot1.Plot.Add.ScatterPoints(dataTime[idx - 1], dataVolt[idx - 1]);
Streamer1[idx - 1].LineWidth = 1;
Streamer1[idx - 1].MarkerSize = 0;
Streamer1[idx - 1].LegendText = $"CH{idx}";
/* 작성자: 이재웅, 작성일: 2024-11-27, 내용: 변경한 셀이름으로 차트범례 표시 */
Streamer1[idx - 1].LegendText = item.Text; //$"CH{idx}";
Streamer1[idx - 1].IsVisible = item.Checked;
var dr = ds1.channel.Where(t => t.idx == idx).FirstOrDefault();