我需要使用prototype.js来进行Web服务调用,然后使用highchart.js来绘制图表。 我正在使用prototype-adapter.js,但仍然出现错误,如果我尝试使用在一起(高图和原型)。 我创建了一个的jsfiddleHighchart with Prototype
$(function() {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line',
marginRight: 130,
marginBottom: 25
},
title: {
text: 'Monthly Average Temperature',
x: -20 //center
},
subtitle: {
text: 'Source: WorldClimate.com',
x: -20
},
xAxis: {
categories: ['09/10', '09/11', '09/12', '09/13', '09/14']
},
yAxis: {
title: {
text: 'Temperature (°C)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function() {
return '<b>' + this.series.name + '</b><br/>' + this.x + ': ' + this.y + '°C';
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [{
name: 'ABCD',
data: [648.47, 636.43, 643.97, 640.92]
}, {
name: 'ABCD1',
data: [899.46, 882.80, 893.29, 889.07]
}, {
name: 'ABCD2',
data: [1359.06, 1328.04, 1349.74, 1342.52]
}]
});
});
});
如果我删除的prototype.js ANS原型adapter.js然后绘制图表很好,但如果我有他们的图表不起作用。 我需要prototype.js来进行Web服务调用。
请帮忙。
三江源
嘿体我得到了同样的错误....我花了3个月,仍然没有得到答案 – 2014-04-29 14:54:28