New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset in Echarts 4 does not work properly with line series that have the stack prop. #7535

Closed
lzp4ever opened this Issue Jan 19, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@lzp4ever

lzp4ever commented Jan 19, 2018

One-line summary [问题简述]

Dataset in Echarts 4 does not work properly with line series that have the stack prop.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.0.2
  • Browser version [浏览器类型和版本]: chrome 65
  • OS Version [操作系统类型和版本]: arch linux

Expected behaviour [期望结果]

Like the option below, with 4 series 'a', 'b', 'c', 'd' that have the same stack prop, should add up by order, always be 'a' < 'b' < 'c' < 'd'.
But the result is strange, the order is wrong, and lines even cross each other.

ECharts option [ECharts配置项]

option = {
  legend: {},
  tooltip: {
    trigger: 'axis',
  },
  dataset: {
    source: [
      ['order', '1', '2', '3', '4', '5', '6'],
      ['a', 41.1, 30.4, 65.1, 53.3, 83.8, 98.7],
      ['b', 86.5, 92.1, 85.7, 83.1, 73.4, 55.1],
      ['c', 24.1, 67.2, 79.5, 86.4, 65.2, 82.5],
      ['d', 55.2, 67.1, 69.2, 72.4, 53.9, 39.1],
    ],
  },
  xAxis: { type: 'category' },
  yAxis: { gridIndex: 0 },
  series: [
    { type: 'line', stack: 'sameStack', smooth: true, seriesLayoutBy: 'row' },
    { type: 'line', stack: 'sameStack', smooth: true, seriesLayoutBy: 'row' },
    { type: 'line', stack: 'sameStack', smooth: true, seriesLayoutBy: 'row' },
    { type: 'line', stack: 'sameStack', smooth: true, seriesLayoutBy: 'row' },

  ],
};

Other comments [其他信息]

JSFiddle: http://jsfiddle.net/cj31rtpf/35/

@pissang pissang added the bug label Jan 19, 2018

@100pah 100pah closed this in bf0df08 Feb 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment