图表控件中的多个图表系列 [英] Multiple Chart Series in chart control

查看:75
本文介绍了图表控件中的多个图表系列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一位使用ms图表控件作为仪表板的新手程序员,我在显示图表系列时遇到问题.

这是我的示例查询&结果

示例查询:从TABLE中选择品牌,销售,制造商"

 样本结果:品牌销售制造商第1行BrandA 10000 MfgA第2行BrandY 7000 MfgY第3行BrandZ 12000 MfgZ 

如何显示XValueMember&的BrandA?具有柱形图类型的YValueMembers作为Series1的Salesvalue(10000).

并显示BrandY&XValueMember的BrandZ;YValueMembers作为Series2的Salesvalue具有折线图类型.

我希望图表具有2个Y轴;主要Y轴&的Series1series2用于辅助Y轴.

我的问题是,如何在Series1中显示BrandA和在Series2中显示BrandY,BrandZ,其中值在同一字段中?

还是可以为图表控件设置多个数据源?

我已经为此工作了两天,但是我没有得到想要的结果.

我希望有人能帮助我.

解决方案

不知道如何使用MSChart实现该目标.

在此项目中,有一个列组合图"的示例,您可以在其中将一个品牌显示为一列(主要),将另一个品牌显示为折线(次级).

下载并查看可用于ASP.Net Webforms的列组合图示例.

I am a novice programmer using ms chart control for my dashboard, I have a problem displaying chart series.

Here is my sample query & result

Sample Query: "SELECT Brand, sales, Manufacturer From TABLE"

Sample Result:
         BRAND       SALES   MANUFACTURER
 Row 1   BrandA       10000     MfgA
 Row 2   BrandY       7000      MfgY
 Row 3   BrandZ       12000     MfgZ

How can I display BrandA for XValueMember & Salesvalue(10000) for YValueMembers as Series1 having a column chart type.

And to display BrandY & BrandZ for XValueMember ; Salesvalue for YValueMembers as Series2 having a line chart type.

I want my chart to have 2 Y-axis; Series1 for primary Y-axis & series2 for secondary Y-axis.

My problem here is how can I display BrandA in Series1 and BrandY,BrandZ in Series2 where the values are in the same field?

Or is it possible to set more than one data source for the chart control?

I've been working on this for two days but I wasn't able to get the desired result.

I hope somebody could help me.

解决方案

Dont know how to achieve that with MSChart.

In this project, has a sample of a "column combination chart" where you are able to display one brand as a column(primary) e the other as a line(secundary).

http://liberofusioncharts.codeplex.com/

Download it and take a look at Column Combination Chart sample available for ASP.Net Webforms.

这篇关于图表控件中的多个图表系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆