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

feat: implement passing updateMode property to chart's update method #1043

Merged
merged 2 commits into from
May 23, 2022

Conversation

Arantiryo
Copy link
Collaborator

Now updateMode property can be passed to a chart component to specify what transition configuration should be used.
More information on updateMode can be found in Chart.js docs.

#1024
#1006

@codecov-commenter
Copy link

Codecov Report

Merging #1043 (ae4098e) into master (93f7c30) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1043   +/-   ##
=======================================
  Coverage   86.48%   86.48%           
=======================================
  Files           4        4           
  Lines          74       74           
  Branches       16       16           
=======================================
  Hits           64       64           
  Misses          9        9           
  Partials        1        1           
Impacted Files Coverage Δ
src/chart.tsx 96.42% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@github-actions
Copy link

github-actions bot commented May 22, 2022

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dist/index.cjs 853 B (+1.43% 🔺) 17 ms (+1.43% 🔺) 150 ms (-28.07% 🔽) 167 ms
dist/index.js 754 B (+1.62% 🔺) 15 ms (+1.62% 🔺) 119 ms (+5.47% 🔺) 133 ms

@Arantiryo Arantiryo requested a review from dangreen May 22, 2022 10:24
src/chart.tsx Outdated
@@ -82,7 +83,7 @@ function ChartComponent<
destroyChart();
setTimeout(renderChart);
} else {
chartRef.current.update();
chartRef.current.update(updateMode);
}
}, [redraw, options, data.labels, data.datasets]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be also in deps

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you. Fixed

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

Successfully merging this pull request may close these issues.

None yet

3 participants