简体   繁体   English

ASP:图表-控制如何在单个列中呈现两组数据

[英]ASP:chart - control how to render two set of data in a single column

I have been trying to re-create a graph that our company has that used a no longer supported and outdated charting package. 我一直在尝试重新创建我们公司使用的图形,该图形使用了不再受支持的过时图表包。 I am trying to utilise the chart control from .net 4.0 and have everything working except for having the one column on the graph to represent two datasets. 我正在尝试利用.net 4.0中的图表控件,并使所有工作正常,除了图表上的一列代表两个数据集。

the column shows a margin amount and then if there is subsidy ontop of that it is then added to the top of the column bar in a different color. 该列显示保证金金额,然后在该金额之上提供补贴,然后以另一种颜色将其添加到列栏的顶部。 can this be done with this chart control or is it a limitation? 可以通过此图表控件完成此操作还是有限制?

Here is the example of what is needed: http://imageshack.us/photo/my-images/69/examplekv.jpg/ 以下是所需示例: http : //imageshack.us/photo/my-images/69/examplekv.jpg/

After a lot of looking around and a lot of tutorials that didn't show what I was wanting I took a break and found that I had been blind. 经过四处张望和许多教程,这些教程没有显示出我想要的内容,我休息了一下,发现自己是盲人。

the ChartType field for each Series has an option in it called Stacked column and the two Series's I wanted stacked just need to be in the correct order to stack in the same column. 每个系列的ChartType字段中都有一个称为Stacked column的选项,而我想要堆叠的两个Series只需以正确的顺序堆叠在同一列中。

the order is reversed in the coding to the order youi want them in the graph. 该顺序在编码中与您希望它们在图中的顺序相反。 so for me I needed to have margin Series first followed by the subsidy series. 所以对我来说,我需要先拥有保证金系列,然后是补贴系列。 this renders with the margin being the first lower portion of the column and the subsidy being the second top portion. 这使得边距是该列的第一下部,补贴是第二顶部。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM