ECharts timeline 设置图形/轴线/标签的颜色

ECharts About 904 words

itemStyle lineStyle label

设置各种组件样式颜色。

const option = {
    itemStyle: {
      color: 'red',
      opacity: 1,
    },
    lineStyle: {
      color: 'red',
      opacity: 1,
    },
    label: {
      color: 'red',
      opacity: 0.4,
    },
};

progress

设置切换时的各种组件样式颜色。

const option = {
    progress: {
      itemStyle: {
        color: 'red',
        opacity: 0.4,
      },
      lineStyle: {
        color: 'red',
        opacity: 0.4,
      },
      label: {
        color: 'red',
        opacity: 1,
      },	
    },
};

checkpointStyle

当前选中项的颜色。

const option = {
    checkpointStyle: {
        color: 'red',
        opacity: 1,
    },
};

emphasis

鼠标悬停高亮显示时,标签和图形的颜色。

const option = {
    emphasis: {
        label: {
            color: 'red',
        },
        itemStyle: {
            color: 'red',
            opacity: 1,
        },
    },
};

文档

https://echarts.apache.org/zh/option.html#timeline

Views: 13 · Posted: 2026-03-21

———         Thanks for Reading         ———

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Prev Post
Today In History
Browsing Refresh