| 柱状图 | series: [{
    name: ‘语文’,
    type: ‘bar’,
    markPoint: { // 标记点
    data: [{
    type: ‘max’,
    name: ‘最大值’
    }, {
    type: ‘min’,
    name: ‘最小值’
    }]
    },
    markLine: { // 标记线
    data: [{
    type: ‘average’,
    name: ‘平均值’
    }]
    },
    // label: { // 柱状图上的文字设置
    // show: true, // 是否显示
    // rotate: 60, // 旋转角度
    // position: ‘top’ // 显示位置
    // },
    barWidth: ‘30%’, // 柱的宽度
    }] | | —- | —- | | pie | Echarts - 图1
    legend: {
    show: true, //是否显示
    type: “plain”, // 图例的类型 ‘plain’:普通图例 ‘scroll’:可滚动翻页的图例
    zlevel: 1, // 所有图形的 zlevel 值。
    icon: “circle”,
    top: “5%”, // bottom:”20%” // 组件离容器的距离
    right: “5%”, //left:”10%” // // 组件离容器的距离
    width: “auto”, // 图例组件的宽度
    height: “auto”, // 图例组件的高度
    orient: “horizontal”, // 图例列表的布局朝向。 ‘horizontal’ ‘vertical’
    align: “auto”, // 图例标记和文本的对齐
    padding: 5, // 图例内边距
    itemWidth: 6, // 图例标记的图形宽度。
    itemGap: 20, // 图例每项之间的间隔。
    itemHeight: 14, // 图例标记的图形高度。
    formatter: function (name) {
    return ‘{a|text}{a| }{b|’ + name + ‘}’
    },
    selectedMode: true, // 图例选择的模式,
    inactiveColor: “#ccc”, // 图例关闭时的颜色。
    textStyle: {
    color: “#556677”, // 文字的颜色。
    fontStyle: “normal”, // 文字字体的风格。
    fontWeight: “normal”, // 文字字体的粗细。
    fontFamily: “sans-serif”, // 文字的字体系列。
    fontSize: 12, // 文字的字体大小。
    },
    }, | |
    |
    |