中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

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

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

怎么利用echarts畫雷達圖和折柱混合

發布時間:2022-04-07 13:42:41 來源:億速云 閱讀:273 作者:iii 欄目:開發技術

本篇內容主要講解“怎么利用echarts畫雷達圖和折柱混合”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“怎么利用echarts畫雷達圖和折柱混合”吧!

導語

通常在根據設計圖寫echarts的時候,很多效果是官方實例里沒有的,我在代碼里加上了一些常用的效果,并做了注釋。

雷達圖

var option = {
    radar: [{
            //數據名稱
            indicator: [{
                            text: 'AIS未登記'
                    },
                    {
                            text: '巡邏發現'
                    },
                    {
                            text: '群眾舉報'
                    },
                    {
                            text: '其他'
                    },
                    {
                            text: '雷達發現'
                    }
            ],
            center: ['50%', '50%'],
            radius: 120,
            startAngle: 90,
            splitNumber: 4,
            shape: 'circle',
            axisName: {
                    formatter: '【{value}】',
                    color: '#428BD4'//顏色
            },
            splitArea: {
                    areaStyle: {
                            color: ['#7BD685', '#34B54B', '#70DEB3', '#4FC7A0'], //內部圈圈的顏色
                            shadowColor: 'rgba(0, 0, 0, 0.1)', //內部線的顏色
                            shadowBlur: 10
                    }
            },
            //線顏色
            axisLine: {
                    lineStyle: {
                            color: '#428BD4'
                    }
            },
            splitLine: {
                    lineStyle: {
                            color: 'rgba(211, 253, 250, 0.8)'
                    }
            }

    }],
    //鼠標放上懸浮展示的內容
    tooltip: {
            trigger: 'item'
    },
    series: [{
            name: '表特征分布',
            type: 'radar',
            symbol: 'circle', //拐點樣式
            symbolSize: 6, // 拐點的大小
            emphasis: {
                    lineStyle: {
                            width: 4
                    }
            },
            data: [{
                    value: [60, 5, 1, 1, 1500],
                    name: '',
                    areaStyle: {
                       color: '#C1BFA1'
                    }
                 }
            ]
    }]
};
var myChartecharts = echarts.init(document.getElementById('btzfb'));
myChartecharts.setOption(option);

效果

怎么利用echarts畫雷達圖和折柱混合

怎么利用echarts畫雷達圖和折柱混合

折柱圖

//
var optionbdtj = {
        tooltip: {
                trigger: 'axis',
                axisPointer: {
                        type: 'cross',
                        crossStyle: {
                                color: '#999'
                        }
                }
        },
        title: {},
        legend: {
                data: ['系統預警', '線下發現', '數量變動'],
                textStyle: {
                        color: '#7A7A7A'
                },
        },
        xAxis: [{
                type: 'category',
                data: ['1月', '2月', '3月', '4月'],
                axisPointer: {
                        type: 'shadow'
                },
                axisLine: {
                        lineStyle: { //改變xy軸線條的顏色
                                color: "#C3DCEA",
                                width: 1 //這里是為了突出顯示加上的
                        }
                },
                axisLabel: {
                        textStyle: { //改變xy軸上文字的顏色
                                color: "#75B4FC"
                        }
                }

        }],

        yAxis: [{
                        type: 'value',
                        name: '單位(艘)',
                        min: 0,
                        max: 1000,
                        interval: 200,
                        axisLine: {
                                lineStyle: { //改變xy軸線條的顏色
                                        color: "#E5F0F6",
                                        width: 1 //這里是為了突出顯示加上的
                                }
                        },
                        axisLabel: {
                                formatter: '{value} ',
                                color: '#B7B7B7'
                        },
                        splitLine: {
                                lineStyle: { //改變xy軸線條的顏色
                                        color: "#E5F0F6",
                                        width: 1 //這里是為了突出顯示加上的
                                }
                        },
                        nameTextStyle: {
                                color: '#B7B7B7'
                        }
                },
                {
                        type: 'value',
                        name: '單位(%)',
                        min: 0,
                        max: 100,
                        interval: 20, //間隔數
                        axisLine: {
                                lineStyle: { //改變xy軸線條的顏色
                                        color: "#E5F0F6",
                                        width: 1 //這里是為了突出顯示加上的
                                }
                        },
                        axisLabel: {
                                formatter: '{value} ',
                                color: '#B7B7B7'
                        },
                        splitLine: {
                                lineStyle: { //改變xy軸線條的顏色
                                        color: "#E5F0F6",
                                        width: 1 //這里是為了突出顯示加上的
                                }
                        },
                        nameTextStyle: {
                                color: '#B7B7B7'
                        }
                }
        ],
        series: [{
                        name: '系統預警',
                        type: 'bar',
                        barWidth: 15, // 柱子寬度
                        tooltip: {
                                valueFormatter: function(value) {
                                        return value + ' ';
                                }
                        },
                        itemStyle: {
                                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                                offset: 0,
                                                color: '#96DBCA'
                                        },
                                        {
                                                offset: 0.5,
                                                color: '#6EC9C6'
                                        },
                                        {
                                                offset: 1,
                                                color: '#43B6C3'
                                        }
                                ])
                        },
                        emphasis: {
                                itemStyle: {
                                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                                        offset: 0,
                                                        color: '#96DBCA'
                                                },
                                                {
                                                        offset: 0.7,
                                                        color: '#6EC9C6'
                                                },
                                                {
                                                        offset: 1,
                                                        color: '#43B6C3'
                                                }
                                        ])
                                }
                        },
                        data: [600, 400, 700, 230, 250, 760, 135, 162, 320, 200, 600, 300]
                },
                {
                        name: '線下發現',
                        type: 'bar',
                        barWidth: 15, // 柱子寬度
                        tooltip: {
                                valueFormatter: function(value) {
                                        return value + ' ';
                                }
                        },

                        itemStyle: {
                                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                                offset: 0,
                                                color: '#FEC52F'
                                        },
                                        {
                                                offset: 0.5,
                                                color: '#FEB32C'
                                        },
                                        {
                                                offset: 1,
                                                color: '#FE9F29'
                                        }
                                ])
                        },
                        emphasis: {
                                itemStyle: {
                                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                                        offset: 0,
                                                        color: '#FEC52F'
                                                },
                                                {
                                                        offset: 0.7,
                                                        color: '#FEB32C'
                                                },
                                                {
                                                        offset: 1,
                                                        color: '#FE9F29'
                                                }
                                        ])
                                }
                        },
                        data: [200, 200, 300, 400, 600, 100, 200, 230, 230, 160, 120, 610]
                },
                {
                        name: '數量變動',
                        type: 'line',
                        symbolSize: 8, //實心大小
                        symbol: 'circle', //實心
                        yAxisIndex: 1,
                        lineStyle: {
                                width: 3,
                                shadowColor: 'rgba(0, 216, 255, 1)', //陰影
                                shadowBlur: 8,
                                shadowOffsetY: 2
                        },
                        tooltip: {
                                valueFormatter: function(value) {
                                        return value + ' ';
                                }
                        },
                        itemStyle: {
                                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                                offset: 0,
                                                color: '#14D8FD'
                                        },
                                        {
                                                offset: 0.5,
                                                color: '#14D8FD'
                                        },
                                        {
                                                offset: 1,
                                                color: '#14D8FD'
                                        }
                                ])
                        },
                        data: [65, 46, 83, 57]
                }
        ]
};
var myChartbdtj = echarts.init(document.getElementById('bdtj'));
myChartbdtj.setOption(optionbdtj);

效果

怎么利用echarts畫雷達圖和折柱混合

怎么利用echarts畫雷達圖和折柱混合

到此,相信大家對“怎么利用echarts畫雷達圖和折柱混合”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!

向AI問一下細節

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

AI

芜湖市| 山东省| 昂仁县| 武城县| 禹城市| 新乡市| 阳曲县| 巴林左旗| 临漳县| 永和县| 临夏县| 高州市| 福鼎市| 和田县| 松阳县| 武威市| 丽水市| 常宁市| 滦平县| 瑞昌市| 茌平县| 屯昌县| 开鲁县| 沭阳县| 鄄城县| 霞浦县| 乐业县| 三亚市| 镇远县| 桃源县| 东台市| 探索| 昌宁县| 黄冈市| 宜兴市| 安达市| 成安县| 双桥区| 宁海县| 筠连县| 繁峙县|