Skip to content

[Bug] do not combine dates on the chart line, when setting "stack" and type: 'time' #16766

@lexoring

Description

@lexoring

Version

5.3.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html

Steps to Reproduce

option = {
  legend: {},
  xAxis: {
    type: 'time', min: '2018-08-09 10:00:00',
    name: 'Date',
  },
  yAxis: {
    type: 'category',
  },
  dataset: [
    {
      id: 'q1',
      source: [
        ['nm1', 'er1', 'er2'],
        ['bar', '2018-08-10 10:00:00', '2018-08-11 20:00:00'],
      ]
    }
  ],

  series: [
      { type: 'bar',  datasetId: 'q1', stack: 'bar1', name: 'start',
          encode: {
            x: 'er1',
            y: 'nm1'
          },
        itemStyle: {
          color: 'red'
        },
      },
      { type: 'bar', datasetId: 'q1',  stack: 'bar1', name: 'end',
          encode: {
            x: 'er2',
            y: 'nm1'
          },
        itemStyle: {
          color: 'blue'
        }
      }
  ]

};

Current Behavior

do not combine dates on the graph line when setting "stack".

If you specify the data as a date and combine it through a stack, then the graph is superimposed on each other. The stack does not work for type: 'time', but if you specify type: 'value ', then everything works.

Expected Behavior

So that the schedule does not overlap with each other

Environment

- OS:windows 10
- Browser: Chrome 98
- Framework: -

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions