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.
我有一个使用 Chart 控件的图表,它有 4 个系列和一堆线条。
我如何将所有系列复制到第二张图表?当然,以编程方式。
我还没有尝试过,但我认为你可以这样做:
foreach (var series in sourceChart.Series) destinationChart.Series.Add(series);
我是这样做的:
foreach (Series ser in sourceChart.Series) { ser.Name += "New"; destinationChart.Series.Add(ser); }
你必须重命名系列