2014年小结之电影全纪录

<div id="column"></div><div id="pie"></div><script type="text/javascript" src="http://lib.sinaapp.com/js/highcharts/2.3.5/highcharts.js";></script><script>function setChart(name, categories, data, color) {

    chart.xAxis[0].setCategories(categories, false);
    chart.series[0].remove(false);
    chart.addSeries({
        name: name,  
        data: data,
        color: color
    },
    false);
    chart.redraw()
}chart = new Highcharts.Chart({    chart: {        renderTo: 'column',        type: 'column'    },    title: {        text: '2014年你一共看过153部电影'    },    xAxis: {        categories: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]    },    yAxis: {        title: {text: '数量(部)'}    },    plotOptions: {        column: {            cursor: 'pointer',            point: {                events: {                    click: function() {                        var drilldown = this.drilldown;                        if (drilldown) {                            setChart(drilldown.name, drilldown.categories, drilldown.data, drilldown.color)                        } else {                            setChart(name, categories, res, colors[0])                        }                    }                }            },            dataLabels: {                enabled: true,                formatter: function() {                    return this.y                }            }        }    },    tooltip: {        formatter: function() {            var point = this.point,            s = this.x + ': ' + this.y + '部<br/>';            s += point.drilldown ? '单击查看' + point.category + '详情' : '返回月份总览';            return s;        }    },    series: [{        name: '电影',        data: [{"y":8,"color":"#7cb5ec","drilldown":{"name":"一月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"data":[1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,1,0,0,0,1,0,0,1,0],"color":"#7cb5ec"}},{"y":12,"color":"#7cb5ec","drilldown":{"name":"二月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],"data":[0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,2,2,0,1,1,0,0],"color":"#7cb5ec"}},{"y":15,"color":"#7cb5ec","drilldown":{"name":"三月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"data":[0,1,0,0,0,1,1,2,0,1,0,0,0,0,2,1,0,0,1,0,1,0,0,0,1,1,0,0,1,0,1],"color":"#7cb5ec"}},{"y":6,"color":"#7cb5ec","drilldown":{"name":"四月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],"data":[0,0,0,2,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0],"color":"#7cb5ec"}},{"y":9,"color":"#7cb5ec","drilldown":{"name":"五月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"data":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,1,0,0,1,0,3],"color":"#7cb5ec"}},{"y":5,"color":"#7cb5ec","drilldown":{"name":"六月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],"data":[1,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0],"color":"#7cb5ec"}},{"y":22,"color":"#7cb5ec","drilldown":{"name":"七月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"data":[0,2,0,0,2,0,0,1,1,0,1,0,1,0,0,1,1,1,5,0,1,1,0,1,0,0,0,0,0,1,2],"color":"#7cb5ec"}},{"y":14,"color":"#7cb5ec","drilldown":{"name":"八月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"data":[0,0,0,0,0,0,1,3,4,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0],"color":"#7cb5ec"}},{"y":8,"color":"#7cb5ec","drilldown":{"name":"九月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],"data":[0,1,1,1,2,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"color":"#7cb5ec"}},{"y":35,"color":"#7cb5ec","drilldown":{"name":"十月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"data":[0,0,11,2,1,2,0,0,0,0,1,3,3,2,1,1,1,1,0,0,2,0,0,2,1,0,0,0,1,0,0],"color":"#7cb5ec"}},{"y":8,"color":"#7cb5ec","drilldown":{"name":"十一月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],"data":[0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,2,0,0,1,0,0],"color":"#7cb5ec"}},{"y":11,"color":"#7cb5ec","drilldown":{"name":"十二月","categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"data":[0,0,0,0,0,1,0,1,0,0,0,0,2,1,0,0,1,1,1,0,1,0,0,1,0,0,1,0,0,0,0],"color":"#7cb5ec"}}],        color: '#7cb5ec'    }],    exporting: {        enabled: true    }});chart2 = new Highcharts.Chart({   chart: {        renderTo: 'pie',        plotBackgroundColor: null,        plotBorderWidth: null,        plotShadow: false   },   title: {        text: '评分分布'   },   tooltip: {        pointFormat: '',        percentageDecimals: 0   },   plotOptions: {        pie: {            allowPointSelect: true,            cursor: 'pointer',            dataLabels: {                enabled: true,                color: '#000000',                connectorColor: '#000000',                formatter: function() {                    return '<b>' + this.point.name + '</b>: ' + Math.round(this.percentage) + ' %'                }            }        }   },   series: [{        type: 'pie',        name: '数量',        data: [['无', 0], ['1星', 2], ['2星', 12], ['3星', 96], ['4星', 39], ['5星', 4]]   }]});$('body').on('click', '#command span', function(e){var n = parseInt($(this).attr('class'));$('#command .click').removeClass('click');if(n != 0) {for(i=0;i<6;i++) $('#msh .'+i).css('display', 'none');$('#command .'+n).addClass('click');$('#msh .'+n).css('display', 'inline-table');} else {$('#command .0').addClass('click');for(i=0;i<6;i++) $('#msh .'+i).css('display', 'inline-table');}});</script>


2014-电影

2014年小结之电影全纪录》上有 22 条评论

  1. 豆瓣电影统计工具用户飘过~
    感谢你开发出这么用心的小插件~
    特别神奇的是到了2015年它居然会自己出来新年份唉
    好神奇~

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注