123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- $(function(){
-
-
- var rankH = $('.con li:nth-child(2) .book-rank').height();
- var rankShowH = 3.5*rankH;
- var overHiddenH = rankH*5 + rankShowH;
- $('.book-show').css('height',rankShowH +'px');
- var curBookRank = $('.aside-left li.active .book-rank');
- curBookRank.css('height',rankH +'px');
- var topSpan = $('.aside-left .top .book-rank span');
- var topSpanH = topSpan.height();
- topSpan.css('line-height',topSpanH + 'px');
- var bottomSpan = $('.aside-left .bottom .book-rank span');
- var bottomSpanH = bottomSpan.height();
- bottomSpan.css('line-height',bottomSpanH + 'px');
-
-
- var areaRankBox = $('.aside-right .area-rank .con');
- var areaRankH = areaRankBox.height();
- var areaRankLiH = Math.round(areaRankH/3);
- areaRankBox.find('li').css('height',areaRankLiH + 'px');
- var areaUl = areaRankBox.children('ul');
-
- var areaUlH = areaUl.height();
-
-
- var num = 0;
- setInterval(function(){
- num++;
- num > 4?num = 0 : num;
- areaUl.css('top',-(num*areaRankH) + 'px');
- },2000);
-
-
-
-
-
- })
- var pie1 = echarts.init(document.getElementById('pie1'),'macarons');
-
- var rich = {
- big: {
- fontSize: 24,
- lineHeight: 40,
- fontFamily: 'Rubik'
- },
- small: {
- fontSize: 16
- },
- }
- var pieOption1 = {
- series: [
- {
- name:'分类占比',
- type:'pie',
- radius: ['50%', '70%'],
- hoverOffset: 5,
- center: ['50%','40%'],
- avoidLabelOverlap: false,
- color: ['#0239a7', '#fff', '#24feb4', '#23539b', '#3c9de4'],
- label: {
- normal: {
- show: false,
- position: 'center'
- }
- ,
- emphasis: {
- show: true,
- color: '#fff',
- formatter: function(params, ticket, callback) {
- return '{big|' + params.value + '}{small|%}\n{small|' + params.name + '}';
- },
-
- rich: rich
- }
- },
- labelLine: {
- normal: {
- show: false
- }
- },
- data:[
- {
- value:0.52,
- name: '科技',
- label: {
- normal: {
- formatter: '{c}%\n\n{b}'
- }
- }
- },
- {
- value:0.17,
- name:'少儿',
- label: {
- normal: {
- formatter: '{c}%\n\n{b}'
- }
- }
- },
- {
- value: 0.09,
- name: '社科',
- label: {
- normal: {
- formatter: '{c}%\n\n{b}'
- }
- }
- },
- {
- value: 0.08,
- name: '生活',
- label: {
- normal: {
- formatter: '{c}%\n\n{b}'
- }
- }
- },
- {
- value:0.08,
- name: '文艺',
- label: {
- normal: {
- formatter: '{c}%\n\n{b}'
- }
- }
- },
- {
- value: 0.04,
- name: '教育',
- label: {
- normal: {
- formatter: '{c}%\n\n{b}'
- }
- }
- },
- {
- value: 0.007,
- name: '未分',
- label: {
- normal: {
- formatter: '{c}%\n\n{b}'
- }
- }
- }
- ]
- }
- ]
- };
- pie1.currentIndex = -1;
- pie1.setOption(pieOption1);
- setInterval(function () {
- var dataLen = pieOption1.series[0].data.length;
-
- pie1.dispatchAction({
- type: 'downplay',
- seriesIndex: 0,
- dataIndex: pie1.currentIndex
- });
- pie1.currentIndex = (pie1.currentIndex + 1) % dataLen;
-
- pie1.dispatchAction({
- type: 'highlight',
- seriesIndex: 0,
- dataIndex: pie1.currentIndex
- });
- }, 1000);
-
- var trendBar1 = echarts.init(document.getElementById('trendBar1'));
- var optionBar =
- {
- grid:{
- top: 50,
- bottom: '30%',
- },
- legend: {
- data:['销售码洋', '同比增长'],
- right: '5%',
- itemWidth: 18,
- itemHeight: 12,
- textStyle: {
- color: '#fff'
- }
- },
- xAxis: {
- data: ['1', '2', '3', '4', '5', '6', '7','8', '9', '10', '11', '12'],
- axisLine: {
- show: false,
- lineStyle: {
- color: '#07bffb'
- }
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- interval: 0
- }
- },
- yAxis: [
- {
- name: "码洋(/千)",
- axisLine: {
- show: false,
- lineStyle: {
- color: '#07bffb'
- }
- },
- splitLine: {
- show:false
- },
- axisTick: {
- show: false
- },
- interval:15,
- min: 0,
- max:40,
- position: 'left'
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ],
- series: [
- {
- name: '销售码洋',
- type: 'bar',
- barWidth: '40%',
- barGap: 5,
- itemStyle:{
- normal:{
- color:new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#00fecc'
- }, {
- offset: 0.8,
- color: '#2690cf'
- }], false)
- }
- },
- data: [25, 26, 24, 27, 23, 22, 25,25,27,28,29,29]
- },
-
-
-
-
-
-
-
-
-
- ]
- }
- trendBar1.setOption(optionBar);
- var leidaChart = echarts.init(document.getElementById("leida"));
- optionLei = {
- backgroundColor: 'transparent',
- color: ['transparent', 'transparent'],
- legend: {
- show: false,
- },
- grid: { bottom: '20%' },
- radar: [
- {
- indicator: [
- { text: '指标一' },
- { text: '指标二' },
- { text: '指标三' },
- { text: '指标四' },
- ],
- shape: 'circle',
- name: {
- formatter: '【{value}】',
- textStyle: {
- color: 'rgba(6, 6, 6, 0)'
- }
- },
- splitArea: {
- areaStyle: {
- color: ['transparent',
- 'transparent', 'transparent',
- 'transparent', 'transparent'],
- }
- },
- axisLine: {
-
-
-
- },
- splitLine: {
-
-
-
- }
- },
- ],
- series: [
- {
- name: '雷达图',
- type: 'radar',
-
-
- zoom: 1,
- itemStyle: {
- emphasis: {
-
- lineStyle: {
-
- }
- }
- },
- itemStyle: {
- normal:
- {
- areaStyle: {
- type: 'default',
- color: '#3c9de4'
- }
- }
- },
- data: [
- {
- value: [0.1,0.6,0,0],
- name: '图一',
- symbol: 'rect',
-
- lineStyle: {
- normal: {
-
- }
- },
- },
- ]
- },
- ]
- }
- leidaChart.setOption(optionLei);
|