求解!!我想每遍历完一组输出一个图 循环有点问题 每次只能遍历完就会覆盖上一次图最后只剩下最后一组的折线图 ,求教如何让能遍历多少组数据就产生多少个折线图
<div id="container" style ="min-width:400px ,height:400px "></div>
<script>
var data ={
"CF509" : [5000,4800,4900,5100,4600,4780],
"CF506" : [5200,4500,4600,5400,4300,4680],
"CF609" : [5400,4700,4500,4800,4500,4980]
}
$(function () {
for(var temp in data)
$('#container').highcharts({
title: {
text: '对数折线图'
},
xAxis: {
tickInterval: 1
},
yAxis: {
type: 'logarithmic',
minorTickInterval: 0.1
},
tooltip: {
headerFormat: '<b>{series.name}</b><br />',
pointFormat: 'x = {point.x}, y = {point.y}'
},
series: [{
name:temp,
data: data[temp],
pointStart: 1
}]
});
});
</script>
<div id="container" style ="min-width:400px ,height:400px "></div>
<script>
var data ={
"CF509" : [5000,4800,4900,5100,4600,4780],
"CF506" : [5200,4500,4600,5400,4300,4680],
"CF609" : [5400,4700,4500,4800,4500,4980]
}
$(function () {
for(var temp in data)
$('#container').highcharts({
title: {
text: '对数折线图'
},
xAxis: {
tickInterval: 1
},
yAxis: {
type: 'logarithmic',
minorTickInterval: 0.1
},
tooltip: {
headerFormat: '<b>{series.name}</b><br />',
pointFormat: 'x = {point.x}, y = {point.y}'
},
series: [{
name:temp,
data: data[temp],
pointStart: 1
}]
});
});
</script>
解决方案 »
- Ext desktop 动态加载模块问题 !
- thickbox ie7 谷歌 无法弹出页面
- jquery data()函数怎么使用
- 请问如何控制页面,让屏幕显示页面想要呈现的部分,而不是从顶部开始?
- 为啥在firefox下显示不出效果阿
- $using 是什么意思
- 请问如何用java script把变量存如到.txt文件中去?谢谢!
- 万能的表单验证 还是存在问题 高手们 、、、
- 一个小问题,关于赋初值的问题,五十分重谢!
- 求助javascript里onmouse事件的代码
- layui 子页面修改父页面的值
- bootstrapTable中右上方的“刷新”,“切换”,“列”图标样式不一致,大小不一样
name:temp,
data: data[temp],
pointStart: 1
},{
name:temp,
data: data[temp],
pointStart: 1
},{
name:temp,
data: data[temp],
pointStart: 1
}]
series ,设置三个就ok了
<script>
var data ={
"CF509" : [5000,4800,4900,5100,4600,4780],
"CF506" : [5200,4500,4600,5400,4300,4680],
"CF609" : [5400,4700,4500,4800,4500,4980]
}
$(function () {
for(var temp in data){
var div = $('<div style="min-width:400px ,height:400px"></div>');
$('#container').append(div);
div.highcharts({
title: {
text: '对数折线图'
},
xAxis: {
tickInterval: 1
},
yAxis: {
type: 'logarithmic',
minorTickInterval: 0.1
},
tooltip: {
headerFormat: '<b>{series.name}</b><br />',
pointFormat: 'x = {point.x}, y = {point.y}'
},
series: [{
name:temp,
data: data[temp],
pointStart: 1
}]
}
});
});
</script>