Skip to content

Commit c883a0f

Browse files
committed
highcharts
1 parent 2359326 commit c883a0f

File tree

6 files changed

+350
-3
lines changed

6 files changed

+350
-3
lines changed

public/js/index.js

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,50 @@ define(function(require){
1515
,format : 'YYYY-MM-DD'
1616
});
1717
}
18-
18+
if(document.getElementById('charts')){
19+
require('./lib/highcharts');
20+
$('#charts').highcharts({
21+
chart: {
22+
},
23+
title: {
24+
text: '一月提问走势'
25+
},
26+
xAxis: {
27+
categories: ['Apples', 'Oranges', 'Pears', 'Bananas', 'Plums']
28+
},
29+
tooltip: {
30+
formatter: function() {
31+
var s;
32+
s = ''+this.x +':信息 '+ this.y;
33+
return s;
34+
}
35+
},
36+
labels: {
37+
items: [{
38+
html: '统计你的提问频率',
39+
style: {
40+
left: '40px',
41+
top: '8px',
42+
color: 'black'
43+
}
44+
}]
45+
},
46+
series: [{
47+
type: 'column',
48+
name: 'Jane',
49+
data: [3, 2, 1, 3, 4]
50+
}, {
51+
type: 'spline',
52+
name: 'Average',
53+
data: [3, 2.67, 3, 6.33, 3.33],
54+
marker: {
55+
lineWidth: 10,
56+
lineColor: Highcharts.getOptions().colors[3],
57+
fillColor: 'white'
58+
}
59+
}]
60+
});
61+
}
1962
//删除
2063
var popbox = require('./models/popbox');
2164
$('.btn-del').on('click',function(){

0 commit comments

Comments
 (0)