zoukankan      html  css  js  c++  java
  • 632 echarts样式: 直接样式,高亮样式


    05.样式的使用.html

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta http-equiv="X-UA-Compatible" content="ie=edge">
      <title>Document</title>
      <script src="lib/echarts.min.js"></script>
    </head>
    
    
    <body>
      <div style=" 600px;height:400px"></div>
      <script>
        var mCharts = echarts.init(document.querySelector("div"))
    
        var option = {
          title: {
            text: '饼图的测试',
            textStyle: { // 控制标题的文字样式
              color: 'blue'
            }
          },
          series: [
            {
              type: 'pie',
              data: [{
                value: 11231,
                name: "淘宝",
                itemStyle: { // 控制淘宝这一区域的样式
                  color: 'yellow'
                },
                label: {
                  color: 'green'
                },
                // 高亮
                emphasis: {
                  itemStyle: { // 控制淘宝这一区域的样式
                    color: 'pink'
                  },
                  label: {
                    color: 'red'
                  }
                }
              },
              {
                value: 22673,
                name: "京东"
              },
              {
                value: 6123,
                name: "唯品会",
              },
              {
                value: 8989,
                name: "1号店"
              },
              {
                value: 6700,
                name: "聚美优品"
              }]
            }
          ]
        }
        mCharts.setOption(option)
      </script>
    </body>
    
    </html>
    

  • 相关阅读:
    ext文件系统机制原理剖析
    win10企业版无法访问共享文件夹
    Linux 系统 CPU 的性能监控及调优
    MySQL延时复制简介
    MySQL迁移升级解决方案
    Docker 微服务教程安装WordPress
    java
    pom.xml
    sharding-jdbc
    java-MyBatis可视化代码生成工具
  • 原文地址:https://www.cnblogs.com/jianjie/p/14437816.html
Copyright © 2011-2022 走看看