JQueryHighcharts动态生成图表的方法_jquery
代码如下:
$(function () {
$(document)。ready(function() {
Highcharts。setOptions({
global: {
useUTC: false
}
});
var chart;
$('#container')。
highcharts({
chart: {
type: 'spline',
animation: Highcharts。svg, // don't animate in old IE
marginRight: 10,
events: {
load: function() {
// set up the updating of the chart each second
var series = this。
series[0];
setInterval(function() {
var x = (new Date())。getTime(), // current time
y = Math。
random();
series。addPoint([x, y], true, true);
}, 1000);
}
}
},
title: {
text: 'Live random data'
},
xAxis: {
type: 'datetime',
tickPixelInterval: 150
},
yAxis: {
title: {
text: 'Value'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function() {
return ''+ this。
series。name +'
'+
Highcharts。dateFormat('%Y-%m-%d %H:%M:%S', this。x) +'
'+
Highcharts。
numberFormat(this。y, 2);
}
},
legend: {
enabled: false
},
exporting: {
enabled: false
},
series: [{
name: 'Random data',
data: (function() {
// generate an array of random data
var data = [],
time = (new Date())。
getTime(),
i;
for (i = -19; i。
答:只要选中要生成的数据,点插入/图表,在标准类型窗口中选择你要以饼型显示就可以,这样就可以按你早已输入好的数据显示。详情>>
答:详情>>
答:7、易操作性对计算机网络用户而言,掌握网络使用技术比掌握大型机使用技术简单,实用性也很强详情>>
答:目前只能用手机做猫让电脑上网,除非你的手机支持WIFI,可以通过无线路由器高速上网。详情>>