简体   繁体   中英

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.

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/

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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