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: single value as a Highcharts instance #1698

Open
wants to merge 89 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
7cae17e
feat: single value as a highcharts instance WIP
HendrikThePendric Aug 27, 2024
fb6a3b4
chore: resizing the container
HendrikThePendric Sep 2, 2024
f3fb9c2
chore: scaling the icon correctly
HendrikThePendric Sep 4, 2024
f59ce52
fix: rework old implementation WIP
HendrikThePendric Sep 4, 2024
051690f
chore: align single value store with other highcharts charts
HendrikThePendric Sep 10, 2024
151e154
chore: use noAxis for single value type
HendrikThePendric Sep 10, 2024
0584746
chore: clean up comments and console log
HendrikThePendric Sep 10, 2024
be55d7b
chore: switch to highcharts adapter in story
HendrikThePendric Sep 11, 2024
b782cb2
feat: add generic mechanism for rendering custom SVGs on chart load e…
HendrikThePendric Sep 11, 2024
f9c5508
chore: produce empty series for single value
HendrikThePendric Sep 11, 2024
4e6fc32
chore: return null instead of an empty object so it is cleaned later
HendrikThePendric Sep 11, 2024
f39093a
fix: do not return a chart type for single value because it does not …
HendrikThePendric Sep 11, 2024
b0caa6e
fix: implement subtitle and title logic for single value chart
HendrikThePendric Sep 11, 2024
c7304cf
fix: remove yAxis from single value highcharts config
HendrikThePendric Sep 11, 2024
bd8158b
refactor: implement single value config via Highcharts adapter
HendrikThePendric Sep 12, 2024
ffc03df
fix: set subtext in customSVGOptions
HendrikThePendric Sep 12, 2024
86beba0
chore: positioning WIP
HendrikThePendric Sep 17, 2024
b958e73
chore: ensure Roboto font is preloaded to prevent text size computati…
HendrikThePendric Sep 18, 2024
5604f98
chore: position all SVG elements using Highcharts SVGElement.align()
HendrikThePendric Sep 18, 2024
8420e66
chore: remove files from failed initial re-implementation
HendrikThePendric Sep 18, 2024
6db9c9d
chore: re-enable no-unused-vars ESLint rule and address related issues
HendrikThePendric Sep 18, 2024
de78129
chore: update background to white when exporting and background is tr…
HendrikThePendric Sep 18, 2024
af4f228
chore: give icon the same height as value text
HendrikThePendric Sep 19, 2024
ad9a222
chore: adjust story so all scenarios can be tested
HendrikThePendric Sep 19, 2024
77f4739
fix: prevent checkIfFitsWithinContainer throwing an error when subtex…
HendrikThePendric Sep 19, 2024
b5a404f
chore: reduce subtext size
HendrikThePendric Sep 19, 2024
35858f2
fix: multiline subtitle in dashboard view
HendrikThePendric Sep 19, 2024
a1ac9d7
chore: adjust story styles
HendrikThePendric Sep 19, 2024
c880c56
fix: adjust dashboard title styles to original implementation
HendrikThePendric Sep 19, 2024
0567326
feat: single value as a highcharts instance WIP
HendrikThePendric Aug 27, 2024
23568d6
chore: resizing the container
HendrikThePendric Sep 2, 2024
3151355
chore: scaling the icon correctly
HendrikThePendric Sep 4, 2024
0a6a30f
fix: rework old implementation WIP
HendrikThePendric Sep 4, 2024
c43437a
chore: align single value store with other highcharts charts
HendrikThePendric Sep 10, 2024
43de8c7
chore: use noAxis for single value type
HendrikThePendric Sep 10, 2024
783b655
chore: clean up comments and console log
HendrikThePendric Sep 10, 2024
8a1ac4f
chore: switch to highcharts adapter in story
HendrikThePendric Sep 11, 2024
212ee5b
feat: add generic mechanism for rendering custom SVGs on chart load e…
HendrikThePendric Sep 11, 2024
fd921d5
chore: produce empty series for single value
HendrikThePendric Sep 11, 2024
480ebe1
chore: return null instead of an empty object so it is cleaned later
HendrikThePendric Sep 11, 2024
8e234a7
fix: do not return a chart type for single value because it does not …
HendrikThePendric Sep 11, 2024
a60caad
fix: implement subtitle and title logic for single value chart
HendrikThePendric Sep 11, 2024
9569d0c
fix: remove yAxis from single value highcharts config
HendrikThePendric Sep 11, 2024
4faa01a
refactor: implement single value config via Highcharts adapter
HendrikThePendric Sep 12, 2024
928b14d
fix: set subtext in customSVGOptions
HendrikThePendric Sep 12, 2024
fc6e190
chore: positioning WIP
HendrikThePendric Sep 17, 2024
651c390
chore: ensure Roboto font is preloaded to prevent text size computati…
HendrikThePendric Sep 18, 2024
fe17b6b
chore: position all SVG elements using Highcharts SVGElement.align()
HendrikThePendric Sep 18, 2024
df8a909
chore: remove files from failed initial re-implementation
HendrikThePendric Sep 18, 2024
e49b765
chore: re-enable no-unused-vars ESLint rule and address related issues
HendrikThePendric Sep 18, 2024
5794204
chore: update background to white when exporting and background is tr…
HendrikThePendric Sep 18, 2024
139b3bc
chore: give icon the same height as value text
HendrikThePendric Sep 19, 2024
e978543
chore: adjust story so all scenarios can be tested
HendrikThePendric Sep 19, 2024
4af54a4
fix: prevent checkIfFitsWithinContainer throwing an error when subtex…
HendrikThePendric Sep 19, 2024
f9a189c
chore: reduce subtext size
HendrikThePendric Sep 19, 2024
ab7b075
fix: multiline subtitle in dashboard view
HendrikThePendric Sep 19, 2024
944b00e
chore: adjust story styles
HendrikThePendric Sep 19, 2024
bbdd316
fix: adjust dashboard title styles to original implementation
HendrikThePendric Sep 19, 2024
b397268
chore: remove commented variable
HendrikThePendric Sep 23, 2024
f4a4943
Merge branch 'feat/single-value-as-highcharts-chart-DHIS2-17928' of g…
HendrikThePendric Sep 23, 2024
65d4ebf
chore: remove console.log
HendrikThePendric Sep 23, 2024
b249bfd
fix: set spacingTop correctly if both title and subtitle are missing
HendrikThePendric Sep 24, 2024
b625640
chore: prevent crash when legend is being displayed
HendrikThePendric Sep 24, 2024
b2f6931
fix: correctly pass legendOptions to getSingleValueBackgroundColor
HendrikThePendric Sep 24, 2024
a5847bc
fix: set value color correctly based on legend color
HendrikThePendric Sep 24, 2024
64fc5ea
fix: compute text color correctly
HendrikThePendric Sep 24, 2024
a33fa05
chore: allow exporting PNG and PDF from single value story
HendrikThePendric Oct 9, 2024
f95bee8
chore: use SVGRenderer to draw the icon
HendrikThePendric Oct 9, 2024
c22fd05
fix: whitelist some SVG attributes needed by the single value visuali…
HendrikThePendric Oct 9, 2024
ef46931
Merge branch 'master' into feat/single-value-as-highcharts-chart-DHIS…
janhenrikoverland Oct 9, 2024
969f5c3
fix: address cross-browser style issues by using kebab-cased attribut…
HendrikThePendric Oct 10, 2024
d3a3133
Merge branch 'feat/single-value-as-highcharts-chart-DHIS2-17928' of g…
HendrikThePendric Oct 10, 2024
21de660
fix: use normal font weight during PDF export to prevent serif font s…
HendrikThePendric Oct 10, 2024
8adce12
fix: force reload the getBBox call to prevent getting stale dimensions
HendrikThePendric Oct 10, 2024
80ac2db
fix: avoid having to read this.userOptions.customSVGOptions for all v…
HendrikThePendric Oct 14, 2024
bd96ab9
chore: remove stray console.log
HendrikThePendric Oct 15, 2024
18fb246
fix: add plugin provided by highcharts support that solves text shado…
HendrikThePendric Oct 16, 2024
ef76866
refactor: rename isPDF and isExportingToPDF to isPdfExport
HendrikThePendric Oct 16, 2024
69164e6
fix: add plugin to fix nonASCII font bug and combine pdf export bugfi…
HendrikThePendric Oct 16, 2024
b05581b
chore: adjust comments for clarity
HendrikThePendric Oct 16, 2024
b51fc0f
chore: add data-test attributes to single value svg elements
HendrikThePendric Oct 17, 2024
a5821c0
fix: adjust SV render styles
cooper-joe Oct 17, 2024
6122203
fix: ensure title and subtitle color are computed correctly
HendrikThePendric Oct 17, 2024
b886121
fix: ensure title and subtitle use custom color also for dark background
HendrikThePendric Oct 17, 2024
6b16f6e
Merge branch 'master' into feat/single-value-as-highcharts-chart-DHIS…
HendrikThePendric Oct 21, 2024
e8f6a88
chore: move shouldUseContrastColor to general utils dir
HendrikThePendric Oct 21, 2024
47c8cb8
fix: address problem in demo story pdf export
HendrikThePendric Oct 21, 2024
489ea08
refactor: append icon children to iconGroup using native DOM API
HendrikThePendric Oct 21, 2024
159727c
refactor: restructure chart, event and customSVGOptions dirs
HendrikThePendric Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
Loading
Loading