antvis / antvis/F2

type 为 timeCat 增加 pinch 事件

Open
#722 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

- [x] I have searched the [issues](https://github.com/antvis/f2/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://f2.antv.vision/zh/examples/line/basic#pan-smooth](https://f2.antv.vision/zh/examples/line/basic#pan-smooth)

### Steps to reproduce
```
const data = [{
date: '2019-08-08',
value: 20
}, {
date: '2019-08-09',
value: 20
}, {
date: '2019-08-10',
value: 20
}, {
date: '2019-08-11',
value: 20
}, {
date: '2019-08-12',
value: 20
}, {
date: '2019-08-13',
value: 20
}, {
date: '2019-08-14',
value: 20
}, {
date: '2019-08-15',
value: 20
}, {
date: '2019-08-16',
value: 20
}, {
date: '2019-08-17',
value: 20
}, {
date: '2019-08-18',
value: 20
}, {
date: '2019-08-19',
value: 20
}, {
date: '2019-08-20',
value: 20
}, {
date: '2019-08-21',
value: 20
}]

const chart = new F2.Chart({
id: 'container',
pixelRatio: window.devicePixelRatio
});

chart.source(data, {
date: {
type: 'cat'
}
});
chart.interaction('pan');
chart.interaction('pinch');
chart.line().position('date*value').shape('smooth');
chart.render();
```

### What is expected?
当 type 为 timeCat 类型时,图表放大之后,应该把之前隐藏的横坐标展示出来

### What is actually happening?
当 type 为 timeCat 类型时,图表放大之后,图表的横坐标间距变大,但是之前隐藏的横坐标没有展示出来。这个是要手动再设置横坐标吗?不能自动展示出来吗?

| Environment | Info |
|---|---|
| f2 | 3.4.3 |
| System | iOS12 |
| Browser | safari |

Contributor guide

Open the contributing guide

Research direction

Start with the linked pan-smooth reproduction and the chart.source, timeCat axis, and pinch interaction entry points shown in the example. Compare axis-label behavior before and after zooming on iOS Safari. Done means previously hidden horizontal-axis labels appear automatically after pinch zoom without requiring manual axis configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.