Natixar / natixar-frontend

The static front end of the Natixar SaaS platform
0 stars 5 forks source link

Any selection or zoom, pan state in stacked area chart is lost at auto refresh time. #34

Closed lepeuvedic-natixar closed 3 months ago

lepeuvedic-natixar commented 5 months ago

Problem: When the user uses either a click-and-drag selection box, or the (+) icon to zoom in, the view adjusts but it automatically resets to default when the auto-refresh comes.

Steps to reproduce: Method 1:

  1. Click in the colored area in the stacked area charts "Total Emissions" and drag to draw a rectangle.
  2. Release the mouse button and the time axis expands to show only the selected period.
  3. Wait a few seconds and the graph returns to its previous X axis. Method 2:
  4. Click on the (+) button
  5. Wait a few seconds and the graph returns to its previous X axis. Method 3:
  6. Click on the "hand" button
  7. Click on the colored area in the chart and drag to the left or to the right.
  8. Wait a few seconds and the graph returns to its previous X axis.

Expected behaviour: When the user changes the graph X axis to his/her liking, not only must it stay put at last until a new date range is selected in the data range picker, that does not include the currently displayed period, but it must also be included in the chart data sent to the back end for automatic report generation.

ChrisNatixar commented 3 months ago

Fixed with change in pollingInterval and other changes to directly call the api only when needed.