为 SharePoint 2010 Webpart 创建图表 [英] Create a chart for SharePoint 2010 Webpart
问题描述
我已经创建了从我的 webpart 到 Oracle 数据库的连接,其中包含日期和数字.
I've created a connection from my webpart to an Oracle database, that contains dates and numbers.
我想在图表中显示这些数据.
I want to display this data in a chart.
我已经在互联网上寻找任何示例,但我很难过.
I've looked on the internet for any examples, but I'm stumped.
谁能给我一些简单的说明,详细说明如何用 c 语言创建一个可以在 webpart 上工作的图表??
Can anyone point me to some simple instructions that detail how to create a chart in c sharp that will work on a webpart, please??
干杯
推荐答案
Webpart 基本上以普通的 html、css 和 JavaScript 结尾.所以你可以使用任何 js 库来创建图表.(例如:Chart.js
basically the Webpart end in normal html,css and JavaScript. So you could use any js library to create the Chart. (For example: Chart.js
您可以覆盖 RenderWebPart() 方法,以生成自定义 HTML.通过这种方式,您可以创建元素和一个包含 var data = {} 的自定义元素,可以使用 charts.js 进行绘图
You can override the RenderWebPart() Method, to generate custom HTML. This way you can create the element and a custom element that contains var data = {} that can be plottet with charts.js
问候
这篇关于为 SharePoint 2010 Webpart 创建图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!