zoukankan      html  css  js  c++  java
  • EChars学习-2

    上海的echars学习

     1 <html>
     2 <head>
     3 <meta charset="utf-8">
     4 <meta http-equiv="X-UA-Compatible" content="IE=edge">
     5 </head>
     6 <body>
     7     <div id="main" style="100%; height: 100%;"></div>
     8 </body>
     9 <script src="js/echarts.min.js"></script>
    10 <script src="js/shanghai.js"></script>
    11 <script>
    12     var myChart = echarts.init(document.getElementById('main'));
    13     var option = {
    14         title: {
    15             text : '上海地图',
    16             subtext : '-。-1234'
    17         },
    18         tooltip : {
    19             trigger: 'item',
    20             formatter: function(a){
    21                 return a[2];
    22             }
    23         },
    24         legend: {
    25             orient: 'vertical',
    26             x:'right',
    27             data:['数据名称']
    28         },
    29         dataRange: {
    30             min: 0,
    31             max: 1000,
    32             color:['orange','#CCCCCC'],
    33             text:['',''],           // 文本,默认为数值文本
    34             calculable : true
    35         },
    36         series : [
    37             {
    38                 name: '数据名称',
    39                 type: 'map',
    40                 mapType: '上海',
    41                 selectedMode : 'single',
    42                 itemStyle:{
    43                     normal:{label:{show:true}},
    44                     emphasis:{label:{show:true}}
    45                 },
    46                 data:[
    47                     {name: '崇明县',value: Math.round(Math.random()*1000)},
    48                     {name: '宝山区',value: Math.round(Math.random()*1000)},
    49                     {name: '嘉定区',value: Math.round(Math.random()*1000)},
    50                     {name: '青浦区',value: Math.round(Math.random()*1000)},
    51                     {name: '杨浦区',value: Math.round(Math.random()*1000)},
    52                     {name: '虹口区',value: Math.round(Math.random()*1000)},
    53                     {name: '闸北区',value: Math.round(Math.random()*1000)},
    54                     {name: '普陀区',value: Math.round(Math.random()*1000)},
    55                     {name: '静安区',value: Math.round(Math.random()*1000)},
    56                     {name: '黄浦区',value: Math.round(Math.random()*1000)},
    57                     {name: '卢湾区',value: Math.round(Math.random()*1000)},
    58                     {name: '长宁区',value: Math.round(Math.random()*1000)},
    59                     {name: '徐汇区',value: Math.round(Math.random()*1000)},
    60                     {name: '浦东新区',value: Math.round(Math.random()*1000)},
    61                     {name: '松江区',value: Math.round(Math.random()*1000)},
    62                     {name: '闵行区',value: Math.round(Math.random()*1000)},
    63                     {name: '金山区',value: Math.round(Math.random()*1000)},
    64                     {name: '奉贤区',value: Math.round(Math.random()*1000)},
    65                     {name: '南汇区',value: Math.round(Math.random()*1000)}
    66                 ]
    67             }
    68         ]
    69     };
    70     myChart.setOption(option);
    71 
    72 </script>
    73 </html>
  • 相关阅读:
    解决Oracle 11g 或 ODAC 11.2 多客户端版本的乱码问题
    C#.ToString()格式大全
    太阳的眼泪
    oracle database link 12154 tns 无法识别错误的解决方案
    List<T>泛型的Find 和 Where 用法范例
    chrome 下载工具支持
    解决,启动office2007时总出现“正在配置Microsoft Office Professional Plus 2007”的字样
    macOS M1 下pip install安装.whl报错“is not a supported wheel on this platform.
    Mail.Ru Cup 2018 Round 3 B. Divide Candies (数论)
    202120221 BUCT ACM集训队每周程序设计竞赛(8) 问题D :一月忘干净
  • 原文地址:https://www.cnblogs.com/hjt-7/p/5623652.html
Copyright © 2011-2022 走看看