zoukankan      html  css  js  c++  java
  • echarts配置项说明

    1、title

    title: {
        // 用于在 option 或者 API 中引用组件
        id: "myTitle",
        // 是否显示标题组件、[ default: true ]
        show: true,
        // 主标题文本、[ default: '' ]
        text: "图的标题",
        // 主标题文本超链接、[ default: '' ]
        link: "http://www.baidu.com/",
        // 指定窗口打开主标题超链接 、[ default: 'blank' ]、('self','blank')
        target: 'blank',
        // 标题样式
        textStyle: {
            // 主标题文字的颜色、[ default: '#333' ]
            color: "#666",
            // 主标题字体的样式、[ default: 'normal' ]、('normal'、'italic'、'oblique')
            fontStyle: "normal",
            // 主标题文字的字体粗细、[ default: normal ]、('normal'、'bold'、'bolder'、'lighter'、100 | 200 | 300 | 400...)
            fontWeight: "normal",
            // 主标题文字的字体家族、[ default: 'sans-serif' ]、('serif' , 'monospace', 'Arial', 'Courier New', 'Microsoft YaHei', ...)
            fontFamily: "Microsoft YaHei",
            // 主标题文字的字体大小、[ default: 18 ]
            fontSize: "14",
            // 主标题文字的行高
            // lineHeight: "10",
            // 文字块的宽度,不指定则自动是文字的宽度。
             "",
            // 文字块的高度,不指定则自动是文字的高度。
            height: "",
            // 文字本身的描边颜色、[ default: 'transparent' ]
            textBorderColor: "red",
            // 文字本身的描边宽度、[ default: 0 ]
            textBorderWidth: "",
            // 文字本身的阴影颜色、[ default: 'transparent' ]
            textShadowColor: "",
            // 文字本身的阴影长度、[ default: 0 ]
            textShadowBlur: "",
            // 文字本身的阴影 X 偏移、[ default: 0 ]
            textShadowOffsetX: "",
            // 文字本身的阴影 Y 偏移、[ default: 0 ]
            textShadowOffsetY: ""
        },
        // 副标题文本,支持使用 
     换行、[ default: '' ]
        subtext: "图的副标题 副标题
    副标题换行",
        // 副标题文本超链接、[ default: '' ]
        sublink: "https://www.echartsjs.com/zh/option.html",
        // 指定窗口打开副标题超链接、[ default: 'blank' ]
        subtarget: "",
        // 属性同主标题的文本样式
        subtextStyle: {},
        // 整体(包括 text 和 subtext)的水平对齐、[ default: 'auto' ]
        textAlign: "",
        // 整体(包括 text 和 subtext)的垂直对齐、[ default: 'auto' ]
        textVerticalAlign: "",
        // 是否触发事件、[ default: false ]
        triggerEvent: "",
        // 标题内边距,单位px,默认各方向内边距为5,接受数组分别设定上右下左边距、[ default: 5 ]
        padding: "",
        // 副标题之间的间距、[ default: 10 ]
        itemGap: 10,
        // 所有图形的 zlevel 值,zlevel 大的 Canvas 会放在 zlevel 小的 Canvas 的上面。
        zlevel: "",
        // 组件的所有图形的z值,z相比zlevel优先级更低,而且不会创建新的 Canvas。
        z: "",
        // grid 组件离容器左侧的距离,[ default: 'auto' ]
        left: "10",
        // grid 组件离容器上侧的距离,[ default: 'auto' ]
        top: "20",
        // grid 组件离容器右侧的距离
        right: "",
        // grid 组件离容器下侧的距离
        bottom: "",
        // 标题背景色,默认透明、[ default: 'transparent' ]
        backgroundColor: "#fff",
        // 标题的边框颜色,[ default: '#ccc' ]
        borderColor: "#f00",
        // 标题的边框线宽,[ default: 0 ]
        borderWidth: "1",
        // 边框圆角半径,单位px,支持传入数组分别指定 4 个圆角半径
        borderRadius: 5,
        // 图形阴影的模糊大小
        shadowBlur: 3,
        // 阴影颜色
        shadowColor: "rgba(0,0,0,.5)",
        // 阴影水平方向上的偏移距离
        shadowOffsetX: "2",
        // 阴影垂直方向上的偏移距离
        shadowOffsetY: "2"
    }
    

    2、legend

    legend: {
        // 图例的类型,['plain'、'scroll']
        // 'plain':普通图例。缺省就是普通图例。
        // 'scroll':可滚动翻页的图例。当图例数量较多时可以使用。
        type: "plain",
        // 组件 ID,用于在 option 或者 API 中引用组件
        id: "",
        // [ default: true ]
        show: "",
        // 所有图形的 zlevel 值,[ default: 0 ]
        zlevel: "",
        // 所有图形的z值,[ default: 2 ]
        z: "",
        // 图例组件离容器左侧的距离,[ default: 'auto' ]
        left: "",
        top: "",
        right: "",
        bottom: "",
        // 图例组件的宽度,[ default: 'auto' ]
         "",
        height: "",
        // 图例列表的布局朝向,[ default: 'horizontal' ]
        orient: "",
        // 图例标记和文本的对齐,根据组件的位置和 orient 决定
        align: "",
        // 图例内边距
        padding: "",
        // 图例每项之间的间隔
        itemGap: "",
        // 图例标记的图形宽度
        itemWidth: "",
        itemHeight: "",
        // 如果图标,是否在缩放时保持该图形的长宽比
        symbolKeepAspect: "",
        // 格式化图例文本,支持字符串模板和回调函数两种形式,[ default: null ]
        formatter: "",
        // 图例选择的模式,是否可以通过点击图例改变系列的显示状态,[ default: true ]
        selectedMode: "",
        // 图例关闭时的颜色
        inactiveColor: "",
        // 图例选中状态表
        selected: {},
        // 图例的公用文本样式
        textStyle: {
            color: "",
            fontStyle: "",
            fontWeight: "",
            fontFamily: "",
            fontSize: "",
            lineHeight: "",
            backgroundColor: "",
            borderColor: "",
            borderWidth: "",
            borderRadius: "",
            padding: "",
            shadowColor: "",
            shadowBlur: "",
            shadowOffsetX: "",
            shadowOffsetY: "",
             "",
            height: "",
            textBorderColor: "",
            textBorderWidth: "",
            textShadowColor: "",
            textShadowBlur: "",
            textShadowOffsetX: "",
            textShadowOffsetY: ""
        },
        // 图例的 tooltip 配置,配置项同 tooltip
        tooltip: "",
        // 图例项的 icon
        icon: "",
        // 图例的数据数组
        data: [
            {
                name: "",
                icon: "",
                textStyle: {}
            }
        ],
        // 图例背景色,默认透明,[ default: 'transparent' ]
        backgroundColor: "",
        borderColor: "",
        borderWidth: "",
        borderRadius: "",
        // 图形阴影的模糊大小
        shadowBlur: "",
        shadowColor: "",
        shadowOffsetX: "",
        shadowOffsetY: "",
        // 图例当前最左上显示项的 dataIndex,legend.type 为 'scroll' 时有效
        scrollDataIndex: "",
        // 图例控制块中,按钮和页信息之间的间隔,legend.type 为 'scroll' 时有效
        pageButtonItemGap: "",
        // 图例控制块和图例项之间的间隔,legend.type 为 'scroll' 时有效
        pageButtonGap: "",
        // 图例控制块的位置,legend.type 为 'scroll' 时有效
        pageButtonPosition: "",
        // 图例控制块中,页信息的显示格式,legend.type 为 'scroll' 时有效
        pageFormatter: "",
        // 图例控制块的图标,legend.type 为 'scroll' 时有效
        pageIcons: {
            horizontal: "",
            vertical: ""
        },
        // 翻页按钮的颜色
        pageIconColor: "",
        // 翻页按钮不激活时(即翻页到头时)的颜色
        pageIconInactiveColor: "",
        // 翻页按钮的大小
        pageIconSize: "",
        // 图例页信息的文字样式
        pageTextStyle: {
            color: "",
            fontStyle: "",
            fontWeight: "",
            fontFamily: "",
            fontSize: "",
            lineHeight: "",
             "",
            height: "",
            textBorderColor: "",
            textBorderWidth: "",
            textShadowColor: "",
            textShadowBlur: "",
            textShadowOffsetX: "",
            textShadowOffsetY: ""
        },
        // 图例翻页是否使用动画
        animation: "",
        // 图例翻页时的动画时长
        animationDurationUpdate: "",
        // 图例组件中的选择器按钮,目前包括全选和反选两种功能。默认不显示,用户可手动开启,也可以手动配置每个按钮的标题。
        selector: [],
        // 选择器按钮的文本标签样式
        selectorLabel: {
            show: "",
            distance: "",
            rotate: "",
            offset: [],
            color: "",
            fontStyle: "",
            fontWeight: "",
            fontFamily: "",
            fontSize: "",
            align: "",
            verticalAlign: "",
            lineHeight: "",
            backgroundColor: "",
            borderColor: "",
            borderWidth: "",
            borderRadius: "",
            padding: "",
            shadowColor: "",
            shadowBlur: "",
            shadowOffsetX: "",
            shadowOffsetY: "",
             "",
            height: "",
            textBorderColor: "",
            textBorderWidth: "",
            textShadowColor: "",
            textShadowBlur: "",
            textShadowOffsetX: "",
            textShadowOffsetY: ""
        },
        // 选择器的位置,[ default: 'auto' ]
        selectorPosition: "",
        // 选择器按钮之间的间隔,[ default: 7 ]
        selectorItemGap: "",
        // 选择器按钮与图例组件之间的间隔,[ default: 10 ]
        selectorButtonGap: ""
    }
    

    3、grid:

    直角坐标系内绘图网格,单个 grid 内最多可以放置上下两个 X 轴,左右两个 Y 轴

    grid: {
        id: "",
        show: "",
        zlevel: "",
        z: "",
        left: "",
        top: "",
        right: "",
        bottom: "",
         "",
        height: "",
        // grid 区域是否包含坐标轴的刻度标签,[ default: false ]
        containLabel: "",
        // 网格背景色,默认透明,[ default: 'transparent' ]
        backgroundColor: "",
        borderColor: "",
        borderWidth: "",
        // 图形阴影的模糊大小
        shadowBlur: "",
        shadowColor: "",
        shadowOffsetX: "",
        shadowOffsetY: "",
        tooltip: {
            show: "",
            trigger: "",
            axisPointer: "",
            position: "",
            formatter: "",
            backgroundColor: "",
            borderColor: "",
            borderWidth: "",
            padding: "",
            textStyle: {
                color: "",
                fontStyle: "",
                fontWeight: "",
                fontFamily: "",
                fontSize: "",
                lineHeight: "",
                 "",
                height: "",
                textBorderColor: "",
                textBorderWidth: "",
                textShadowColor: "",
                textShadowBlur: "",
                textShadowOffsetX: "",
                textShadowOffsetY: ""
    
            },
            // 额外附加到浮层的 css 样式
            extraCssText: ""
        },
    }
    

    4、xAxis

    xAxis: {
        id: "",
        show: "",
        // x 轴所在的 grid 的索引,默认位于第一个 grid, [ default: 0 ]
        gridIndex: "",
        // x 轴的位置
        position: "",
        // X 轴相对于默认位置的偏移,在相同的 position 上有多个 X 轴的时候有用
        offset: "",
        // 坐标轴类型
        type: "",
        // 坐标轴名称
        name: "",
        // 坐标轴名称显示位置
        nameLocation: "",
        // 坐标轴名称的文字样式
        nameTextStyle: {
            color: "",
            fontStyle: "",
            fontWeight: "",
            fontFamily: "",
            fontSize: "",
            align: "",
            verticalAlign: "",
            lineHeight: "",
            backgroundColor: "",
            borderColor: "",
            borderWidth: "",
            borderRadius: "",
            padding: "",
            shadowColor: "",
            shadowBlur: "",
            shadowOffsetX: "",
            shadowOffsetY: "",
             "",
            height: "",
            textBorderColor: "",
            textBorderWidth: "",
            textShadowColor: "",
            textShadowBlur: "",
            textShadowOffsetX: "",
            textShadowOffsetY: ""
        },
        // 坐标轴名称与轴线之间的距离
        nameGap: "",
        // 坐标轴名字旋转,角度值
        nameRotate: "",
        // 是否是反向坐标轴
        inverse: "",
        // 坐标轴两边留白策略,类目轴和非类目轴的设置和表现不一样
        boundaryGap: "",
        // 坐标轴刻度最小值
        min: "",
        // 坐标轴刻度最大值
        max: "",
        // 只在数值轴中(type: 'value')有效
        scale: "",
        // 坐标轴的分割段数
        splitNumber: "",
        // 自动计算的坐标轴最小间隔大小
        minInterval: "",
        // 自动计算的坐标轴最大间隔大小
        maxInterval: "",
        // 强制设置坐标轴分割间隔
        interval: "",
        // 对数轴的底数,只在对数轴中(type: 'log')有效
        logBase: "",
        // 坐标轴是否是静态无法交互
        silent: "",
        // 坐标轴的标签是否响应和触发鼠标事件,默认不响应
        triggerEvent: "",
        // 坐标轴轴线相关设置
        axisLine: {
            show: "",
            // X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上
            onZero: "",
            // 当有双轴时,可以用这个属性手动指定,在哪个轴的 0 刻度上
            onZeroAxisIndex: "",
            // 轴线两边的箭头
            symbol: "",
            // 轴线两边的箭头的大小
            symbolSize: "",
            // 轴线两边的箭头的偏移
            symbolOffset: "",
            lineStyle: {
                color: "",
                 "",
                type: "",
                shadowBlur: "",
                shadowColor: "",
                shadowOffsetX: "",
                shadowOffsetY: "",
                opacity: ""
            }
        },
        // 坐标轴刻度相关设置
        axisTick: {
            // 是否显示坐标轴刻度
            show: "",
            // 类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐
            alignWithLabel: "",
            // 坐标轴刻度的显示间隔
            interval: "",
            // 坐标轴刻度是否朝内,默认朝外
            inside: "",
            // 坐标轴刻度的长度
            length: "",
            lineStyle: {
                color: "",
                 "",
                type: "",
                shadowBlur: "",
                shadowColor: "",
                shadowOffsetX: "",
                shadowOffsetY: "",
                opacity: ""
            }
        },
        // 坐标轴刻度标签的相关设置
        axisLabel: {
            show: "",
            // 坐标轴刻度标签的显示间隔
            interval: "",
            // 刻度标签是否朝内,默认朝外
            inside: "",
            // 刻度标签旋转的角度,在类目轴的类目标签显示不下的时候可以通过旋转防止标签之间重叠
            rotate: "",
            // 刻度标签与轴线之间的距离
            margin: "",
            // 刻度标签的内容格式器,支持字符串模板和回调函数两种形式
            formatter: "",
            // 是否显示最小 tick 的 label
            showMinLabel: "",
            // 是否显示最大 tick 的 label
            showMaxLabel: "",
            // 刻度标签文字的颜色
            color: "",
            fontStyle: "",
            fontWeight: "",
            fontFamily: "",
            fontSize: "",
            align: "",
            verticalAlign: "",
            lineHeight: "",
            backgroundColor: "",
            borderColor: "",
            borderWidth: "",
            borderRadius: "",
            padding: "",
            shadowColor: "",
            shadowBlur: "",
            shadowOffsetX: "",
            shadowOffsetY: "",
             "",
            height: "",
            textBorderColor: "",
            textBorderWidth: "",
            textShadowColor: "",
            textShadowBlur: "",
            textShadowOffsetX: "",
            textShadowOffsetY: "",
        },
        // 坐标轴在 grid 区域中的分隔线
        splitLine: {
            show: "",
            interval: "",
            lineStyle: {
                color: "",
                 "",
                type: "",
                shadowBlur: "",
                shadowColor: "",
                shadowOffsetX: "",
                shadowOffsetY: "",
                opacity: ""
            }
        },
        // 坐标轴在 grid 区域中的分隔区域,默认不显示
        splitArea: {
            interval: "",
            show: "",
            areaStyle: {
                color: "",
                shadowColor: "",
                shadowBlur: "",
                shadowOffsetX: "",
                shadowOffsetY: "",
                opacity: "",
            }
        },
        data: {
            value: "",
            textStyle: {
                color: "",
                fontStyle: "",
                fontWeight: "",
                fontFamily: "",
                fontSize: "",
                align: "",
                verticalAlign: "",
                lineHeight: "",
                backgroundColor: "",
                borderColor: "",
                borderWidth: "",
                borderRadius: "",
                padding: "",
                shadowColor: "",
                shadowBlur: "",
                shadowOffsetX: "",
                shadowOffsetY: "",
                 "",
                height: "",
                textBorderColor: "",
                textBorderWidth: "",
                textShadowColor: "",
                textShadowBlur: "",
                textShadowOffsetX: "",
                textShadowOffsetY: ""
            }
        },
        axisPointer: {
            show: "",
            type: "",
            // 坐标轴指示器是否自动吸附到点上
            snap: "",
            z: "",
            label: {
                show: "",
                precision: "",
                formatter: "",
                margin: "",
                color: "",
                fontStyle: "",
                fontWeight: "",
                fontFamily: "",
                fontSize: "",
                lineHeight: "",
                 "",
                height: "",
                textBorderColor: "",
                textBorderWidth: "",
                textShadowColor: "",
                textShadowBlur: "",
                textShadowOffsetX: "",
                textShadowOffsetY: "",
                padding: "",
                backgroundColor: "",
                borderColor: "",
                borderWidth: "",
                shadowColor: "",
                shadowBlur: "",
                shadowOffsetX: "",
                shadowOffsetY: ""
            },
            lineStyle: {
    
            },
            shadowStyle: {
    
            },
            triggerTooltip: {
    
            },
            value: "",
            // 当前的状态
            status: "",
            // 拖拽手柄,适用于触屏的环境
            handle: {
                show: "",
                // 手柄的图标
                icon: "",
                size: "",
                margin: "",
                color: "",
                throttle: "",
                shadowBlur: "",
                shadowColor: "",
                shadowOffsetX: "",
                // 阴影垂直方向上的偏移距离
                shadowOffsetY: ""
            },
        },
        zlevel: "",
        z: ""
    }
    

    5、 tooltip

    tooltip: {
        // 是否显示
        show: "",
        // 触发类型、[ default: 'item' ]、['item','axis','none']
        trigger: "",
        // 坐标轴指示器配置项,是指示坐标轴当前刻度的工具
        axisPointer: {
            // 指示器类型、[ default: 'line' ]、['line'、'shadow'、'none'、'cross']
            type: "",
            // 指示器的坐标轴、[ default: 'auto' ]、['x', 'y', 'radius', 'angle']
            axis: "",
            // 坐标轴指示器是否自动吸附到点上
            snap: "",
            // 坐标轴指示器的 z 值,z值小的图形会被z值大的图形覆盖
            z: "",
            label: {
                // 是否显示文本标签
                show: "",
                // 文本标签中数值的小数点精度,默认根据当前轴的值自动判断。可以指定如 2 表示保留两位小数
                precision: "",
                // 文本标签文字的格式化器
                formatter: "",
                // label 距离轴的距离
                margin: 3,
                // 文字的颜色
                color: '#fff',
                // 文字字体的风格
                fontStyle: 'normal',
                // 文字字体的粗细
                fontWeight: normal,
                // 文字的字体系列
                fontFamily: 'sans-serif',
                // 文字的字体大小
                fontSize: 12,
                // 行高
                lineHeight: "",
                 "",
                height: "",
                // 文字本身的描边颜色
                textBorderColor: 'transparent',
                textBorderWidth: 0,
                textShadowColor: 'transparent',
                // 文字本身的阴影长度
                textShadowBlur: 0,
                textShadowOffsetX: 0,
                textShadowOffsetY: 0,
                padding: [5, 7, 5, 7],
                backgroundColor: 'auto',
                borderColor: null,
                borderWidth: 0,
                shadowBlur: 3,
                shadowColor: "#aaa",
                shadowOffsetX: 0,
                shadowOffsetY: 0,
            },
            lineStyle: {
                // 线的颜色
                color: "#555",
                // 线宽
                 1,
                // 线的类型
                type: solid,
                // 图形阴影的模糊大小
                shadowBlur: "",
                shadowColor: "",
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                // 图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形
                opacity: "",
            },
            shadowStyle: {
                // 填充的颜色
                color: "",
                shadowBlur: "",
                shadowColor: "",
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                opacity: "",
            },
            crossStyle: {
                color: "#555",
                 1,
                type: dashed,
                shadowBlur: "",
                shadowColor: "",
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                opacity: "",
            },
            animation: true,
            // 是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。
            animationThreshold: 2000,
            animationDuration: 1000,
            animationEasing: cubicOut,
            animationDelay: 0,
            // 数据更新动画的时长
            animationDurationUpdate: 200,
            // 数据更新动画的缓动效果
            animationEasingUpdate: "",
            animationDelayUpdate: 0,
        },
        // 是否显示提示框浮层
        showContent: true,
        // 是否永远显示提示框内容
        alwaysShowContent: false,
        // 提示框触发的条件
        triggerOn: "",
        // 浮层显示的延迟
        showDelay: 0,
        // 浮层隐藏的延迟
        hideDelay: 100,
        // 鼠标是否可进入提示框浮层中
        enterable: false,
        // 浮层的渲染模式
        renderMode: 'html',
        // 是否将 tooltip 框限制在图表的区域内
        confine: false,
        // 提示框浮层的移动动画过渡时间
        transitionDuration: 0.4,
        position: "",
        formatter: "",
        backgroundColor: "",
        borderColor: '#333',
        borderWidth: 0,
        padding: 5,
        textStyle: {
            color: '#fff',
            fontStyle: 'normal',
            fontWeight: normal,
            fontFamily: 'sans-serif',
            fontSize: 14,
            lineHeight: "",
             "",
            height: "",
            textBorderColor: 'transparent',
            textBorderWidth: 0,
            textShadowColor: 'transparent',
            textShadowBlur: 0,
            textShadowOffsetX: 0,
            textShadowOffsetY: 0,
        },
        // 额外附加到浮层的 css 样式
        extraCssText: ""
    }
    

    6、 series

    series: [
        {
            type: 'line',
            id: "",
            // 系列名称,用于tooltip的显示,legend 的图例筛选, 在 setOption 更新数据和配置项时用于指定对应的系列
            name: "",
            // 该系列使用的坐标系
            coordinateSystem: 'cartesian2d',
            // 使用的 x 轴的 index
            xAxisIndex: 0,
            yAxisIndex: 0,
            polarIndex: 0,
            // 标记的图形。
            symbol: 'emptyCircle',
            // 标记的大小
            symbolSize: 4,
            // 标记的旋转角度
            symbolRotate: "",
            // 如果 symbol 是 path:// 的形式,是否在缩放时保持该图形的长宽比
            symbolKeepAspect: false,
            // 标记相对于原本位置的偏移。
            symbolOffset: [0, 0],
            // 是否显示 symbol
            showSymbol: true,
    
            showAllSymbol: 'auto',
            // 是否开启 hover 在拐点标志上的提示动画效果
            hoverAnimation: true,
            // 是否启用图例 hover 时的联动高亮
            legendHoverLink: true,
            // 数据堆叠,同个类目轴上系列配置相同的stack值后,后一个系列的值会在前一个系列的值上相加。
            stack: null,
            // 鼠标悬浮时在图形元素上时鼠标的样式是什么
            cursor: 'pointer',
            // 是否连接空数据
            connectNulls: false,
            // 是否裁剪超出坐标系部分的图形
            clip: true,
            // 是否是阶梯线图
            step: false,
        },
        {
            type: 'bar',
            id: "",
            name: "",
            legendHoverLink: true,
            // 该系列使用的坐标系
            coordinateSystem: 'cartesian2d',
            xAxisIndex: 0,
            yAxisIndex: 0,
        },
        {
            type: 'pie',
            id: "",
            name: "",
            legendHoverLink: true,
            // 是否开启 hover 在扇区上的放大动画效果
            hoverAnimation: true,
            // 高亮扇区的偏移距离
            hoverOffset: 10,
            // 选中模式,表示是否支持多个选中,默认关闭
            selectedMode: false,
            // 选中扇区的偏移距离
            selectedOffset: 10,
            // 饼图的扇区是否是顺时针排布
            clockwise: true,
            // 起始角度,支持范围[0, 360]
            startAngle: 90,
            // 最小的扇区角度(0 ~ 360),用于防止某个值过小导致扇区太小影响交互。
            minAngle: 0,
            // 小于这个角度(0 ~ 360)的扇区,不显示标签(label 和 labelLine)
            minShowLabelAngle: 0,
            // 是否展示成南丁格尔图,通过半径区分数据大小
            roseType: false,
            // 是否启用防止标签重叠策略,默认开启
            avoidLabelOverlap: true,
            // 是否在数据和为0(一般情况下所有数据为0) 的时候不显示扇区
            stillShowZeroSum: true,
            // 鼠标悬浮时在图形元素上时鼠标的样式是什么
            cursor: 'pointer',
            label: {
                show: false,
                // 标签的位置
                position: 'outside',
                formatter: "",
                rotate: null,
                color: '#fff',
                fontStyle: 'normal',
                fontWeight: normal,
                fontFamily: 'sans-serif',
                fontSize: 12,
                align: "",
                verticalAlign: "",
                lineHeight: "",
                backgroundColor: 'transparent',
                borderColor: 'transparent',
                borderWidth: 0,
                borderRadius: 0,
                padding: 0,
                shadowColor: 'transparent',
                shadowBlur: 0,
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                 "",
                height: "",
                textBorderColor: 'transparent',
                textBorderWidth: 0,
                textShadowColor: 'transparent',
                textShadowBlur: 0,
                textShadowOffsetX: 0,
                textShadowOffsetY: 0,
            },
            labelLine: {
                // 是否显示视觉引导线。
                show: "",
                // 视觉引导线第一段的长度
                length: "",
                // 视觉引导项第二段的长度。
                length2: "",
                // 是否平滑视觉引导线,默认不平滑
                smooth: false,
                lineStyle: {
                    color: '#000',
                     1,
                    type: solid,
                    shadowBlur: "",
                    shadowColor: "",
                    shadowOffsetX: 0,
                    shadowOffsetY: 0,
                    opacity: "",
                },
                // 图形样式
                itemStyle: {
                    color: 自适应,
                    borderColor: '#000',
                    borderWidth: 0,
                    borderType: 'solid',
                    shadowBlur: "",
                    shadowColor: "",
                    shadowOffsetX: 0,
                    shadowOffsetY: 0,
                    opacity: "",
                },
                // 高亮的扇区和标签样式
                emphasis: {},
                zlevel: 0,
                z: 2,
                center: ['50%', '50%'],
                radius: [0, '75%'],
                seriesLayoutBy: 'column',
                datasetIndex: 0,
                data: [{}],
                markPoint: {},
                markLine: {},
                markArea: {},
                silent: false,
                animationType: 'expansion',
                animationTypeUpdate: 'transition',
                animation: true,
                animationThreshold: 2000,
                animationDuration: 1000,
                animationEasing: cubicOut,
                animationDelay: 0,
                animationDurationUpdate: 300,
                animationEasingUpdate: cubicOut,
                animationDelayUpdate: 0,
            },
            tooltip: {},
        }
    ]
    
  • 相关阅读:
    使用a标签制作tooltips
    使用editorconfig配置你的编辑器
    JointJS绘制流程图
    用highcharts展现你的数据
    css段落首字母下沉
    sklearn框架的系统学习
    numpy删除二维数据矩阵的行和列
    sklearn中机器学习算法评价指标
    sklearn调用逻辑回归算法
    sklearn调用多项式回归
  • 原文地址:https://www.cnblogs.com/consider/p/11730923.html
Copyright © 2011-2022 走看看