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] visualMap not applying correctly for scatterGL with progressive Rendering #524

Open
MatthiasMert opened this issue May 3, 2024 · 1 comment

Comments

@MatthiasMert
Copy link

MatthiasMert commented May 3, 2024

Just wanted to document the very strange behaviour of scatterGL + visualMap + progressive rendering

Example:

import * as echarts from 'echarts';
import 'echarts-gl';

var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;

const data = Array.from(Array(5000), (x, i) => [i, Math.random() * 100]);

option = {
  xAxis: {},
  yAxis: {},
  visualMap: {
    min: 0,
    max: 100,
    dimension: 1,
    text: ['HIGH', 'LOW'],
    calculable: true,
    inRange: {
      color: ['blue', 'green', 'yellow', 'red']
    }
  },
  series: [
    {
      type: 'scatterGL',
      data: data,
      symbolSize: 5,
      progressiveThreshold: 100,
      progressive: 1000
    }
  ]
};

option && myChart.setOption(option);

VisualMap is only applying correctly for the first progressivly rendered block (until datapoint 1000). Afterwards visualMap seems to be apllied randomly. Issue becomes more clear when moving the handle on the visualMap component to filter data. (also shows up on the internal progressiveThreshold of 100000 if not set)

@MatthiasMert MatthiasMert changed the title [BUG] visualMap not applying correctly for scatterGl when progressive and progressiveThreshold is set [BUG] visualMap not applying correctly for scatterGL with progressiveRandering May 3, 2024
@MatthiasMert MatthiasMert changed the title [BUG] visualMap not applying correctly for scatterGL with progressiveRandering [BUG] visualMap not applying correctly for scatterGL with progressive Rendering May 3, 2024
@helgasoft
Copy link

helgasoft commented May 24, 2024

Default progressive value is 100000. Workaround is to not change it, or to make it bigger than data size.

Revision

Yes, there is a bug with visualMap.
When both progressiveThreshold and progressive values are larger than data size (5000), then visualMap works fine.
When both progressiveThreshold and progressive values are smaller than data size (5000), then visualMap works correctly for the first progressive number of points (1000), the other points are randomly colored.

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

2 participants