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

[gc-chart-xxx] Blink when loading new data #309

Open
ytvnr opened this issue Mar 19, 2021 · 0 comments
Open

[gc-chart-xxx] Blink when loading new data #309

ytvnr opened this issue Mar 19, 2021 · 0 comments

Comments

@ytvnr
Copy link
Contributor

ytvnr commented Mar 19, 2021

Problem

When using a promise for the seriesof a gv-chart, then the skeleton appears until the promise is resolved.

If we want to refresh the data, there is a blink before rendering the skeleton state.

One clue we have with @gaetanmaisse is when the component is updated, then it is re-rendered with old value before passing to skeleton

Concerned components

  • gv-chart-pie
  • gv-chart-bar
  • gv-chart-line ( -> here there is no blink, but we see the data refreshing then pass to skeleton state)

How to reproduce

You can try with gv-chart-pie.stories.js, Loading story and use the following as simulations

simulations: [
    storyWait(0, ([component]) => {
      component.series = new Promise((resolve) => (seriesResolver = resolve));
      component.options = options;
    }),

    storyWait(750, () => {
      seriesResolver(series);
    }),

    storyWait(1500, ([component]) => {
      component.series = new Promise((resolve) => (seriesResolver = resolve));
      component.options = options;
    }),

    storyWait(2250, () => {
      seriesResolver(series);
    }),
  ],
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

1 participant