plexpy/data/interfaces/default/js/graphs/plays_by_day.js
Tim 838ee5cae9 Improve graph tooltip
One checkbox to group them all
Do not cache graph data
Fix variable for db in init test
Remove superfluous includes
Remove superfluous debug logging
2015-06-24 17:35:41 +02:00

54 lines
No EOL
1.2 KiB
JavaScript

var hc_plays_by_day_options = {
chart: {
type: 'line',
backgroundColor: 'rgba(0,0,0,0)',
renderTo: 'chart_div_plays_by_day'
},
title: {
text: ''
},
legend: {
enabled: true,
itemStyle: {
font: '9pt "Open Sans", sans-serif',
color: '#A0A0A0'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#444'
}
},
credits: {
enabled: false
},
colors: ['#F9AA03', '#FFFFFF'],
xAxis: {
type: 'datetime',
labels: {
formatter: function() {
return moment(this.value).format("MMM D");
}
},
categories: [{}]
},
yAxis: {
title: {
text: null
}
},
tooltip: {
formatter: function() {
var monthStr = moment(this.x).format("ddd MMM D");
var s = '<b>'+ monthStr +'</b>';
$.each(this.points, function(i, point) {
s += '<br/>'+point.series.name+': '+point.y;
});
return s;
},
shared: true
},
series: [{}]
};