• echarts 折线图配置


    html内容:
    <div id="user_num_chart" style=" 582px;height:250px;"></div>
     
     
    <script>
    var myChart = echarts.init(document.getElementById('user_num_chart'));
    option = {
    title: [
    {
    text: '平台用户总数',
    textStyle: {
    color: "rgb(253,159,45)",//图标颜色
    fontSize:14,
    },
    right:10,
    top: 55,
    //subtext: '纯属虚构'
    },{
    text: '已租房用户',
    textStyle: {
    fontSize:14,
    color: "rgb(42,168,252)"
    },
    right: 25,
    top: 95
    }],
    xAxis: {
    type: 'category',
    data: [5.1, 5.8, 5.15, 5.22, 5.29]
    },
    yAxis: {
    type: 'value'
    },
    // legend: {
    // data: [{
    // name: '平台用户总数',
    // textStyle: { color: "rgb(253,159,45)" },//标题文字颜色
    // },{
    // name: '已租房用户',
    // textStyle: { color: "rgb(42,168,252)" },
    // }],
    // },
    series: [{
    name: "平台用户总数",
    data: [0, 120, 262, 301, 534, 560],
    type: 'line',
    smooth: true,
    symbol: "none", //去小点
    color: "rgb(253,159,45)", //标题图标颜色
    lineStyle: { color: "rgb(253,159,45)" },//线条颜色
    //label : { normal:{show: true}},
     
    }, {
    name: "已租房用户",
    data: [0, 50, 222, 290, 360, 390, 510],
    type: 'line',
    smooth: true,
    symbol: "none",
    color: "rgb(42,168,252)",
    lineStyle: { color: "rgb(42,168,252)" },
    // itemStyle : { normal: {label : {show: true}}},
    }]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    </script>
  • 相关阅读:
    SQL性能优化思路
    EF Migraiton错误解决
    How to resolve the 403 error when send POST request from Postman
    Disable trigger to avoid the ID is auto-updated
    MBG(Mybatis Generator)配置
    Publish Web Site To IIS From VS
    quickSort算法导论版实现
    Clang与libc++abi库安装
    Clang与libc++abi库安装
    整数中1 的个数
  • 原文地址:https://www.cnblogs.com/lan-cheng/p/9215371.html
Copyright © 2020-2023  润新知