亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

echarts實現詞云自定義形狀的示例代碼

發布時間:2020-10-23 13:05:21 來源:腳本之家 閱讀:313 作者:小靜仔 欄目:web開發

安裝

npm install echarts
npm install echarts-wordcloud

詞云安裝官網 https://github.com/ecomfe/echarts-wordcloud

下面是一個小鳥形狀的詞云,可以在iconfont中下載(最好是填充的)圖案,轉為base64,就可以用來生成有圖案的詞云了

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>WordCloud Demo</title>
  <script type="text/javascript" src="./echarts.js"></script>
  <script type="text/javascript" src="./echarts-wordcloud.min.js"></script>
</head>
<body>
  <div id="main" ></div>
  <script>
    onload = function () {
      var data = {
        value: [{
          "name": "花鳥市場",
          "value": 1446
        },
          {
            "name": "汽車",
            "value": 928
          },
          {
            "name": "視頻",
            "value": 906
          },
          {
            "name": "電視",
            "value": 825
          },
          {
            "name": "Lover Boy 88",
            "value": 514
          },
          {
            "name": "動漫",
            "value": 486
          },
          {
            "name": "音樂",
            "value": 53
          },
          {
            "name": "直播",
            "value": 163
          },
          {
            "name": "廣播電臺",
            "value": 86
          },
          {
            "name": "戲曲曲藝",
            "value": 17
          },
          {
            "name": "演出票務",
            "value": 6
          },
          {
            "name": "給陌生的你聽",
            "value": 1
          },
          {
            "name": "資訊",
            "value": 1437
          },
          {
            "name": "商業財經",
            "value": 422
          },
          {
            "name": "娛樂八卦",
            "value": 353
          },
          {
            "name": "軍事",
            "value": 331
          },
          {
            "name": "科技資訊",
            "value": 313
          },
          {
            "name": "社會時政",
            "value": 307
          },
          {
            "name": "時尚",
            "value": 43
          },
          {
            "name": "網絡奇聞",
            "value": 15
          },
          {
            "name": "旅游出行",
            "value": 438
          },
          {
            "name": "景點類型",
            "value": 957
          },
          {
            "name": "國內游",
            "value": 927
          },
          {
            "name": "遠途出行方式",
            "value": 908
          },
          {
            "name": "酒店",
            "value": 693
          },
          {
            "name": "關注景點",
            "value": 611
          },
          {
            "name": "旅游網站偏好",
            "value": 512
          },
          {
            "name": "出國游",
            "value": 382
          },
          {
            "name": "交通票務",
            "value": 312
          },
          {
            "name": "旅游方式",
            "value": 187
          },
          {
            "name": "旅游主題",
            "value": 163
          },
          {
            "name": "港澳臺",
            "value": 104
          },
          {
            "name": "本地周邊游",
            "value": 3
          },
          {
            "name": "小賣家",
            "value": 1331
          },
          {
            "name": "全日制學校",
            "value": 941
          },
          {
            "name": "基礎教育科目",
            "value": 585
          },
          {
            "name": "考試培訓",
            "value": 473
          },
          {
            "name": "語言學習",
            "value": 358
          },
          {
            "name": "留學",
            "value": 246
          },
          {
            "name": "K12課程培訓",
            "value": 207
          },
          {
            "name": "藝術培訓",
            "value": 194
          },
          {
            "name": "技能培訓",
            "value": 104
          },
          {
            "name": "IT培訓",
            "value": 87
          },
          {
            "name": "高等教育專業",
            "value": 63
          },
          {
            "name": "家教",
            "value": 48
          },
          {
            "name": "體育培訓",
            "value": 23
          },
          {
            "name": "職場培訓",
            "value": 5
          },
          {
            "name": "金融財經",
            "value": 1328
          },
          {
            "name": "銀行",
            "value": 765
          },
          {
            "name": "股票",
            "value": 452
          },
          {
            "name": "保險",
            "value": 415
          },
          {
            "name": "貸款",
            "value": 253
          },
          {
            "name": "基金",
            "value": 211
          },
          {
            "name": "信用卡",
            "value": 180
          },
          {
            "name": "外匯",
            "value": 138
          },
          {
            "name": "P2P",
            "value": 116
          },
          {
            "name": "貴金屬",
            "value": 98
          },
          {
            "name": "債券",
            "value": 93
          },
          {
            "name": "網絡理財",
            "value": 92
          },
          {
            "name": "信托",
            "value": 90
          },
          {
            "name": "征信",
            "value": 76
          },
          {
            "name": "期貨",
            "value": 76
          },
          {
            "name": "公積金",
            "value": 40
          },
          {
            "name": "銀行理財",
            "value": 36
          },
          {
            "name": "銀行業務",
            "value": 30
          },
          {
            "name": "典當",
            "value": 7
          },
          {
            "name": "海外置業",
            "value": 1
          },
          {
            "name": "汽車",
            "value": 1309
          },
          {
            "name": "汽車檔次",
            "value": 965
          },
          {
            "name": "汽車品牌",
            "value": 900
          },
          {
            "name": "汽車車型",
            "value": 727
          },
          {
            "name": "購車階段",
            "value": 461
          },
          {
            "name": "二手車",
            "value": 309
          },
          {
            "name": "汽車美容",
            "value": 260
          },
          {
            "name": "新能源汽車",
            "value": 173
          },
          {
            "name": "汽車維修",
            "value": 155
          },
          {
            "name": "租車服務",
            "value": 136
          },
          {
            "name": "車展",
            "value": 121
          },
          {
            "name": "違章查詢",
            "value": 76
          },
          {
            "name": "汽車改裝",
            "value": 62
          },
          {
            "name": "汽車用品",
            "value": 37
          },
          {
            "name": "路況查詢",
            "value": 32
          },
          {
            "name": "汽車保險",
            "value": 28
          },
          {
            "name": "陪駕代駕",
            "value": 4
          },
          {
            "name": "網絡購物",
            "value": 1275
          },
          {
            "name": "做我的貓",
            "value": 1088
          },
          {
            "name": "只想要你知道",
            "value": 907
          },
          {
            "name": "團購",
            "value": 837
          },
          {
            "name": "比價",
            "value": 201
          },
          {
            "name": "海淘",
            "value": 195
          },
          {
            "name": "移動APP購物",
            "value": 179
          },
          {
            "name": "支付方式",
            "value": 119
          },
          {
            "name": "代購",
            "value": 43
          },
          {
            "name": "體育健身",
            "value": 1234
          },
          {
            "name": "體育賽事項目",
            "value": 802
          },
          {
            "name": "運動項目",
            "value": 405
          },
          {
            "name": "體育類賽事",
            "value": 337
          },
          {
            "name": "健身項目",
            "value": 199
          },
          {
            "name": "健身房健身",
            "value": 78
          },
          {
            "name": "運動健身",
            "value": 77
          },
          {
            "name": "家庭健身",
            "value": 36
          },
          {
            "name": "健身器械",
            "value": 29
          },
          {
            "name": "辦公室健身",
            "value": 3
          },
          {
            "name": "商務服務",
            "value": 1201
          },
          {
            "name": "法律咨詢",
            "value": 508
          },
          {
            "name": "化工材料",
            "value": 147
          },
          {
            "name": "廣告服務",
            "value": 125
          },
          {
            "name": "會計審計",
            "value": 115
          },
          {
            "name": "人員招聘",
            "value": 101
          },
          {
            "name": "印刷打印",
            "value": 66
          },
          {
            "name": "知識產權",
            "value": 32
          },
          {
            "name": "翻譯",
            "value": 22
          },
          {
            "name": "安全安保",
            "value": 9
          },
          {
            "name": "公關服務",
            "value": 8
          },
          {
            "name": "商旅服務",
            "value": 2
          },
          {
            "name": "展會服務",
            "value": 2
          },
          {
            "name": "特許經營",
            "value": 1
          },
          {
            "name": "休閑愛好",
            "value": 1169
          },
          {
            "name": "收藏",
            "value": 412
          },
          {
            "name": "攝影",
            "value": 393
          },
          {
            "name": "溫泉",
            "value": 230
          },
          {
            "name": "博彩彩票",
            "value": 211
          },
          {
            "name": "美術",
            "value": 207
          },
          {
            "name": "書法",
            "value": 139
          },
          {
            "name": "DIY手工",
            "value": 75
          },
          {
            "name": "舞蹈",
            "value": 23
          },
          {
            "name": "釣魚",
            "value": 21
          },
          {
            "name": "棋牌桌游",
            "value": 17
          },
          {
            "name": "KTV",
            "value": 6
          },
          {
            "name": "密室",
            "value": 5
          },
          {
            "name": "采摘",
            "value": 4
          },
          {
            "name": "電玩",
            "value": 1
          },
          {
            "name": "真人CS",
            "value": 1
          },
          {
            "name": "轟趴",
            "value": 1
          },
          {
            "name": "家電數碼",
            "value": 1111
          },
          {
            "name": "手機",
            "value": 885
          },
          {
            "name": "電腦",
            "value": 543
          },
          {
            "name": "大家電",
            "value": 321
          },
          {
            "name": "家電關注品牌",
            "value": 253
          },
          {
            "name": "網絡設備",
            "value": 162
          },
          {
            "name": "攝影器材",
            "value": 149
          },
          {
            "name": "影音設備",
            "value": 133
          },
          {
            "name": "辦公數碼設備",
            "value": 113
          },
          {
            "name": "生活電器",
            "value": 67
          },
          {
            "name": "廚房電器",
            "value": 54
          },
          {
            "name": "智能設備",
            "value": 45
          },
          {
            "name": "個人護理電器",
            "value": 22
          },
          {
            "name": "服飾鞋包",
            "value": 1047
          },
          {
            "name": "服裝",
            "value": 566
          },
          {
            "name": "飾品",
            "value": 289
          },
          {
            "name": "鞋",
            "value": 184
          },
          {
            "name": "箱包",
            "value": 168
          },
          {
            "name": "奢侈品",
            "value": 137
          },
          {
            "name": "母嬰親子",
            "value": 1041
          },
          {
            "name": "孕嬰保健",
            "value": 505
          },
          {
            "name": "母嬰社區",
            "value": 299
          },
          {
            "name": "早教",
            "value": 103
          },
          {
            "name": "奶粉輔食",
            "value": 66
          },
          {
            "name": "童車童床",
            "value": 41
          },
          {
            "name": "關注品牌",
            "value": 271
          },
          {
            "name": "寶寶玩樂",
            "value": 30
          },
          {
            "name": "母嬰護理服務",
            "value": 25
          },
          {
            "name": "紙尿褲濕巾",
            "value": 16
          },
          {
            "name": "媽媽用品",
            "value": 15
          },
          {
            "name": "寶寶起名",
            "value": 12
          },
          {
            "name": "童裝童鞋",
            "value": 9
          },
          {
            "name": "胎教",
            "value": 8
          },
          {
            "name": "寶寶安全",
            "value": 1
          },
          {
            "name": "寶寶洗護用品",
            "value": 1
          },
          {
            "name": "軟件應用",
            "value": 1018
          },
          {
            "name": "系統工具",
            "value": 896
          },
          {
            "name": "理財購物",
            "value": 440
          },
          {
            "name": "生活實用",
            "value": 365
          },
          {
            "name": "影音圖像",
            "value": 256
          },
          {
            "name": "社交通訊",
            "value": 214
          },
          {
            "name": "手機美化",
            "value": 39
          },
          {
            "name": "辦公學習",
            "value": 28
          },
          {
            "name": "應用市場",
            "value": 23
          },
          {
            "name": "母嬰育兒",
            "value": 14
          },
          {
            "name": "游戲",
            "value": 946
          },
          {
            "name": "手機游戲",
            "value": 565
          },
          {
            "name": "PC游戲",
            "value": 353
          },
          {
            "name": "網頁游戲",
            "value": 254
          },
          {
            "name": "游戲機",
            "value": 188
          },
          {
            "name": "模擬輔助",
            "value": 166
          },
          {
            "name": "個護美容",
            "value": 942
          },
          {
            "name": "護膚品",
            "value": 177
          },
          {
            "name": "彩妝",
            "value": 133
          },
          {
            "name": "美發",
            "value": 80
          },
          {
            "name": "香水",
            "value": 50
          },
          {
            "name": "個人護理",
            "value": 46
          },
          {
            "name": "美甲",
            "value": 26
          },
          {
            "name": "SPA美體",
            "value": 21
          },
          {
            "name": "花鳥萌寵",
            "value": 914
          },
          {
            "name": "綠植花卉",
            "value": 311
          },
          {
            "name": "狗",
            "value": 257
          },
          {
            "name": "其他寵物",
            "value": 131
          },
          {
            "name": "水族",
            "value": 125
          },
          {
            "name": "貓",
            "value": 122
          },
          {
            "name": "動物",
            "value": 81
          },
          {
            "name": "鳥",
            "value": 67
          },
          {
            "name": "寵物用品",
            "value": 41
          },
          {
            "name": "寵物服務",
            "value": 26
          },
          {
            "name": "書籍閱讀",
            "value": 913
          },
          {
            "name": "網絡小說",
            "value": 483
          },
          {
            "name": "關注書籍",
            "value": 128
          },
          {
            "name": "文學",
            "value": 105
          },
          {
            "name": "報刊雜志",
            "value": 77
          },
          {
            "name": "人文社科",
            "value": 22
          },
          {
            "name": "建材家居",
            "value": 907
          },
          {
            "name": "裝修建材",
            "value": 644
          },
          {
            "name": "家具",
            "value": 273
          },
          {
            "name": "家居風格",
            "value": 187
          },
          {
            "name": "家居家裝關注品牌",
            "value": 140
          },
          {
            "name": "家紡",
            "value": 107
          },
          {
            "name": "廚具",
            "value": 47
          },
          {
            "name": "燈具",
            "value": 43
          },
          {
            "name": "家居飾品",
            "value": 29
          },
          {
            "name": "家居日常用品",
            "value": 10
          },
          {
            "name": "生活服務",
            "value": 883
          },
          {
            "name": "物流配送",
            "value": 536
          },
          {
            "name": "家政服務",
            "value": 108
          },
          {
            "name": "攝影服務",
            "value": 49
          },
          {
            "name": "搬家服務",
            "value": 38
          },
          {
            "name": "物業維修",
            "value": 37
          },
          {
            "name": "婚慶服務",
            "value": 24
          },
          {
            "name": "二手回收",
            "value": 24
          },
          {
            "name": "鮮花配送",
            "value": 3
          },
          {
            "name": "維修服務",
            "value": 3
          },
          {
            "name": "殯葬服務",
            "value": 1
          },
          {
            "name": "求職創業",
            "value": 874
          },
          {
            "name": "創業",
            "value": 363
          },
          {
            "name": "目標職位",
            "value": 162
          },
          {
            "name": "目標行業",
            "value": 50
          },
          {
            "name": "兼職",
            "value": 21
          },
          {
            "name": "期望年薪",
            "value": 20
          },
          {
            "name": "實習",
            "value": 16
          },
          {
            "name": "雇主類型",
            "value": 10
          },
          {
            "name": "星座運勢",
            "value": 789
          },
          {
            "name": "星座",
            "value": 316
          },
          {
            "name": "算命",
            "value": 303
          },
          {
            "name": "解夢",
            "value": 196
          },
          {
            "name": "風水",
            "value": 93
          },
          {
            "name": "面相分析",
            "value": 47
          },
          {
            "name": "手相",
            "value": 32
          },
          {
            "name": "公益",
            "value": 90
          }
        ],
        //小鳥圖片
        image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADICAYAAADvG90JAAAWNElEQVR4Xu2dedS/5ZzHX/6YmVJRKi1ojwqjydaqIilJacgkhFSYM5UkSyiFSpaypIXRiJBjyJqTZBjLjL2hxZpMRqEkSxznzJz3dH1PT0/P83zv5bqv5b7fn3O+5+l3uu/r8/m8r/t9L9f1We6GxQgYgeoQuFt1FttgI2AEMHF9ERiBChEwcSucNJtsBExcXwNGoEIETNwKJ80mGwET19dAbAS2BDYNv/sA9wLWAtYEVpuj7M/Ab8LvZuB64Mrw+3lsQ2sez8Stefby2r4TsBtw/wVEve+AJv0C+BxwOfAZ4GcD6ip+aBO3+CkqxsB1gKcBewK7Aqtntuwa4JPA24CfZLYluXoTNznkVSlcA/h74OnAYwq2/ELgNcBVBdsY1TQTNyqcoxnsAcAxgbB3r8grvUafCVxckc2dTDVxO8E22pM2CRf+Eyv38EvAUcA3KvdjWfNN3LHObHu/TgJe2f60os/Q6/PYfPp/wE3coq+7JMZtD7wf0NN2jPKFsKimraXSZGNgL+BfgNvaGGfitkFrfMe+FDhlfG7dxaNbgBcAWsTKLdrXfirwDGAH4BHA19oaZeK2RWwcx2vB6WOFrxQPgfR5wOFDDDxnTAWePBn4h/CEnR1+EPCBLvYM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Y6Vb88EWBsEqxs1SMQG7iLoTuwJCv+fiK8SzN9F8EsoqwXyrNONvTHYGSiDvzQnm+qmC/L7APcO/u7k3yTO2zfjg8WZVWZxkhAiUSdzHMOwQC7w1sN8I5iOGSvlkvBy4GPhljQI9RNgI1EHchgmsDe4Un8p6Awi2nKD8APr/g5wD/iV0FtRF38fQ8FNgJ0FNZP6UdjlFmT9QZWU3UMc5yC59qJ+5iV/U9LCLvCDw81GXeoAUeuQ/Vk/Qq4BpA5V709wrg1tyGWX9ZCIyNuEuhuyqwJaAysZuHvwrHVDVKkVrVKlOJYn/VPlI/pcNdG/ZRRdIrUxlhPfUjMAXizpulVUJZWZFYP0V1rQWsFvKM/yb81XGz318Bfwo/pbrN/lt/Z/++ZRFJXfx73kz4/zdGwMRtDJUPNALlIGDiljMXtsQINEbAxG0MlQ80AuUgYOKWMxe2xAg0RsDEbQyVDzQC5SBg4pYzF7bECDRG4P8A3SKu5/rwGYoAAAAASUVORK5CYII="
      }
      var myChart = echarts.init(document.getElementById('main'));
      //溫馨提示:image 選取有嚴格要求不可過大;,否則firefox不兼容 iconfont上面的圖標可以
      var maskImage = new Image();
      maskImage.src = data.image
 
      maskImage.onload = function(){
        myChart.setOption( {
          backgroundColor:'#fff',
          tooltip: {
            show: false
          },
          series: [{
            type: 'wordCloud',
            gridSize: 1,
            sizeRange: [12, 55],
            rotationRange: [-45, 0, 45, 90],
            maskImage: maskImage,
            textStyle: {
              normal: {
                color: function() {
                  return 'rgb(' +
                      Math.round(Math.random() * 255) +
                      ', ' + Math.round(Math.random() * 255) +
                      ', ' + Math.round(Math.random() * 255) + ')'
                }
              }
            },
            left: 'center',
            top: 'center',
            // width: '96%',
            // height: '100%',
            right: null,
            bottom: null,
            // width: 300,
            // height: 200,
            // top: 20,
            data: data.value
          }]
        })
      }
 
    }
  </script>
</body>
</html>

運行效果

echarts實現詞云自定義形狀的示例代碼

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持億速云。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

图木舒克市| 万宁市| 泉州市| 贡山| 虹口区| 荥阳市| 宜兴市| 临猗县| 老河口市| 新绛县| 田东县| 北川| 江山市| 青神县| 花莲市| 霍邱县| 扶沟县| 三穗县| 繁峙县| 喀喇沁旗| 枣庄市| 桓台县| 红原县| 湘乡市| 屏山县| 郯城县| 石台县| 呼伦贝尔市| 五河县| 香港| 永吉县| 铜山县| 兴海县| 长寿区| 敦化市| 讷河市| 新宾| 社旗县| 阳曲县| 黄陵县| 武义县|