F2 icon indicating copy to clipboard operation
F2 copied to clipboard

分组柱状图使用scrollBar 平移只有下面的x轴数字变了,图表内容没有变化

Open wisdom1314 opened this issue 2 years ago • 5 comments

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://f2.antv.vision/zh/examples/column/dodge#dodge

Steps to reproduce

/// 数据 data: [ { name: 'frist', year: '1951 年', sales: 38, }, { name: 'frist', year: '1952 年', sales: 52, }, { name: 'frist', year: '1956 年', sales: 61, }, { name: 'frist', year: '1957 年', sales: 145, }, { name: 'frist', year: '1958 年', sales: 48, }, { name: 'frist', year: '1959 年', sales: 38, }, { name: 'frist', year: '1960 年', sales: 38, }, { name: 'frist', year: '1962 年', sales: 38, },

  {
    name: 'second',
    year: '1951 年',
    sales: 30,
  },
  {
    name: 'second',
    year: '1952 年',
    sales: 12,
  },
  {
    name: 'second',
    year: '1956 年',
    sales: 31,
  },
  {
    name: 'second',
    year: '1957 年',
    sales: 105,
  },
  {
    name: 'second',
    year: '1958 年',
    sales: 418,
  },
  {
    name: 'second',
    year: '1959 年',
    sales: 18,
  },
  {
    name: 'second',
    year: '1960 年',
    sales: 118,
  },
  {
    name: 'second',
    year: '1962 年',
    sales: 28,
  },
]

]

/// 绘图 return ( <Chart data={data} scale={{ sales: { tickCount: 5, },

  }}>
  <Axis field="year" />
  <Axis field="sales" />
  <Interval x="year" y="sales" color="name" adjust={{ type: 'dodge', marginRatio: 0.05 }} />
  <ScrollBar mode="x" range={[0, 0.8]} autoFit={true} visible={true} pan={true}/>
</Chart>

)

Environment Info
f2 4.0.26
System -
Browser -

wisdom1314 avatar Nov 16 '22 01:11 wisdom1314

同样问题+1

Zeppo241 avatar Jan 16 '23 02:01 Zeppo241

修改pr:https://github.com/antvis/F2/pull/1710

tangying1027 avatar Jan 30 '23 11:01 tangying1027

同样问题+1

colaboy avatar May 15 '23 05:05 colaboy

修改pr:#1710

亲测可行👍🏻

Xav1erSue avatar May 23 '23 09:05 Xav1erSue

都已经有人pr了,为啥官方不能审核通过下呢

Zeng-J avatar Jul 26 '23 02:07 Zeng-J