echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Is it possible to create a 'step line chart' with echarts?

Open cosmicscr opened this issue 10 years ago • 2 comments

问题简述 (One-line summary)

Is it possible to create a 'step line chart' with echarts?

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):
  • 浏览器类型和版本 (Browser version):
  • 操作系统类型和版本 (OS Version):

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

I can't find any documentation or examples for a step line area chart that would look something like this: screen shot 2016-10-14 at 4 18 01 pm

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

option = {

}

其他信息 (Other comments)

cosmicscr avatar Oct 14 '16 22:10 cosmicscr

FYI http://echarts.baidu.com/demo.html#line-step

100pah avatar Oct 15 '16 14:10 100pah

that linked example solves for if your x-axis is of type "category", what about if your x-axis is of type "value" and your series data looks something like this? is it possible to create a step line chart w/o a "category" x-axis?

xAxis : [
        {
            type : 'value',
            scale: true
        }
    ],
    yAxis : [
        {
            type : 'value',
            scale: true
        }
    ],
series: {
            type:'line',
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data: [
                [90,45],
                [92,40],
                [94,25],
                [97,20],
                [98,17],
                [98.5,13],
                [99,4],
                [99.5, 1],
                [100,0],
                [100.5, 1],
                [101, 3],
                [102,5],
                [102.5, 8],
                [103,18],
                [104,23],
                [105,29],
                [107,34],
                [108,39]
            ]
        }

evan-coygo avatar Jul 03 '19 19:07 evan-coygo