zoukankan      html  css  js  c++  java
  • Echart常用效果(一)

    代码实现

    option = {
        backgroundColor: '#080b30',
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                lineStyle: {
                    color: {
                        type: 'linear',
                        x: 0,
                        y: 0,
                        x2: 0,
                        y2: 1,
                        colorStops: [{
                            offset: 0,
                            color: 'rgba(0, 255, 233,0)'
                        }, {
                            offset: 0.5,
                            color: 'rgba(255, 255, 255,1)',
                        }, {
                            offset: 1,
                            color: 'rgba(0, 255, 233,0)'
                        }],
                        global: false
                    }
                },
            },
        },
        legend: {
            data: ['趋势'],
            itemHeight  :10,
            textStyle: {
                color: 'white'
            },
            icon: 'circle',
            right:0,
        },
        grid: {
            top: '15%',
            left: '5%',
            right: '5%',
            bottom: '15%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            axisLine: {
                show: false
            },
            axisTick: {
                show: false,
            },
            splitArea: {
                color: '#f00',
                lineStyle: {
                    color: '#f00'
                },
            },
            axisLabel: {
                color: '#fff'
            },
            splitLine: {
                show: false
            },
            boundaryGap: false,
            data: ['1', '2', '3', '4', '5', '6','7','8','9','10',
                    '11', '12', '13', '14', '15', '16','17','18','19','20',
                    '21', '22', '23', '24', '25', '26','27','28','29','30','31'
                ],
    
        }],
    
        yAxis: [{
            type: 'value',
            splitNumber: 4,
            splitLine: {
                show: true,
                lineStyle: {
                    color: 'rgba(255,255,255,0.1)'
                }
            },
            axisLine: {
                show: true,
            },
            axisLabel: {
                show: true,
                textStyle: {
                    color: 'white',
    
                },
            },
            axisTick: {
                show: false,
            },
        }],
        series: [
            {
                name: '趋势',
                type: 'line',
                smooth: true, //是否平滑
                symbol: 'none',
                
                lineStyle: {
                    normal: {
                        color: "#fa517a",
                        shadowColor: 'rgba(0, 0, 0, .3)',
                        shadowBlur: 0,
                        shadowOffsetY: 5,
                        shadowOffsetX: 5,
                    },
                },
                label: {
                    show: false,
                    position: 'top',
                    textStyle: {
                        color: '#00ca95',
                    }
                },
                itemStyle: {
                    color: "#f9527d",
                    borderColor: "#fff",
                    borderWidth: 3,
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 2,
                    shadowOffsetX: 2,
                    show:false,
                },
                tooltip: {
                    show: true
                },
                areaStyle: {
                    normal: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: 'rgba(250,81,122,0.3)'
                            },
                            {
                                offset: 1,
                                color: 'rgba(250,81,122,0)'
                            }
                        ], false),
                        shadowColor: 'rgba(250,81,122,0.1)',
                        shadowBlur: 20
                    }
                },
                data: [632 ,760, 980, 911, 922, 857, 712, 660, 999, 731,
                768 ,964, 888, 596, 423, 776, 992, 574, 629, 922, 857,
                672, 757, 658, 885, 760, 679, 813, 645, 988, 802],
            },
        ]
    };
    
  • 相关阅读:
    1. 规范说明
    Swing Jtable 添加checkbox列
    ubuntu 右键添加打开终端
    关闭ubuntu中的”System Program Problem Detected”提示
    activemq和mqtt消息总线
    Swing 自定义日期控件
    Swing Jtable 设置背景色
    Swing Jtable 网格线设置
    Java Swing Jtable 单元格不可编辑
    Java Swing JTable 设置隔行变色
  • 原文地址:https://www.cnblogs.com/jichi/p/13625753.html
Copyright © 2011-2022 走看看