盒须图完整配置

{
    "backgroundColor": "#fff",
    "title": {
        "show": true,
        "text": "盒须图",
        "textStyle": {
            "fontSize": 14,
            "fontFamily": "Microsoft YaHei,PingFang SC Regular",
            "fontWeight": "800",
            "color": "#333"
        },
        "left": "left",
        "top": "top"
    },
    "grid": [
        {
            "left": "80px",
            "right": "70px",
            "bottom": "60px",
            "top": "50px"
        }
    ],
    "dataZoom": [
        {
            "show": false,
            "height": 20,
            "start": 0,
            "end": 100,
            "bottom": 22
        }
    ],
    "tooltip": {
        "show": true,
        "textStyle": {
            "fontSize": 12,
            "color": "#666"
        },
        "confine": true,
        "backgroundColor": "#fff",
        "borderColor": "#fff",
        "triggerOn": "mousemove"
    },
    "xAxis": [
        {
            "type": "category",
            "name": "",
            "show": true,
            "splitLine": {
                "show": false,
                "lineStyle": {
                    "color": "",
                    "type": "dashed"
                }
            },
            "axisLine": {
                "show": true,
                "margin": 8,
                "lineStyle": {
                    "textAlign": "left",
                    "color": ""
                }
            },
            "axisLabel": {
                "show": true,
                "rotate": "0",
                "textStyle": {
                    "fontSize": 12,
                    "color": ""
                }
            },
            "axisTick": {
                "alignWithLabel": false
            },
            "data": [
                "box1",
                "box2",
                "box3",
                "box4",
                "box5"
            ]
        }
    ],
    "yAxis": {
        "type": "value",
        "show": true,
        "name": "",
        "splitLine": {
            "show": true,
            "lineStyle": {
                "color": "",
                "type": "solid"
            }
        },
        "axisLine": {
            "show": true,
            "lineStyle": {
                "color": ""
            }
        },
        "axisLabel": {
            "formatter": "{value}",
            "show": true,
            "textStyle": {
                "fontSize": 12,
                "color": ""
            }
        }
    },
    "series": [
        {
            "name": "",
            "type": "boxplot",
            "data": [
                {
                    "value": [
                        655,
                        850,
                        940,
                        980,
                        1175
                    ],
                    "itemStyle": {
                        "color": "rgba(0, 0, 0, 0)"
                    }
                },
                {
                    "value": [
                        672,
                        800,
                        845,
                        885,
                        1012
                    ],
                    "itemStyle": {
                        "color": "rgba(0, 0, 0, 0)"
                    }
                },
                {
                    "value": [
                        780,
                        840,
                        855,
                        880,
                        940
                    ],
                    "itemStyle": {
                        "color": "rgba(0, 0, 0, 0)"
                    }
                },
                {
                    "value": [
                        621,
                        767,
                        815,
                        865,
                        1011
                    ],
                    "itemStyle": {
                        "color": "rgba(0, 0, 0, 0)"
                    }
                },
                {
                    "value": [
                        713,
                        807,
                        850,
                        970,
                        1063
                    ],
                    "itemStyle": {
                        "color": "rgba(0, 0, 0, 0)"
                    }
                }
            ],
            "colorBy": "data",
            "color": [
                {
                    "x": "0",
                    "y": "0",
                    "x2": "1",
                    "y2": "0",
                    "type": "linear",
                    "global": false,
                    "colorStops": [
                        {
                            "offset": 0,
                            "color": "rgba(136,170,255,1)"
                        },
                        {
                            "offset": 1,
                            "color": "rgba(136,170,255,1)"
                        }
                    ]
                },
                {
                    "x": "0",
                    "y": "0",
                    "x2": "1",
                    "y2": "0",
                    "type": "linear",
                    "global": false,
                    "colorStops": [
                        {
                            "offset": 0,
                            "color": "rgba(154,233,161,1)"
                        },
                        {
                            "offset": 1,
                            "color": "rgba(154,233,161,1)"
                        }
                    ]
                },
                {
                    "x": "0",
                    "y": "0",
                    "x2": "1",
                    "y2": "0",
                    "type": "linear",
                    "global": false,
                    "colorStops": [
                        {
                            "offset": 0,
                            "color": "rgba(136,170,255,1)"
                        },
                        {
                            "offset": 1,
                            "color": "rgba(136,170,255,1)"
                        }
                    ]
                },
                {
                    "x": "0",
                    "y": "0",
                    "x2": "1",
                    "y2": "0",
                    "type": "linear",
                    "global": false,
                    "colorStops": [
                        {
                            "offset": 0,
                            "color": "rgba(154,233,161,1)"
                        },
                        {
                            "offset": 1,
                            "color": "rgba(154,233,161,1)"
                        }
                    ]
                },
                {
                    "x": "0",
                    "y": "0",
                    "x2": "1",
                    "y2": "0",
                    "type": "linear",
                    "global": false,
                    "colorStops": [
                        {
                            "offset": 0,
                            "color": "rgba(136,170,255,1)"
                        },
                        {
                            "offset": 1,
                            "color": "rgba(136,170,255,1)"
                        }
                    ]
                }
            ]
        },
        {
            "type": "scatter",
            "data": [
                {
                    "value": [
                        "box1",
                        1200
                    ],
                    "itemStyle": {
                        "color": {
                            "x": "0",
                            "y": "0",
                            "x2": "1",
                            "y2": "0",
                            "type": "linear",
                            "global": false,
                            "colorStops": [
                                {
                                    "offset": 0,
                                    "color": "rgba(136,170,255,1)"
                                },
                                {
                                    "offset": 1,
                                    "color": "rgba(136,170,255,1)"
                                }
                            ]
                        }
                    }
                },
                {
                    "value": [
                        "box2",
                        1050
                    ],
                    "itemStyle": {
                        "color": {
                            "x": "0",
                            "y": "0",
                            "x2": "1",
                            "y2": "0",
                            "type": "linear",
                            "global": false,
                            "colorStops": [
                                {
                                    "offset": 0,
                                    "color": "rgba(154,233,161,1)"
                                },
                                {
                                    "offset": 1,
                                    "color": "rgba(154,233,161,1)"
                                }
                            ]
                        }
                    }
                },
                {
                    "value": [
                        "box3",
                        1000
                    ],
                    "itemStyle": {
                        "color": {
                            "x": "0",
                            "y": "0",
                            "x2": "1",
                            "y2": "0",
                            "type": "linear",
                            "global": false,
                            "colorStops": [
                                {
                                    "offset": 0,
                                    "color": "rgba(136,170,255,1)"
                                },
                                {
                                    "offset": 1,
                                    "color": "rgba(136,170,255,1)"
                                }
                            ]
                        }
                    }
                },
                {
                    "value": [
                        "box4",
                        1150
                    ],
                    "itemStyle": {
                        "color": {
                            "x": "0",
                            "y": "0",
                            "x2": "1",
                            "y2": "0",
                            "type": "linear",
                            "global": false,
                            "colorStops": [
                                {
                                    "offset": 0,
                                    "color": "rgba(154,233,161,1)"
                                },
                                {
                                    "offset": 1,
                                    "color": "rgba(154,233,161,1)"
                                }
                            ]
                        }
                    }
                },
                {
                    "value": [
                        "box5",
                        1120
                    ],
                    "itemStyle": {
                        "color": {
                            "x": "0",
                            "y": "0",
                            "x2": "1",
                            "y2": "0",
                            "type": "linear",
                            "global": false,
                            "colorStops": [
                                {
                                    "offset": 0,
                                    "color": "rgba(136,170,255,1)"
                                },
                                {
                                    "offset": 1,
                                    "color": "rgba(136,170,255,1)"
                                }
                            ]
                        }
                    }
                }
            ]
        }
    ]
}
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容