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: Add initial support for ChartJs plugins #14433

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexjba
Copy link
Contributor

@alexjba alexjba commented Apr 16, 2024

What does the PR do

Closes #13936

Load the original Chart.JS 2.9.4 library as an IIFE module

Loading the original CharJS library will enable us to load chart plugins since most of them expect this format.

Loading the original library requires a few adaptations:
Polyfill.js - This module is responsible to provide the functionality expected by ChartJs or plugins that is traditionally provided by the web browser. Basically anything related to window or document
Library.js - This module loads the ChartJS module, plugins and Polyfills. It will provide the necessary glue code to adapt the ChartJs and plugins to the QML environment. E.g. generate mouse events, resize events

Load crosshair and data labels plugins

https://github.com/AbelHeinsbroek/chartjs-plugin-crosshair/tree/v1.1.3?tab=readme-ov-file
https://github.com/chartjs/chartjs-plugin-datalabels/tree/v1.0.0

Add demo charts in storybook

Screen.Recording.2024-04-16.at1.09.59.36.mov

Affected areas

Charts

@status-im-auto
Copy link
Member

status-im-auto commented Apr 16, 2024

Jenkins Builds

Click to see older builds (18)
Commit #️⃣ Finished (UTC) Duration Platform Result
1e4e09a #1 2024-04-16 07:11:24 ~4 min macos/aarch64 📄log
✔️ 1e4e09a #1 2024-04-16 07:13:11 ~6 min tests/nim 📄log
1e4e09a #1 2024-04-16 07:13:28 ~6 min macos/x86_64 📄log
1e4e09a #1 2024-04-16 07:15:58 ~9 min linux/x86_64 📄log
1e4e09a #1 2024-04-16 07:18:35 ~11 min tests/ui 📄log
1e4e09a #1 2024-04-16 07:26:42 ~19 min windows/x86_64 📄log
✔️ 02b00fa #2 2024-04-16 07:49:44 ~4 min macos/aarch64 🍎dmg
✔️ 02b00fa #2 2024-04-16 07:51:29 ~6 min tests/nim 📄log
✔️ 02b00fa #2 2024-04-16 07:52:46 ~7 min macos/x86_64 🍎dmg
✔️ 02b00fa #2 2024-04-16 07:57:23 ~12 min tests/ui 📄log
✔️ 02b00fa #2 2024-04-16 08:03:43 ~18 min linux/x86_64 📦tgz
✔️ 02b00fa #2 2024-04-16 08:15:28 ~30 min windows/x86_64 💿exe
✔️ f0fe650 #3 2024-04-22 07:49:58 ~6 min tests/nim 📄log
✔️ f0fe650 #3 2024-04-22 07:50:07 ~6 min macos/aarch64 🍎dmg
✔️ f0fe650 #3 2024-04-22 07:53:16 ~9 min macos/x86_64 🍎dmg
✔️ f0fe650 #3 2024-04-22 07:55:10 ~11 min tests/ui 📄log
✔️ f0fe650 #3 2024-04-22 07:59:08 ~15 min linux/x86_64 📦tgz
✔️ f0fe650 #3 2024-04-22 08:17:24 ~33 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ ca7243d #4 2024-04-29 08:35:55 ~5 min macos/aarch64 🍎dmg
✔️ ca7243d #4 2024-04-29 08:37:06 ~6 min tests/nim 📄log
✔️ ca7243d #4 2024-04-29 08:40:00 ~9 min macos/x86_64 🍎dmg
ca7243d #4 2024-04-29 08:42:17 ~11 min tests/ui 📄log
✔️ ca7243d #4 2024-04-29 08:46:17 ~15 min linux/x86_64 📦tgz
✔️ 45d9af1 #5 2024-04-29 08:51:11 ~4 min macos/aarch64 🍎dmg
✔️ 45d9af1 #5 2024-04-29 08:53:42 ~6 min tests/nim 📄log
✔️ 45d9af1 #5 2024-04-29 08:54:57 ~7 min macos/x86_64 🍎dmg
✔️ 45d9af1 #5 2024-04-29 08:57:51 ~10 min tests/ui 📄log
✔️ 45d9af1 #5 2024-04-29 09:03:05 ~16 min linux/x86_64 📦tgz
✔️ 45d9af1 #5 2024-04-29 09:23:16 ~36 min windows/x86_64 💿exe

@alexjba alexjba force-pushed the 13936-walletgraph-analyze-all-graph-use-cases-needed-and-confirm-what-can-be-done branch from 1e4e09a to 02b00fa Compare April 16, 2024 07:44
@alexjba alexjba marked this pull request as ready for review April 16, 2024 07:46
Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

Awesome stuff! 🚀

Just some minor comments/suggestions inline

@alexjba alexjba force-pushed the 13936-walletgraph-analyze-all-graph-use-cases-needed-and-confirm-what-can-be-done branch from 02b00fa to f0fe650 Compare April 22, 2024 07:43
@alexjba
Copy link
Contributor Author

alexjba commented Apr 23, 2024

The Chart.bundle.js file changes can be reviewed by comparing it to the official distribution found here: https://github.com/chartjs/Chart.js/releases/tag/v2.9.4

@alexjba alexjba force-pushed the 13936-walletgraph-analyze-all-graph-use-cases-needed-and-confirm-what-can-be-done branch from f0fe650 to ca7243d Compare April 29, 2024 08:30
+ adding plugin for crosshair and zoom
+ adding plugin for data labels
@alexjba alexjba force-pushed the 13936-walletgraph-analyze-all-graph-use-cases-needed-and-confirm-what-can-be-done branch from ca7243d to 45d9af1 Compare April 29, 2024 08:46
Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

LGTM 🔝

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.

[Wallet/Graph] Analyze all graph use cases needed and confirm what can be done
3 participants