简体   繁体   English

如何在Asp.Net MVC中的按钮内创建饼图?

[英]How to create Pie charts inside buttons in Asp.Net MVC?

For my internship I'm currently developing a monitoring tool and my boss would like me to display multiple clickable pie charts on the home screen. 对于实习,我目前正在开发一种监视工具,而我的老板希望我在主屏幕上显示多个可点击的饼图。

I'm trying to find a rather simple solution as I'm not exactly proficient in MVC. 我试图找到一种相当简单的解决方案,因为我并不完全精通MVC。

Is it possible to include them inside buttons, do I need to create multiple partial views per pie chart or is there any other better ways to proceed? 是否可以将它们包含在按钮中?是否需要为每个饼图创建多个局部视图?是否还有其他更好的方法可以进行?

Thanks. 谢谢。

You can use MS Chart Controls to create any type of charts. 您可以使用MS图表控件创建任何类型的图表。 It will return you a chart in form of an image. 它将以图像形式返回图表。

You can easily write a click event for image as shown below: 您可以轻松为图片编写click事件,如下所示:

<img id="chartCustmor" alt="Chart" onclick="CallJavaScriptFuncitonHere()" />

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

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