Skip to content
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

type 为 timeCat 增加 pinch 事件 #722

Open
1 task done
amazinglisa opened this issue Dec 2, 2019 · 3 comments
Open
1 task done

type 为 timeCat 增加 pinch 事件 #722

amazinglisa opened this issue Dec 2, 2019 · 3 comments

Comments

@amazinglisa
Copy link

amazinglisa commented Dec 2, 2019

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

Reproduction link

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
@amazinglisa
Copy link
Author

amazinglisa commented Dec 2, 2019

而且加了缩放之后,触点在图表上的时候影响页面的上下滑动

#572

@miaosongjing
Copy link

你的问题解决了吗?

@jhwzeishuai
Copy link

同问 解决了么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants