我是高级图表/ jquery的新手,并尝试将html和js复制到我本地驱动器上的两个文件中,看看我是否可以在我的broswer中进行渲染.
我的基本问题是如何在jfiddle中获取高图表提供的示例代码之一并让它在我的本地机器上工作?
来自highcharts.com的示例代码在jfiddle中运行:http: //jsfiddle.net/m3MVk/
$(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: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: 'Temperature (°C)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}] …Run Code Online (Sandbox Code Playgroud)