finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
7.95k stars 1.06k forks source link

Charts are not being scaled down on data change #2448

Open fibinger opened 7 months ago

fibinger commented 7 months ago

Feature Request

Description of Problem:

When chart requires more space to display its content, it gets re-scaled. When data changes, so that additional space is not needed anymore, chart is not re-scaled back.

Steps to reproduce:

  1. table.update([{name: 'aa', val: 2}, {name: 'bb', val: 4}, {name: 'cc', val: 3}]); Original chart is being shown: image
  2. table.update([{name: 'aa', val: 2}, {name: 'bb', val: 100}, {name: 'cc', val: 3}]); Chart is re-scaled: image
  3. table.update([{name: 'aa', val: 2}, {name: 'bb', val: 4}, {name: 'cc', val: 3}]); Chart is not re-scaled this time: image

Expectation, the chart in image (3) should look exactly like in image (1).

Potential Solutions:

I would imagine an additional setting which would allow developers to choose whether scaling down should be enabled or not.