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

BUG - heatmap zoom and drag is very slow #2455

Closed
matheuslbenachio opened this issue May 13, 2020 · 1 comment
Closed

BUG - heatmap zoom and drag is very slow #2455

matheuslbenachio opened this issue May 13, 2020 · 1 comment

Comments

@matheuslbenachio
Copy link

  • G2 Version: 4.0.7
  • Platform: MacOS Chrome
  • Mini Showcase(like screenshots):

May-13-2020 12-33-34

  • CodePen Link:
import { Chart } from '@antv/g2';

fetch('https://g2.antv.vision/en/examples/data/heatmap.json')
  .then(res => res.json())
  .then(data => {
    const chart = new Chart({
      container: 'container',
      autoFit: true,
      height: 500,
      padding: [0, 30, 60, 30]
    });
    chart.data(data);
    chart.scale({
      tmp: { nice: true }
    });
    chart.tooltip({
      showTitle: false
    });
    chart.axis(false);
    chart.legend({
      offset: 10
    });
    chart.heatmap()
      .position('g*l')
      .color('tmp', '#F51D27-#FA541C-#FF8C12-#FFC838-#FAFFA8-#80FF73-#12CCCC-#1890FF-#6E32C2');
    chart.annotation().image({
      start: ['min', 'max'],
      end: ['max', 'min'],
      src: 'https://gw.alipayobjects.com/zos/rmsportal/NeUTMwKtPcPxIFNTWZOZ.png',
    });
    chart.render();
  });

When you add the code chart.interaction('view-zoom'); to a heat map, the zoom and drag become very very slow. This doesn't happen with other charts such as the line chart or bar chart.

@simaQ How can I fix this?

@matheuslbenachio matheuslbenachio changed the title BUG BUG - heatmap zoom and drag is very slow May 13, 2020
@hustcc
Copy link
Member

hustcc commented Aug 22, 2023

Sorry, due to problems in the program's architecture design, we are unable to effectively fix the issues. You can have a try with G2 v5.

@hustcc hustcc closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants