@krizaka/charts 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -5
- package/dist/bar.js +5 -4
- package/dist/candlestick.js +3 -3
- package/dist/chart.js +3 -3
- package/dist/{chunk-EK3Z647J.js → chunk-4LBXEAGC.js} +3 -3
- package/dist/{chunk-AHQXJSAQ.js → chunk-AA5EWWYV.js} +2 -2
- package/dist/{chunk-VKO2OYYM.js → chunk-ARARFMNE.js} +2 -2
- package/dist/{chunk-WBH2QU77.js → chunk-BV4DBGN7.js} +2 -2
- package/dist/{chunk-BZ5CQFPH.js → chunk-C4MFZLJM.js} +2 -2
- package/dist/{chunk-XAJ3KCC4.js → chunk-CSSZLFLO.js} +3 -3
- package/dist/{chunk-UNK4MJVG.js → chunk-CVWSMUUB.js} +8 -8
- package/dist/chunk-E5DKBSWX.js +2 -0
- package/dist/chunk-E5DKBSWX.js.map +1 -0
- package/dist/chunk-EEP7PS2L.js +54 -0
- package/dist/chunk-EEP7PS2L.js.map +1 -0
- package/dist/{chunk-DZB6HEVO.js → chunk-EQLC2QVN.js} +2 -2
- package/dist/chunk-FINOPIDN.js +2 -0
- package/dist/chunk-FINOPIDN.js.map +1 -0
- package/dist/chunk-G2KF2WL4.js +2 -0
- package/dist/chunk-G2KF2WL4.js.map +1 -0
- package/dist/{chunk-PTSB3H5Q.js → chunk-I3D7KUGN.js} +2 -2
- package/dist/chunk-IKQV3NSL.js +76 -0
- package/dist/chunk-IKQV3NSL.js.map +1 -0
- package/dist/{chunk-DWJPPEMC.js → chunk-JTKR7ZWP.js} +73 -60
- package/dist/chunk-JTKR7ZWP.js.map +1 -0
- package/dist/chunk-KNDHO67X.js +78 -0
- package/dist/chunk-KNDHO67X.js.map +1 -0
- package/dist/chunk-L2EKYWVI.js +94 -0
- package/dist/chunk-L2EKYWVI.js.map +1 -0
- package/dist/{chunk-XC6BQ3RN.js → chunk-MXLITIGU.js} +3 -3
- package/dist/{chunk-OER6ETT4.js → chunk-NCIQMRV3.js} +3 -3
- package/dist/chunk-OIRHLJBC.js +83 -0
- package/dist/chunk-OIRHLJBC.js.map +1 -0
- package/dist/{chunk-WIRCIOLH.js → chunk-PBQV3B6O.js} +5 -5
- package/dist/chunk-POQIHFAZ.js +2 -0
- package/dist/chunk-POQIHFAZ.js.map +1 -0
- package/dist/{chunk-I5QUZVU2.js → chunk-PWMMXRMC.js} +2 -2
- package/dist/chunk-SLEJDQ3A.js +81 -0
- package/dist/chunk-SLEJDQ3A.js.map +1 -0
- package/dist/{chunk-7TIFCK5E.js → chunk-VKZZY2QD.js} +3 -3
- package/dist/{chunk-VKTZD7UT.js → chunk-W5ILLSPK.js} +3 -3
- package/dist/chunk-WBHFVBSK.js +25 -0
- package/dist/chunk-WBHFVBSK.js.map +1 -0
- package/dist/chunk-WNUFGMS7.js +113 -0
- package/dist/chunk-WNUFGMS7.js.map +1 -0
- package/dist/{chunk-XR4ZJDOV.js → chunk-WVTIKOII.js} +2 -2
- package/dist/{chunk-7CSAGFBW.js → chunk-XDDALY4C.js} +3 -3
- package/dist/credits.d.ts +42 -0
- package/dist/credits.js +21 -0
- package/dist/credits.js.map +1 -0
- package/dist/earnings.d.ts +29 -0
- package/dist/earnings.js +22 -0
- package/dist/earnings.js.map +1 -0
- package/dist/funnel.js +3 -3
- package/dist/gauge.js +3 -2
- package/dist/geo.js +2 -2
- package/dist/globe.js +2 -2
- package/dist/goal.d.ts +26 -0
- package/dist/goal.js +17 -0
- package/dist/goal.js.map +1 -0
- package/dist/heatmap.js +3 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +80 -33
- package/dist/labels-DE_743fQ.d.ts +72 -0
- package/dist/latency.d.ts +33 -0
- package/dist/latency.js +24 -0
- package/dist/latency.js.map +1 -0
- package/dist/line.js +5 -4
- package/dist/native.d.ts +195 -1
- package/dist/native.js +383 -14
- package/dist/native.js.map +1 -1
- package/dist/pie.js +3 -3
- package/dist/radar.js +3 -3
- package/dist/sankey.js +3 -3
- package/dist/scatter.js +3 -3
- package/dist/sparkline.js +4 -3
- package/dist/throughput.d.ts +37 -0
- package/dist/throughput.js +24 -0
- package/dist/throughput.js.map +1 -0
- package/dist/ticker.d.ts +38 -0
- package/dist/ticker.js +22 -0
- package/dist/ticker.js.map +1 -0
- package/dist/treemap.js +3 -3
- package/package.json +102 -6
- package/registry/area-chart.json +1 -0
- package/registry/bar-chart.json +1 -0
- package/registry/calendar-heatmap.json +1 -0
- package/registry/candlestick.json +1 -0
- package/registry/chart.json +1 -0
- package/registry/charts-provider.json +1 -0
- package/registry/credit-usage.json +473 -0
- package/registry/earnings-chart.json +703 -0
- package/registry/examples/credit-usage/monthly-credits.d.ts +4 -0
- package/registry/examples/credit-usage/monthly-credits.js +24 -0
- package/registry/examples/credit-usage/monthly-credits.tsx +19 -0
- package/registry/examples/credit-usage/native/monthly-credits.d.ts +4 -0
- package/registry/examples/credit-usage/native/monthly-credits.dark.png +0 -0
- package/registry/examples/credit-usage/native/monthly-credits.js +23 -0
- package/registry/examples/credit-usage/native/monthly-credits.light.png +0 -0
- package/registry/examples/credit-usage/native/monthly-credits.tsx +18 -0
- package/registry/examples/credit-usage/storage-plan.d.ts +4 -0
- package/registry/examples/credit-usage/storage-plan.js +21 -0
- package/registry/examples/credit-usage/storage-plan.tsx +15 -0
- package/registry/examples/earnings-chart/creator-month.d.ts +4 -0
- package/registry/examples/earnings-chart/creator-month.js +29 -0
- package/registry/examples/earnings-chart/creator-month.tsx +24 -0
- package/registry/examples/earnings-chart/gross-and-net.d.ts +4 -0
- package/registry/examples/earnings-chart/gross-and-net.js +29 -0
- package/registry/examples/earnings-chart/gross-and-net.tsx +24 -0
- package/registry/examples/earnings-chart/native/creator-month.d.ts +4 -0
- package/registry/examples/earnings-chart/native/creator-month.dark.png +0 -0
- package/registry/examples/earnings-chart/native/creator-month.js +29 -0
- package/registry/examples/earnings-chart/native/creator-month.light.png +0 -0
- package/registry/examples/earnings-chart/native/creator-month.tsx +24 -0
- package/registry/examples/goal-progress/challenge-pot.d.ts +4 -0
- package/registry/examples/goal-progress/challenge-pot.js +22 -0
- package/registry/examples/goal-progress/challenge-pot.tsx +16 -0
- package/registry/examples/goal-progress/goal-reached.d.ts +4 -0
- package/registry/examples/goal-progress/goal-reached.js +11 -0
- package/registry/examples/goal-progress/goal-reached.tsx +6 -0
- package/registry/examples/goal-progress/native/challenge-pot.d.ts +4 -0
- package/registry/examples/goal-progress/native/challenge-pot.dark.png +0 -0
- package/registry/examples/goal-progress/native/challenge-pot.js +11 -0
- package/registry/examples/goal-progress/native/challenge-pot.light.png +0 -0
- package/registry/examples/goal-progress/native/challenge-pot.tsx +6 -0
- package/registry/examples/job-throughput/live-hours.d.ts +4 -0
- package/registry/examples/job-throughput/live-hours.js +33 -0
- package/registry/examples/job-throughput/live-hours.tsx +28 -0
- package/registry/examples/job-throughput/native/week-of-jobs.d.ts +4 -0
- package/registry/examples/job-throughput/native/week-of-jobs.dark.png +0 -0
- package/registry/examples/job-throughput/native/week-of-jobs.js +20 -0
- package/registry/examples/job-throughput/native/week-of-jobs.light.png +0 -0
- package/registry/examples/job-throughput/native/week-of-jobs.tsx +16 -0
- package/registry/examples/job-throughput/week-of-jobs.d.ts +4 -0
- package/registry/examples/job-throughput/week-of-jobs.js +20 -0
- package/registry/examples/job-throughput/week-of-jobs.tsx +16 -0
- package/registry/examples/latency-chart/by-capability.d.ts +4 -0
- package/registry/examples/latency-chart/by-capability.js +26 -0
- package/registry/examples/latency-chart/by-capability.tsx +21 -0
- package/registry/examples/latency-chart/native/by-capability.d.ts +4 -0
- package/registry/examples/latency-chart/native/by-capability.dark.png +0 -0
- package/registry/examples/latency-chart/native/by-capability.js +17 -0
- package/registry/examples/latency-chart/native/by-capability.light.png +0 -0
- package/registry/examples/latency-chart/native/by-capability.tsx +13 -0
- package/registry/examples/latency-chart/time-to-result.d.ts +4 -0
- package/registry/examples/latency-chart/time-to-result.js +27 -0
- package/registry/examples/latency-chart/time-to-result.tsx +22 -0
- package/registry/examples/price-ticker/auction-room.d.ts +4 -0
- package/registry/examples/price-ticker/auction-room.js +21 -0
- package/registry/examples/price-ticker/auction-room.tsx +17 -0
- package/registry/examples/price-ticker/native/auction-room.d.ts +4 -0
- package/registry/examples/price-ticker/native/auction-room.dark.png +0 -0
- package/registry/examples/price-ticker/native/auction-room.js +19 -0
- package/registry/examples/price-ticker/native/auction-room.light.png +0 -0
- package/registry/examples/price-ticker/native/auction-room.tsx +15 -0
- package/registry/examples/price-ticker/no-bid-yet.d.ts +4 -0
- package/registry/examples/price-ticker/no-bid-yet.js +11 -0
- package/registry/examples/price-ticker/no-bid-yet.tsx +6 -0
- package/registry/funnel.json +1 -0
- package/registry/gauge.json +1 -0
- package/registry/geo-map.json +1 -0
- package/registry/globe.json +1 -0
- package/registry/goal-progress.json +520 -0
- package/registry/heatmap.json +1 -0
- package/registry/index.json +163 -1
- package/registry/job-throughput.json +654 -0
- package/registry/latency-chart.json +671 -0
- package/registry/line-chart.json +1 -0
- package/registry/pie-chart.json +1 -0
- package/registry/price-ticker.json +684 -0
- package/registry/radar-chart.json +1 -0
- package/registry/sankey.json +1 -0
- package/registry/scatter-chart.json +1 -0
- package/registry/sparkline.json +1 -0
- package/registry/treemap.json +1 -0
- package/dist/chunk-DWJPPEMC.js.map +0 -1
- /package/dist/{chunk-EK3Z647J.js.map → chunk-4LBXEAGC.js.map} +0 -0
- /package/dist/{chunk-AHQXJSAQ.js.map → chunk-AA5EWWYV.js.map} +0 -0
- /package/dist/{chunk-VKO2OYYM.js.map → chunk-ARARFMNE.js.map} +0 -0
- /package/dist/{chunk-WBH2QU77.js.map → chunk-BV4DBGN7.js.map} +0 -0
- /package/dist/{chunk-BZ5CQFPH.js.map → chunk-C4MFZLJM.js.map} +0 -0
- /package/dist/{chunk-XAJ3KCC4.js.map → chunk-CSSZLFLO.js.map} +0 -0
- /package/dist/{chunk-UNK4MJVG.js.map → chunk-CVWSMUUB.js.map} +0 -0
- /package/dist/{chunk-DZB6HEVO.js.map → chunk-EQLC2QVN.js.map} +0 -0
- /package/dist/{chunk-PTSB3H5Q.js.map → chunk-I3D7KUGN.js.map} +0 -0
- /package/dist/{chunk-XC6BQ3RN.js.map → chunk-MXLITIGU.js.map} +0 -0
- /package/dist/{chunk-OER6ETT4.js.map → chunk-NCIQMRV3.js.map} +0 -0
- /package/dist/{chunk-WIRCIOLH.js.map → chunk-PBQV3B6O.js.map} +0 -0
- /package/dist/{chunk-I5QUZVU2.js.map → chunk-PWMMXRMC.js.map} +0 -0
- /package/dist/{chunk-7TIFCK5E.js.map → chunk-VKZZY2QD.js.map} +0 -0
- /package/dist/{chunk-VKTZD7UT.js.map → chunk-W5ILLSPK.js.map} +0 -0
- /package/dist/{chunk-XR4ZJDOV.js.map → chunk-WVTIKOII.js.map} +0 -0
- /package/dist/{chunk-7CSAGFBW.js.map → chunk-XDDALY4C.js.map} +0 -0
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "goal-progress",
|
|
3
|
+
"package": "@krizaka/charts",
|
|
4
|
+
"type": "chart",
|
|
5
|
+
"title": "Goal progress",
|
|
6
|
+
"summary": "A pot towards its goal, in money: an arc that fills, “raised of $500” under the amount, the supporters and the time left.",
|
|
7
|
+
"description": "A pot towards its goal, in money: an arc that fills, “raised of $500” under the amount, the supporters and the time left.",
|
|
8
|
+
"status": "beta",
|
|
9
|
+
"category": "charts",
|
|
10
|
+
"platforms": "both",
|
|
11
|
+
"engine": "svg",
|
|
12
|
+
"tier": "ready-made",
|
|
13
|
+
"whenToUse": [
|
|
14
|
+
"An Orochia challenge with a goal: what fans pledged so far, on the web and in the app.",
|
|
15
|
+
"A crowdfunded request: the amount raised, the supporters, the deadline."
|
|
16
|
+
],
|
|
17
|
+
"whenNotToUse": [
|
|
18
|
+
{
|
|
19
|
+
"when": "An allowance that runs out.",
|
|
20
|
+
"use": "credit-usage"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"when": "A value in a range that is not money raised.",
|
|
24
|
+
"use": "gauge"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"bestPractices": [
|
|
28
|
+
"Pass amounts in minor units and the currency.",
|
|
29
|
+
"Write the time left with the app's countdown and pass it in `timeLeft`.",
|
|
30
|
+
"Past the goal the amount keeps counting and the arc stays full, in the success tone."
|
|
31
|
+
],
|
|
32
|
+
"accessibility": {
|
|
33
|
+
"keyboard": [],
|
|
34
|
+
"notes": [
|
|
35
|
+
"The gauge is a `meter`: the amount and “raised of $500” are its value in words.",
|
|
36
|
+
"“Goal reached” is written, never only shown by a colour."
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"related": [
|
|
40
|
+
"gauge",
|
|
41
|
+
"credit-usage",
|
|
42
|
+
"price-ticker"
|
|
43
|
+
],
|
|
44
|
+
"source": "packages/charts/src/meta/goal-progress.ts",
|
|
45
|
+
"install": {
|
|
46
|
+
"web": "npm install @krizaka/charts",
|
|
47
|
+
"native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
|
|
48
|
+
},
|
|
49
|
+
"web": {
|
|
50
|
+
"entry": "@krizaka/charts/goal",
|
|
51
|
+
"import": "import { GoalProgress } from \"@krizaka/charts/goal\";",
|
|
52
|
+
"props": [
|
|
53
|
+
{
|
|
54
|
+
"component": "GoalProgress",
|
|
55
|
+
"description": "A pot towards its goal, in money: the arc fills, the words say how much of what, and who chipped in.",
|
|
56
|
+
"props": [
|
|
57
|
+
{
|
|
58
|
+
"name": "currency",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"default": null,
|
|
61
|
+
"description": "The ISO 4217 currency.",
|
|
62
|
+
"required": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "goal",
|
|
66
|
+
"type": "number",
|
|
67
|
+
"default": null,
|
|
68
|
+
"description": "The goal, in minor units.",
|
|
69
|
+
"required": true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "raised",
|
|
73
|
+
"type": "number",
|
|
74
|
+
"default": null,
|
|
75
|
+
"description": "The amount raised, in **minor units** (cents).",
|
|
76
|
+
"required": true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "title",
|
|
80
|
+
"type": "string",
|
|
81
|
+
"default": null,
|
|
82
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
83
|
+
"required": true
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "brand",
|
|
87
|
+
"type": "BrandId",
|
|
88
|
+
"default": null,
|
|
89
|
+
"description": "The brand whose palette the charts use. Without it, a chart follows a `.brand-<id>` ancestor, else Krizaka. Set it\nwhen the app loads a brand stylesheet on `:root` (`@krizaka/tokens/brands/orazaka.css`).",
|
|
90
|
+
"required": false
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "className",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"default": null,
|
|
96
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
97
|
+
"required": false
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "description",
|
|
101
|
+
"type": "ReactNode",
|
|
102
|
+
"default": null,
|
|
103
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
104
|
+
"required": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "empty",
|
|
108
|
+
"type": "ReactNode",
|
|
109
|
+
"default": null,
|
|
110
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
111
|
+
"required": false
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "error",
|
|
115
|
+
"type": "ReactNode",
|
|
116
|
+
"default": null,
|
|
117
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
118
|
+
"required": false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "height",
|
|
122
|
+
"type": "number",
|
|
123
|
+
"default": null,
|
|
124
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
125
|
+
"required": false
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "hideTitle",
|
|
129
|
+
"type": "boolean",
|
|
130
|
+
"default": null,
|
|
131
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
132
|
+
"required": false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "id",
|
|
136
|
+
"type": "string",
|
|
137
|
+
"default": null,
|
|
138
|
+
"description": "The id of the figure.",
|
|
139
|
+
"required": false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "labels",
|
|
143
|
+
"type": "Partial<GoalLabels>",
|
|
144
|
+
"default": null,
|
|
145
|
+
"description": "The words, passed translated; English by default.",
|
|
146
|
+
"required": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "live",
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"default": null,
|
|
152
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
153
|
+
"required": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "loading",
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"default": null,
|
|
159
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
160
|
+
"required": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "locale",
|
|
164
|
+
"type": "Locale",
|
|
165
|
+
"default": null,
|
|
166
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
167
|
+
"required": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "style",
|
|
171
|
+
"type": "CSSProperties",
|
|
172
|
+
"default": null,
|
|
173
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
174
|
+
"required": false
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "summary",
|
|
178
|
+
"type": "\"hidden\" | \"visible\"",
|
|
179
|
+
"default": null,
|
|
180
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
181
|
+
"required": false
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "summaryText",
|
|
185
|
+
"type": "string",
|
|
186
|
+
"default": null,
|
|
187
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
188
|
+
"required": false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "supporters",
|
|
192
|
+
"type": "number",
|
|
193
|
+
"default": null,
|
|
194
|
+
"description": "How many people chipped in.",
|
|
195
|
+
"required": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "timeLeft",
|
|
199
|
+
"type": "ReactNode",
|
|
200
|
+
"default": null,
|
|
201
|
+
"description": "The time left, written by the app (a `Countdown`, “2 days”).",
|
|
202
|
+
"required": false
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"examples": [
|
|
208
|
+
{
|
|
209
|
+
"name": "challenge-pot",
|
|
210
|
+
"title": "A challenge's pot",
|
|
211
|
+
"description": "An Orochia goal halfway there, its supporters and the time left.",
|
|
212
|
+
"path": "examples/goal-progress/challenge-pot.tsx",
|
|
213
|
+
"module": "@krizaka/charts/registry/examples/goal-progress/challenge-pot",
|
|
214
|
+
"code": "import { GoalProgress } from \"@krizaka/charts/goal\";\n\n// An Orochia challenge: fans pledge towards a goal, held in escrow until it is met.\nexport default function ChallengePot() {\n return (\n <GoalProgress\n title=\"Backflip on the beach\"\n raised={262_00}\n goal={500_00}\n currency=\"USD\"\n supporters={41}\n timeLeft=\"3 days\"\n height={200}\n />\n );\n}\n"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "goal-reached",
|
|
218
|
+
"title": "Goal reached",
|
|
219
|
+
"description": "Past the goal: the success tone, the amount still counting.",
|
|
220
|
+
"path": "examples/goal-progress/goal-reached.tsx",
|
|
221
|
+
"module": "@krizaka/charts/registry/examples/goal-progress/goal-reached",
|
|
222
|
+
"code": "import { GoalProgress } from \"@krizaka/charts/goal\";\n\n// Past the goal: the arc stays full, the amount keeps counting, “Goal reached” is written.\nexport default function GoalReached() {\n return <GoalProgress title=\"Cover of the summer hit\" raised={1_180_00} goal={1_000_00} currency=\"EUR\" supporters={128} height={200} locale=\"fr-FR\" labels={{ raised: \"collectés sur {goal}\", reached: \"Objectif atteint\", supporters: \"{count} soutiens\" }} />;\n}\n"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"native": {
|
|
227
|
+
"entry": "@krizaka/charts/native",
|
|
228
|
+
"import": "import { GoalProgress } from \"@krizaka/charts/native\";",
|
|
229
|
+
"differences": [
|
|
230
|
+
"`timeLeft` is a string (the app writes it); the facts are written under the gauge."
|
|
231
|
+
],
|
|
232
|
+
"props": [
|
|
233
|
+
{
|
|
234
|
+
"component": "GoalProgress",
|
|
235
|
+
"description": "A pot towards its goal, in money (React Native): the arc fills, the words say how much of what.",
|
|
236
|
+
"props": [
|
|
237
|
+
{
|
|
238
|
+
"name": "currency",
|
|
239
|
+
"type": "string",
|
|
240
|
+
"default": null,
|
|
241
|
+
"description": "The ISO 4217 currency.",
|
|
242
|
+
"required": true
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "goal",
|
|
246
|
+
"type": "number",
|
|
247
|
+
"default": null,
|
|
248
|
+
"description": "The goal, in minor units.",
|
|
249
|
+
"required": true
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "raised",
|
|
253
|
+
"type": "number",
|
|
254
|
+
"default": null,
|
|
255
|
+
"description": "The amount raised, in minor units.",
|
|
256
|
+
"required": true
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "title",
|
|
260
|
+
"type": "string",
|
|
261
|
+
"default": null,
|
|
262
|
+
"description": "What the chart shows: its heading and accessible name.",
|
|
263
|
+
"required": true
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"name": "brand",
|
|
267
|
+
"type": "BrandId",
|
|
268
|
+
"default": null,
|
|
269
|
+
"description": "The brand whose palette leads. Default Krizaka.",
|
|
270
|
+
"required": false
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"name": "height",
|
|
274
|
+
"type": "number",
|
|
275
|
+
"default": null,
|
|
276
|
+
"description": "The plot's height.",
|
|
277
|
+
"required": false
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "hideTitle",
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"default": null,
|
|
283
|
+
"description": "Hide the heading (it stays the accessible name).",
|
|
284
|
+
"required": false
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "labels",
|
|
288
|
+
"type": "Partial<GoalLabels>",
|
|
289
|
+
"default": null,
|
|
290
|
+
"description": "The words, passed translated.",
|
|
291
|
+
"required": false
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "locale",
|
|
295
|
+
"type": "Locale",
|
|
296
|
+
"default": null,
|
|
297
|
+
"description": "The locale of every figure and date. Default `\"en-US\"`.",
|
|
298
|
+
"required": false
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "scheme",
|
|
302
|
+
"type": "Mode",
|
|
303
|
+
"default": null,
|
|
304
|
+
"description": "Dark or light. Default: the device's (pass `useTheme().scheme` of\n@krizaka /ui/native to follow the app).",
|
|
305
|
+
"required": false
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "style",
|
|
309
|
+
"type": "ViewStyle",
|
|
310
|
+
"default": null,
|
|
311
|
+
"description": "The style of the chart's container (layout only: colours come from the theme).",
|
|
312
|
+
"required": false
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "supporters",
|
|
316
|
+
"type": "number",
|
|
317
|
+
"default": null,
|
|
318
|
+
"description": "How many people chipped in.",
|
|
319
|
+
"required": false
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"name": "theme",
|
|
323
|
+
"type": "Partial<ChartTheme>",
|
|
324
|
+
"default": null,
|
|
325
|
+
"description": "The app's colour roles (`useTheme().theme` of\n@krizaka /ui/native): a product's brand overrides apply.",
|
|
326
|
+
"required": false
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"name": "timeLeft",
|
|
330
|
+
"type": "string",
|
|
331
|
+
"default": null,
|
|
332
|
+
"description": "The time left, written by the app (“2 days”).",
|
|
333
|
+
"required": false
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
"examples": [
|
|
339
|
+
{
|
|
340
|
+
"name": "challenge-pot",
|
|
341
|
+
"title": "A challenge's pot",
|
|
342
|
+
"description": "The challenge screen of the app.",
|
|
343
|
+
"path": "examples/goal-progress/native/challenge-pot.tsx",
|
|
344
|
+
"module": "@krizaka/charts/registry/examples/goal-progress/native/challenge-pot",
|
|
345
|
+
"code": "import { GoalProgress } from \"@krizaka/charts/native\";\n\n// The challenge screen of the app.\nexport default function NativeChallengePot() {\n return <GoalProgress title=\"Backflip on the beach\" raised={262_00} goal={500_00} currency=\"USD\" supporters={41} timeLeft=\"3 days\" height={180} />;\n}\n",
|
|
346
|
+
"screenshots": {
|
|
347
|
+
"dark": "examples/goal-progress/native/challenge-pot.dark.png",
|
|
348
|
+
"light": "examples/goal-progress/native/challenge-pot.light.png"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"files": [],
|
|
354
|
+
"dependencies": [
|
|
355
|
+
"@krizaka/intl@workspace:^",
|
|
356
|
+
"d3-geo@^3.1.1",
|
|
357
|
+
"echarts@^6.1.0",
|
|
358
|
+
"topojson-client@^3.1.0"
|
|
359
|
+
],
|
|
360
|
+
"registryDependencies": [],
|
|
361
|
+
"demo": {
|
|
362
|
+
"path": "examples/goal-progress/challenge-pot.tsx",
|
|
363
|
+
"content": "import { GoalProgress } from \"@krizaka/charts/goal\";\n\n// An Orochia challenge: fans pledge towards a goal, held in escrow until it is met.\nexport default function ChallengePot() {\n return (\n <GoalProgress\n title=\"Backflip on the beach\"\n raised={262_00}\n goal={500_00}\n currency=\"USD\"\n supporters={41}\n timeLeft=\"3 days\"\n height={200}\n />\n );\n}\n"
|
|
364
|
+
},
|
|
365
|
+
"props": [
|
|
366
|
+
{
|
|
367
|
+
"component": "GoalProgress",
|
|
368
|
+
"description": "A pot towards its goal, in money: the arc fills, the words say how much of what, and who chipped in.",
|
|
369
|
+
"props": [
|
|
370
|
+
{
|
|
371
|
+
"name": "currency",
|
|
372
|
+
"type": "string",
|
|
373
|
+
"default": null,
|
|
374
|
+
"description": "The ISO 4217 currency.",
|
|
375
|
+
"required": true
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "goal",
|
|
379
|
+
"type": "number",
|
|
380
|
+
"default": null,
|
|
381
|
+
"description": "The goal, in minor units.",
|
|
382
|
+
"required": true
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "raised",
|
|
386
|
+
"type": "number",
|
|
387
|
+
"default": null,
|
|
388
|
+
"description": "The amount raised, in **minor units** (cents).",
|
|
389
|
+
"required": true
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "title",
|
|
393
|
+
"type": "string",
|
|
394
|
+
"default": null,
|
|
395
|
+
"description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
|
|
396
|
+
"required": true
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "brand",
|
|
400
|
+
"type": "BrandId",
|
|
401
|
+
"default": null,
|
|
402
|
+
"description": "The brand whose palette the charts use. Without it, a chart follows a `.brand-<id>` ancestor, else Krizaka. Set it\nwhen the app loads a brand stylesheet on `:root` (`@krizaka/tokens/brands/orazaka.css`).",
|
|
403
|
+
"required": false
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "className",
|
|
407
|
+
"type": "string",
|
|
408
|
+
"default": null,
|
|
409
|
+
"description": "A class on the figure (layout: margins, grid placement).",
|
|
410
|
+
"required": false
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "description",
|
|
414
|
+
"type": "ReactNode",
|
|
415
|
+
"default": null,
|
|
416
|
+
"description": "A sentence under the title: the period, the unit, the source.",
|
|
417
|
+
"required": false
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "empty",
|
|
421
|
+
"type": "ReactNode",
|
|
422
|
+
"default": null,
|
|
423
|
+
"description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
|
|
424
|
+
"required": false
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "error",
|
|
428
|
+
"type": "ReactNode",
|
|
429
|
+
"default": null,
|
|
430
|
+
"description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
|
|
431
|
+
"required": false
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "height",
|
|
435
|
+
"type": "number",
|
|
436
|
+
"default": null,
|
|
437
|
+
"description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
|
|
438
|
+
"required": false
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "hideTitle",
|
|
442
|
+
"type": "boolean",
|
|
443
|
+
"default": null,
|
|
444
|
+
"description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
|
|
445
|
+
"required": false
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "id",
|
|
449
|
+
"type": "string",
|
|
450
|
+
"default": null,
|
|
451
|
+
"description": "The id of the figure.",
|
|
452
|
+
"required": false
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "labels",
|
|
456
|
+
"type": "Partial<GoalLabels>",
|
|
457
|
+
"default": null,
|
|
458
|
+
"description": "The words, passed translated; English by default.",
|
|
459
|
+
"required": false
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "live",
|
|
463
|
+
"type": "boolean",
|
|
464
|
+
"default": null,
|
|
465
|
+
"description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
|
|
466
|
+
"required": false
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"name": "loading",
|
|
470
|
+
"type": "boolean",
|
|
471
|
+
"default": null,
|
|
472
|
+
"description": "The data is on its way: a skeleton of the chart, announced once.",
|
|
473
|
+
"required": false
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "locale",
|
|
477
|
+
"type": "Locale",
|
|
478
|
+
"default": null,
|
|
479
|
+
"description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
|
|
480
|
+
"required": false
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "style",
|
|
484
|
+
"type": "CSSProperties",
|
|
485
|
+
"default": null,
|
|
486
|
+
"description": "Inline style on the figure (layout only: colours come from the tokens).",
|
|
487
|
+
"required": false
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "summary",
|
|
491
|
+
"type": "\"hidden\" | \"visible\"",
|
|
492
|
+
"default": null,
|
|
493
|
+
"description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
|
|
494
|
+
"required": false
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "summaryText",
|
|
498
|
+
"type": "string",
|
|
499
|
+
"default": null,
|
|
500
|
+
"description": "Your own summary instead of the generated one (still read first by screen readers).",
|
|
501
|
+
"required": false
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "supporters",
|
|
505
|
+
"type": "number",
|
|
506
|
+
"default": null,
|
|
507
|
+
"description": "How many people chipped in.",
|
|
508
|
+
"required": false
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "timeLeft",
|
|
512
|
+
"type": "ReactNode",
|
|
513
|
+
"default": null,
|
|
514
|
+
"description": "The time left, written by the app (a `Countdown`, “2 days”).",
|
|
515
|
+
"required": false
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
}
|
package/registry/heatmap.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"category": "charts",
|
|
10
10
|
"platforms": "web",
|
|
11
11
|
"engine": "echarts",
|
|
12
|
+
"tier": "advanced",
|
|
12
13
|
"whenToUse": [
|
|
13
14
|
"When something happens: uploads by weekday and hour, errors by service and day.",
|
|
14
15
|
"A matrix of two categorical dimensions with a value in each cell."
|