关于asp.net chart控件的问题

weixin_41989908 2018-04-21 10:47:16

这是一个我统计后sql的结果,代码是
select count(case Score when 100 then 1 end) as [满分],
count(case when Score between 90 and 99 then 1 end) as[90-99分],
count(case when Score between 80 and 89 then 1 end) as[80-89分],
count(case when Score between 70 and 79 then 1 end) as[70-79分],
count(case when Score between 60 and 69 then 1 end) as[60-69分],
count(case when Score<60 then 1 end) as[60分以下]
from Score
UNION
select count(case xingce when 100 then 1 end) as [满分],
count(case when xingce between 90 and 99 then 1 end) as[90-99分],
count(case when xingce between 80 and 89 then 1 end) as[80-89分],
count(case when xingce between 70 and 79 then 1 end) as[70-79分],
count(case when xingce between 60 and 69 then 1 end) as[60-69分],
count(case when xingce<60 then 1 end) as[60分以下]
from Score


怎样使这么一个结果可以显示在chart控件上?
目前我所知道的好像是chart只能绑定列
...全文
875 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_41989908 2018-04-22
  • 打赏
  • 举报
回复
引用 1 楼 caozhy 的回复:
你这个适合画饼图https://yq.aliyun.com/ziliao/214
我是要画柱形图引用两个柱子啊,饼不能用啊
threenewbee 2018-04-21
  • 打赏
  • 举报
回复
你这个适合画饼图https://yq.aliyun.com/ziliao/214

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧