手机版

jQuery简单图表peity.js使用示例

时间:2021-11-08 来源:互联网 编辑:宝哥软件园 浏览:

复制代码代码如下: html xmlns=' http://www。w3。org/1999/XHTML '标题无标题页/title脚本类型=' text/JAVAScript ' src=' http : jQuery。js /脚本脚本脚本类型=' text/JAVAScript ' src=' http : jQuery。佩蒂。js /脚本脚本类型=' text/JavaScript ' jQuery(function(){ $().条形颜色-1')。peity('bar ',{ colors :[' red ',' green ',' blue'],width: 100,height:100 }) $(' .条形颜色-2 ')。peity('bar ',{ colours:函数(值){返回值0?绿色' : '红色' },宽度: 100,高度:100 }) $('。条形颜色-3 ')。peity('bar ',{ colors 3360 function(_,I,all){ var g=parsent((I/all。长度)* 255)返回' RGB(255,' g ',0 ' },宽度: 100,高度:100 }) $(' .馅饼-颜色-1')。peity('pie ',{ colors :['青色','洋红色','黄色','黑色],直径:100 }) $(' .馅饼-颜色-2 ')。peity('pie ',{ colors 3360 function(_,I,all){ var g=parsent((I/all。长度)* 255)返回' RGB(255,' g ',0 ' },直径:100 })var updatingChart=$(').更新-图表')。peity('line ',{ width: 150,height :50 })设置间隔(function(){ var random=math。圆(数学。随机()* 10)var值=updatingChart.text().拆分(',')值。班次()值。推送(随机)updatingChart .文本(values.join(',').change() },1000)})/script/head body span class=' bar-colors-1 ' 5,3,9,6,5,9,7,3,5,2/span span class=' bar-colors-2 ' 5,3,2,-1,-3,-2,2,3,3,5,2/span span class=' bar-colors-3 ' 0,-3,-6,-4,-5,-4,-7,-3,-5,-2/span br/span class=' pie-colors-1 ' 4,7

版权声明:jQuery简单图表peity.js使用示例是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。