| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-md-12"> |
| | | <div class="card1"> |
| | | <div class="content"> |
| | | |
| | | <div class="footer"> |
| | | <div class="legend" style="display: flex;justify-content: space-between"> |
| | | <h4>今日视频搜索数据TOP50</h4> |
| | | <button type="button" id="refresh_search" class="btn btn-default">刷新</button> |
| | | </div> |
| | | <hr> |
| | | </div> |
| | | |
| | | <div> |
| | | <div id="container_search" style="min-width:400px;height: 1800px;"></div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row"> |
| | | <div class="col-md-12"> |
| | | <div class="card1"> |
| | |
| | | }); |
| | | } |
| | | |
| | | function fillSearchData(names, datas) { |
| | | $('#container_search').highcharts({ |
| | | chart: { |
| | | type: 'bar' |
| | | }, |
| | | title: { |
| | | text: '搜索用户数' |
| | | }, |
| | | xAxis: { |
| | | categories: names, |
| | | }, |
| | | yAxis: { |
| | | min: 0, |
| | | labels: { |
| | | overflow: 'justify' |
| | | } |
| | | }, |
| | | |
| | | plotOptions: { |
| | | bar: { |
| | | dataLabels: { |
| | | enabled: true |
| | | } |
| | | } |
| | | }, |
| | | legend: { |
| | | layout: 'vertical', |
| | | align: 'right', |
| | | verticalAlign: 'top', |
| | | x: -40, |
| | | y: 100, |
| | | floating: true, |
| | | borderWidth: 1, |
| | | backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'), |
| | | shadow: true |
| | | }, |
| | | credits: { |
| | | enabled: false |
| | | }, |
| | | series: [{ |
| | | name: '搜索用户数', |
| | | data: datas |
| | | }] |
| | | }); |
| | | } |
| | | |
| | | function fillYData(data) { |
| | | $("#rcount").html(data.data.rcount); |
| | | $("#trcount").html(data.data.trcount); |
| | |
| | | doResponse(data, fillYData(data)); |
| | | }, 'json'); |
| | | |
| | | $.post('api/statistics/gettopsearch', { |
| | | 'detailsystem': 0 |
| | | }, function(data) { |
| | | doResponse(data,fillSearchData(data.data.name, data.data.count)); |
| | | }, 'json'); |
| | | |
| | | //刷新搜索关键字 |
| | | $("#refresh_search").click(function () { |
| | | $.post('api/statistics/refreshtopsearch', { |
| | | 'detailsystem': 0 |
| | | }, function(data) { |
| | | doResponse(data,function(){ |
| | | |
| | | }); |
| | | }, 'json'); |
| | | }); |
| | | |
| | | }); |
| | | </script> |
| | | </body> |