windows 如何在 Y 轴上绘制多个列?(MS 图表控件)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4231547/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:38:18  来源:igfitidea点击:

How do I graph multiple columns on the Y-axis? (MS Chart Controls)

c#asp.netwindowsmicrosoft-chart-controls

提问by Greg McNulty

Trying to follow this example:
http://weblogs.asp.net/dwahlin/archive/2008/11/25/getting-started-with-the-asp-net-3-5-chart-control.aspx

尝试遵循此示例:http:
//weblogs.asp.net/dwahlin/archive/2008/11/25/getting-started-with-the-asp-net-3-5-chart-control.aspx

I have a database with 4 columns, 3 of the columns are int (1-10) and the other is a "DateTime". I am trying to graph the 3 columns vs the DateTime(X-axis) on one line chart.

我有一个有 4 列的数据库,其中 3 列是 int (1-10),另一个是“DateTime”。我试图在一个折线图上绘制 3 列与日期时间(X 轴)的关系图。

To add more than one y axis value I go to the Series property -> YValueMembers (notice the plural) and enter my 3 columns of the database (followed by commas) that I want on the Y axis.....but doesn't seem to work.

要添加多个 y 轴值,我转到 Series 属性 -> YValueMembers(注意复数)并在 Y 轴上输入我想要的数据库的 3 列(后跟逗号).....但没有'似乎工作。

I get a run time error saying only 1 column is allowed on the Y axis.

我收到一个运行时错误,说 Y 轴上只允许有 1 列。

Data points insertion error. Only 1 Y values can be set for this data series.

数据点插入错误。此数据系列只能设置 1 个 Y 值。

How do I get all 3 columns vs the 4th column on one line chart?

如何在一个折线图上获得所有 3 列与第 4 列?

Thanks!

谢谢!

采纳答案by Greg McNulty

Got it:

知道了:

Properties (of the chart) -> Series (click on ellipse) -> Add a new series for each element on the Y-axis, using the same X-axis.

属性(图表的)-> 系列(单击椭圆)-> 使用相同的 X 轴为 Y 轴上的每个元素添加一个新系列。