G2Plot icon indicating copy to clipboard operation
G2Plot copied to clipboard

🤔 [QUESTION] 折线图 brush 功能

Open xuoutput opened this issue 2 years ago • 1 comments

🐛 Question description [Please make everyone to understand it]

https://github.com/antvis/G2Plot/issues/2865 折线图的 brush 功能什么时候开放呢 image

💻 Link to minimal reproduction

Please provide a link by forking these links g2plot or GitHub repo. What is a minimal reproduction, and why is it required?

🏞 Expected result

🚑 Any additional [like screenshots]

  • G2Plot Version:
  • Platform:

xuoutput avatar Aug 02 '22 05:08 xuoutput

https://github.com/antvis/G2Plot/issues/2865 这个不可以满足吗?

visiky avatar Sep 09 '22 09:09 visiky

import { Line } from '@antv/g2plot';

fetch('https://gw.alipayobjects.com/os/bmw-prod/1d565782-dde4-4bb6-8946-ea6a38ccf184.json')
  .then((res) => res.json())
  .then((data) => {
    const line = new Line('container', {
      data,
      padding: 'auto',
      xField: 'Date',
      yField: 'scales',
      xAxis: {
        // type: 'timeCat',
        tickCount: 5,
      },
      interactions:[{type:'brush-x'}]
    });

    line.render();
  });

visiky avatar Dec 10 '22 15:12 visiky