Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将系列动态添加到 MSCHART ChartArea。我从数据表中检索列名。系列名称需要是列名称。我可以在字符串中构建 SERIES ADD,但是然后呢?
Series Trigger_Level = chart1.Series.Add("Trigger Level");
用 C# 开发
可以使用以下代码动态添加系列:
chart1.Series["Trigger Level"].ChartArea = "ChartArea1"; chart1.Series.Points.Add(myPoint1); chart1.Series.Points.Add(myPoint2); chart1.Series.Points.Add(myPoint3); chart1.Series.Points.Add(myPoint4);