【发布时间】:2022-01-05 20:45:00
【问题描述】:
我需要你的建议。我想在我的图表中添加许多 ChartAreas 并将它们垂直对齐在一列中,该列将是其父级的 100% 宽度,并且在添加更多聊天区域时将变得可滚动。 目前,我使用此代码添加更多图表区域:
private void AddChartArea(int index)
{
string chartAreaName = index.ToString();
chart.ChartAreas.Add(chartAreaName);
chart.Series.Add(new Series());
chart.Series[index].ChartType = SeriesChartType.Line;
chart.Series[index].MarkerStyle = MarkerStyle.Diamond;
chart.Series[index].ChartArea = chartAreaName;
/* Trying to align chart areas vertically */
chart.ChartAreas[index].AlignWithChartArea = chart.ChartAreas[index - 1].Name;
chart.ChartAreas[index].AlignmentStyle = AreaAlignmentStyles.AxesView;
chart.ChartAreas[index].AlignmentOrientation = AreaAlignmentOrientations.Vertical;
}
【问题讨论】:
-
丽丝so ?