基本信息
源码名称:asp.net 使用统计图表功能源码-饼图
源码大小:2.88M
文件格式:.zip
开发语言:C#
更新时间:2014-01-25
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
推荐几个 不错的图表开源js
ichartjs:http://www.ichartjs.com/
nvd3:http://nvd3.org/
highcharts:http://www.highcharts.com/
echarts:http://ecomfe.github.io/echarts/index.html
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pie2d.aspx.cs" Inherits="Ichartjs.pie2d" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="Js/ichart.1.2.src.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script> $(function () { $.ajax({ type: "post", url: "111.datasource?method=GetObjectJsonData", contentType: "application/json;charset=utf-8", dataType: "json", success: function (data) { var chart = new iChart.Pie2D({ render: 'canvasDiv', data: data.data, title: { text: data.title, color: '#3e576f' }, footnote: { text: 'ichartjs.com', color: '#486c8f', fontsize: 11, padding: '0 38' }, sub_option: { label: { background_color: null, sign: false,//设置禁用label的小图标 padding: '0 4', border: { enable: false, color: '#666666' }, fontsize: 11, fontweight: 600, color: '#4572a7' }, border: { width: 2, color: '#ffffff' } }, shadow: true, shadow_blur: 6, shadow_color: '#aaaaaa', shadow_offsetx: 0, shadow_offsety: 0, background_color: '#fefefe', offsetx: -60,//设置向x轴负方向偏移位置60px offset_angle: -120,//逆时针偏移120度 showpercent: true, decimalsnum: 2, width: 800, height: 400, radius: 120 }); //利用自定义组件构造右侧说明文本 chart.plugin(new iChart.Custom({ drawFn: function () { //计算位置 var y = chart.get('originy'), w = chart.get('width'); //在右侧的位置,渲染说明文字 chart.target.textAlign('start') .textBaseline('middle') .textFont('600 16px Verdana') .fillText(data.fillText, w - 220, y - 40, false, '#be5985', false, 20); } })); chart.draw(); }, error: function (e) { var message = e; } }); }); </script> </head> <body> <div id='canvasDiv'></div> </body> </html>