@graphysdk/theme-financial 0.0.0-stage → 0.1.0
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/LICENSE.md +17 -0
- package/README.md +59 -2
- package/dist/financial.d.ts +12 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +239 -0
- package/dist/styles.d.ts +36 -0
- package/fonts.css +2 -0
- package/licenses/PolyForm-Free-Trial-1.0.0.md +93 -0
- package/licenses/PolyForm-NonCommercial-1.0.0.md +131 -0
- package/licenses/PolyForm-Small-Business-1.0.0.md +121 -0
- package/package.json +79 -3
- package/src/fonts.css.d.ts +2 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
This software is available under any of the following licenses, at your option,
|
|
4
|
+
depending on which one's conditions you meet:
|
|
5
|
+
|
|
6
|
+
- **PolyForm Noncommercial 1.0.0** — for noncommercial use (personal,
|
|
7
|
+
charitable, educational, research, government).
|
|
8
|
+
See [licenses/PolyForm-NonCommercial-1.0.0.md](licenses/PolyForm-NonCommercial-1.0.0.md)
|
|
9
|
+
|
|
10
|
+
- **PolyForm Small Business 1.0.0** — free commercial use for organizations
|
|
11
|
+
under the size thresholds defined in the license.
|
|
12
|
+
See [licenses/PolyForm-Small-Business-1.0.0.md](licenses/PolyForm-Small-Business-1.0.0.md)
|
|
13
|
+
|
|
14
|
+
- **PolyForm Free Trial 1.0.0** — a 32-day evaluation for anyone else.
|
|
15
|
+
See [licenses/PolyForm-Free-Trial-1.0.0.md](licenses/PolyForm-Free-Trial-1.0.0.md)
|
|
16
|
+
|
|
17
|
+
For commercial use beyond these terms, contact [hello@graphy.dev](mailto:hello@graphy.dev) or visit [https://graphy.dev](https://graphy.dev).
|
package/README.md
CHANGED
|
@@ -1,3 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @graphysdk/theme-financial
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
> **Beta.** This theme is on a `0.x` version line: a minor release may change how it draws. Use a caret range (`^0.1.0`) to take only patches.
|
|
4
|
+
|
|
5
|
+
A theme for the Graphy charting SDK that draws graphs the way a newspaper's business pages print them: salmon paper, solid rules with the values on the right, a ruled baseline, and flat colour.
|
|
6
|
+
|
|
7
|
+
Learn more at [graphy.dev](https://graphy.dev).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @graphysdk/theme-financial @graphysdk/react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires React 19. Its only peer is `@graphysdk/react`.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Pass the theme to `createGraphyKit` and import its fonts once. Every graph drawn through the kit's `GraphProvider` takes the theme; specs are written as usual.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { createGraphyKit, GraphRenderer } from '@graphysdk/react';
|
|
23
|
+
import { financial } from '@graphysdk/theme-financial';
|
|
24
|
+
import '@graphysdk/theme-financial/fonts.css';
|
|
25
|
+
|
|
26
|
+
const kit = createGraphyKit({ theme: financial });
|
|
27
|
+
|
|
28
|
+
const spec = kit.pipe(
|
|
29
|
+
kit.createSpec({ x: 'quarter', y: 'revenue', color: 'region' }),
|
|
30
|
+
kit.geom.bar({ position: 'dodge' }),
|
|
31
|
+
kit.scale.x(),
|
|
32
|
+
kit.scale.y()
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export function Revenue({ data }) {
|
|
36
|
+
return (
|
|
37
|
+
<kit.GraphProvider spec={spec} data={data}>
|
|
38
|
+
<GraphRenderer />
|
|
39
|
+
</kit.GraphProvider>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
A spec's own `styles()`, scales and `config()` sit above the theme, so a graph can still change anything. The theme is drawn for a graph about 600 pixels wide; `style.graph({ textScale: 1.5 })` scales its type for a larger one.
|
|
45
|
+
|
|
46
|
+
`fonts.css` loads Source Sans 3 from Google Fonts. To host the font yourself, leave the import out and load a family named `Source Sans 3` before the first graph is drawn.
|
|
47
|
+
|
|
48
|
+
## Docs
|
|
49
|
+
|
|
50
|
+
- [Financial](https://docs.graphy.dev/sdk-next/themes/financial)
|
|
51
|
+
|
|
52
|
+
## Feedback
|
|
53
|
+
|
|
54
|
+
This theme is released early to hear what works. Tell us on [Discord](https://discord.gg/yGmYCjkSr).
|
|
55
|
+
|
|
56
|
+
## Licence
|
|
57
|
+
|
|
58
|
+
This package is available under PolyForm Noncommercial, Small Business, or a 32-day Free Trial. Free Trial is local or internal evaluation only — it does not cover a public page. See [what you can do under the trial](https://docs.graphy.dev/licence/evaluation).
|
|
59
|
+
|
|
60
|
+
For a commercial licence, [talk to us](https://graphy.dev/license).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Theme } from '@graphysdk/react';
|
|
2
|
+
/**
|
|
3
|
+
* Graphs as a newspaper's business pages print them: salmon paper, solid rules across the plot with
|
|
4
|
+
* the values at their right-hand end, a ruled baseline with ticks, and flat colour. Groups take ten
|
|
5
|
+
* muted colours, blue, red and aqua first. Drawn for the light scheme only.
|
|
6
|
+
*
|
|
7
|
+
* The face is Source Sans 3. Import `@graphysdk/theme-financial/fonts.css` once to load it.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const kit = createGraphyKit({ theme: financial });
|
|
11
|
+
*/
|
|
12
|
+
export declare const financial: Theme;
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=require("@graphysdk/react");var t={paper:"#FFF1E5",raised:"#FFF9F5",divider:"#FFF9F5",text:"#33302E",secondary:"#66605C",rule:"#CCC1B7",axis:"#66605C",edge:"#E0D3C5"},n="'Source Sans 3', ui-sans-serif, system-ui, sans-serif",i={blue:"#468DC2",red:"#BD3F44",aqua:"#8ED9E3",navy:"#14466B",ochre:"#DDA63A",teal:"#21878C",pink:"#E58AA6",claret:"#8A2346",stone:"#C5C7AE",green:"#5F9150"},a=[i.blue,i.red,i.aqua,i.navy,i.ochre,i.teal,i.pink,i.claret,i.stone,i.green],l=["#DCE9F2",i.navy],r={textColor:t.text},o={textColor:t.secondary},s={tokens:{graphBackground:t.paper,graphBorder:t.edge,geom:i.blue,geomBorder:t.divider,textPrimary:t.text,textSecondary:t.secondary,ruleLine:t.text,gridLine:t.rule,hoverAffordance:t.text,hoverGuideFill:"rgba(51, 48, 46, 0.06)",hoverGuideLine:t.axis,tooltipBackground:t.raised,tooltipBorder:t.edge,tooltipPrimaryRow:"rgba(51, 48, 46, 0.06)",annotationShape:t.rule,annotationArrow:t.text,differenceLabelBackground:t.paper},defaults:[e.style.graph({strokeWidth:0,cornerRadius:0,fontFamily:n,padding:20}),e.style.geom.bar({strokeWidth:1,cornerRadius:"none"}),e.style.geom.bar({stroke:t.divider},{state:"hovered"}),e.style.geom.line({strokeWidth:2.5,dashArray:[],lineCap:"round",lineJoin:"round"}),e.style.geom.area({fillAlpha:.35,strokeWidth:2,dashArray:[],lineCap:"round",lineJoin:"round"}),e.style.geom.point({size:8,stroke:t.paper,strokeWidth:1}),e.style.geom.tile({cornerRadius:0,stroke:t.paper,strokeWidth:1}),e.style.geom.tile({stroke:t.divider},{state:"hovered"}),e.style.geom.rule({strokeWidth:1.5,dashArray:[1.5,3]}),e.style.geom.rule.label({...r,fontWeight:400,fontSize:14}),e.style.gridLine({dashArray:[]}),e.style.gridLine.x({strokeWidth:0}),e.style.gridLine.y({strokeWidth:1}),e.style.panelBorder({strokeWidth:0}),e.style.panelBorder.bottom({stroke:t.axis,strokeWidth:1,dashArray:[]}),e.style.tickLine({strokeWidth:0}),e.style.tickLine.x({stroke:t.axis,strokeWidth:1,length:6}),e.style.tickLabel({...r,fontWeight:400,fontSize:14,lineHeight:1}),e.style.axisLabel({...o,fontWeight:400,fontSize:14,lineHeight:1}),e.style.heading({...r}),e.style.heading.h1({fontWeight:600,fontSize:22,lineHeight:1.2}),e.style.heading.h2({...o,fontWeight:400,fontSize:16,lineHeight:1.3}),e.style.caption({...o,fontWeight:400,fontSize:13}),e.style.source({...o,fontWeight:400,fontSize:13}),e.style.dataLabel({...r,fontWeight:400,fontSize:14,fill:"transparent"}),e.style.legendItem({...r,fontWeight:400,fontSize:14,fill:"transparent",stroke:"transparent"}),e.style.directLabel({fontWeight:600,fontSize:14}),e.style.tooltip({strokeWidth:1,cornerRadius:2,paddingInline:10,paddingBlock:8}),e.style.tooltip.heading({...r,fontWeight:600,fontSize:14,lineHeight:1.3}),e.style.tooltip.label({...o,fontWeight:400,fontSize:14,lineHeight:1.3}),e.style.tooltip.value({...r,fontWeight:600,fontSize:14,lineHeight:1.3}),e.style.annotation.text({...r,fill:"transparent",strokeWidth:0,fontSize:14,lineHeight:1.2}),e.style.annotation.shape({fillAlpha:.45,strokeWidth:0}),e.style.annotation.arrow({strokeWidth:1,dashArray:[]}),e.style.annotation.pinnedNumber({stroke:t.paper}),e.style.annotation.pinnedNumber.label({...r,fill:t.paper,stroke:t.rule,shadow:"none"}),e.style.annotation.differenceArrow({stroke:t.text,strokeWidth:1}),e.style.annotation.differenceArrow.label({...r,fill:t.paper,stroke:t.rule,strokeWidth:1,fontSize:14}),e.style.panelBorder.bottom({strokeWidth:0},{coord:"polar"})]},d={name:"financial",styles:s,palette:a,colormap:l,config:{axes:{y:{position:"right"}},legend:{position:"top",align:"start"}},colorScheme:"light"};exports.financial=d;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { financial } from './financial';
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { style as e } from "@graphysdk/react";
|
|
2
|
+
var t = {
|
|
3
|
+
paper: "#FFF1E5",
|
|
4
|
+
raised: "#FFF9F5",
|
|
5
|
+
divider: "#FFF9F5",
|
|
6
|
+
text: "#33302E",
|
|
7
|
+
secondary: "#66605C",
|
|
8
|
+
rule: "#CCC1B7",
|
|
9
|
+
axis: "#66605C",
|
|
10
|
+
edge: "#E0D3C5"
|
|
11
|
+
}, n = "'Source Sans 3', ui-sans-serif, system-ui, sans-serif", i = {
|
|
12
|
+
blue: "#468DC2",
|
|
13
|
+
red: "#BD3F44",
|
|
14
|
+
aqua: "#8ED9E3",
|
|
15
|
+
navy: "#14466B",
|
|
16
|
+
ochre: "#DDA63A",
|
|
17
|
+
teal: "#21878C",
|
|
18
|
+
pink: "#E58AA6",
|
|
19
|
+
claret: "#8A2346",
|
|
20
|
+
stone: "#C5C7AE",
|
|
21
|
+
green: "#5F9150"
|
|
22
|
+
}, a = [
|
|
23
|
+
i.blue,
|
|
24
|
+
i.red,
|
|
25
|
+
i.aqua,
|
|
26
|
+
i.navy,
|
|
27
|
+
i.ochre,
|
|
28
|
+
i.teal,
|
|
29
|
+
i.pink,
|
|
30
|
+
i.claret,
|
|
31
|
+
i.stone,
|
|
32
|
+
i.green
|
|
33
|
+
], d = ["#DCE9F2", i.navy], o = { textColor: t.text }, r = { textColor: t.secondary }, l = {
|
|
34
|
+
tokens: {
|
|
35
|
+
graphBackground: t.paper,
|
|
36
|
+
graphBorder: t.edge,
|
|
37
|
+
geom: i.blue,
|
|
38
|
+
geomBorder: t.divider,
|
|
39
|
+
textPrimary: t.text,
|
|
40
|
+
textSecondary: t.secondary,
|
|
41
|
+
ruleLine: t.text,
|
|
42
|
+
gridLine: t.rule,
|
|
43
|
+
hoverAffordance: t.text,
|
|
44
|
+
hoverGuideFill: "rgba(51, 48, 46, 0.06)",
|
|
45
|
+
hoverGuideLine: t.axis,
|
|
46
|
+
tooltipBackground: t.raised,
|
|
47
|
+
tooltipBorder: t.edge,
|
|
48
|
+
tooltipPrimaryRow: "rgba(51, 48, 46, 0.06)",
|
|
49
|
+
annotationShape: t.rule,
|
|
50
|
+
annotationArrow: t.text,
|
|
51
|
+
differenceLabelBackground: t.paper
|
|
52
|
+
},
|
|
53
|
+
defaults: [
|
|
54
|
+
e.graph({
|
|
55
|
+
strokeWidth: 0,
|
|
56
|
+
cornerRadius: 0,
|
|
57
|
+
fontFamily: n,
|
|
58
|
+
padding: 20
|
|
59
|
+
}),
|
|
60
|
+
e.geom.bar({
|
|
61
|
+
strokeWidth: 1,
|
|
62
|
+
cornerRadius: "none"
|
|
63
|
+
}),
|
|
64
|
+
e.geom.bar({ stroke: t.divider }, { state: "hovered" }),
|
|
65
|
+
e.geom.line({
|
|
66
|
+
strokeWidth: 2.5,
|
|
67
|
+
dashArray: [],
|
|
68
|
+
lineCap: "round",
|
|
69
|
+
lineJoin: "round"
|
|
70
|
+
}),
|
|
71
|
+
e.geom.area({
|
|
72
|
+
fillAlpha: 0.35,
|
|
73
|
+
strokeWidth: 2,
|
|
74
|
+
dashArray: [],
|
|
75
|
+
lineCap: "round",
|
|
76
|
+
lineJoin: "round"
|
|
77
|
+
}),
|
|
78
|
+
e.geom.point({
|
|
79
|
+
size: 8,
|
|
80
|
+
stroke: t.paper,
|
|
81
|
+
strokeWidth: 1
|
|
82
|
+
}),
|
|
83
|
+
e.geom.tile({
|
|
84
|
+
cornerRadius: 0,
|
|
85
|
+
stroke: t.paper,
|
|
86
|
+
strokeWidth: 1
|
|
87
|
+
}),
|
|
88
|
+
e.geom.tile({ stroke: t.divider }, { state: "hovered" }),
|
|
89
|
+
e.geom.rule({
|
|
90
|
+
strokeWidth: 1.5,
|
|
91
|
+
dashArray: [1.5, 3]
|
|
92
|
+
}),
|
|
93
|
+
e.geom.rule.label({
|
|
94
|
+
...o,
|
|
95
|
+
fontWeight: 400,
|
|
96
|
+
fontSize: 14
|
|
97
|
+
}),
|
|
98
|
+
e.gridLine({ dashArray: [] }),
|
|
99
|
+
e.gridLine.x({ strokeWidth: 0 }),
|
|
100
|
+
e.gridLine.y({ strokeWidth: 1 }),
|
|
101
|
+
e.panelBorder({ strokeWidth: 0 }),
|
|
102
|
+
e.panelBorder.bottom({
|
|
103
|
+
stroke: t.axis,
|
|
104
|
+
strokeWidth: 1,
|
|
105
|
+
dashArray: []
|
|
106
|
+
}),
|
|
107
|
+
e.tickLine({ strokeWidth: 0 }),
|
|
108
|
+
e.tickLine.x({
|
|
109
|
+
stroke: t.axis,
|
|
110
|
+
strokeWidth: 1,
|
|
111
|
+
length: 6
|
|
112
|
+
}),
|
|
113
|
+
e.tickLabel({
|
|
114
|
+
...o,
|
|
115
|
+
fontWeight: 400,
|
|
116
|
+
fontSize: 14,
|
|
117
|
+
lineHeight: 1
|
|
118
|
+
}),
|
|
119
|
+
e.axisLabel({
|
|
120
|
+
...r,
|
|
121
|
+
fontWeight: 400,
|
|
122
|
+
fontSize: 14,
|
|
123
|
+
lineHeight: 1
|
|
124
|
+
}),
|
|
125
|
+
e.heading({ ...o }),
|
|
126
|
+
e.heading.h1({
|
|
127
|
+
fontWeight: 600,
|
|
128
|
+
fontSize: 22,
|
|
129
|
+
lineHeight: 1.2
|
|
130
|
+
}),
|
|
131
|
+
e.heading.h2({
|
|
132
|
+
...r,
|
|
133
|
+
fontWeight: 400,
|
|
134
|
+
fontSize: 16,
|
|
135
|
+
lineHeight: 1.3
|
|
136
|
+
}),
|
|
137
|
+
e.caption({
|
|
138
|
+
...r,
|
|
139
|
+
fontWeight: 400,
|
|
140
|
+
fontSize: 13
|
|
141
|
+
}),
|
|
142
|
+
e.source({
|
|
143
|
+
...r,
|
|
144
|
+
fontWeight: 400,
|
|
145
|
+
fontSize: 13
|
|
146
|
+
}),
|
|
147
|
+
e.dataLabel({
|
|
148
|
+
...o,
|
|
149
|
+
fontWeight: 400,
|
|
150
|
+
fontSize: 14,
|
|
151
|
+
fill: "transparent"
|
|
152
|
+
}),
|
|
153
|
+
e.legendItem({
|
|
154
|
+
...o,
|
|
155
|
+
fontWeight: 400,
|
|
156
|
+
fontSize: 14,
|
|
157
|
+
fill: "transparent",
|
|
158
|
+
stroke: "transparent"
|
|
159
|
+
}),
|
|
160
|
+
e.directLabel({
|
|
161
|
+
fontWeight: 600,
|
|
162
|
+
fontSize: 14
|
|
163
|
+
}),
|
|
164
|
+
e.tooltip({
|
|
165
|
+
strokeWidth: 1,
|
|
166
|
+
cornerRadius: 2,
|
|
167
|
+
paddingInline: 10,
|
|
168
|
+
paddingBlock: 8
|
|
169
|
+
}),
|
|
170
|
+
e.tooltip.heading({
|
|
171
|
+
...o,
|
|
172
|
+
fontWeight: 600,
|
|
173
|
+
fontSize: 14,
|
|
174
|
+
lineHeight: 1.3
|
|
175
|
+
}),
|
|
176
|
+
e.tooltip.label({
|
|
177
|
+
...r,
|
|
178
|
+
fontWeight: 400,
|
|
179
|
+
fontSize: 14,
|
|
180
|
+
lineHeight: 1.3
|
|
181
|
+
}),
|
|
182
|
+
e.tooltip.value({
|
|
183
|
+
...o,
|
|
184
|
+
fontWeight: 600,
|
|
185
|
+
fontSize: 14,
|
|
186
|
+
lineHeight: 1.3
|
|
187
|
+
}),
|
|
188
|
+
e.annotation.text({
|
|
189
|
+
...o,
|
|
190
|
+
fill: "transparent",
|
|
191
|
+
strokeWidth: 0,
|
|
192
|
+
fontSize: 14,
|
|
193
|
+
lineHeight: 1.2
|
|
194
|
+
}),
|
|
195
|
+
e.annotation.shape({
|
|
196
|
+
fillAlpha: 0.45,
|
|
197
|
+
strokeWidth: 0
|
|
198
|
+
}),
|
|
199
|
+
e.annotation.arrow({
|
|
200
|
+
strokeWidth: 1,
|
|
201
|
+
dashArray: []
|
|
202
|
+
}),
|
|
203
|
+
e.annotation.pinnedNumber({ stroke: t.paper }),
|
|
204
|
+
e.annotation.pinnedNumber.label({
|
|
205
|
+
...o,
|
|
206
|
+
fill: t.paper,
|
|
207
|
+
stroke: t.rule,
|
|
208
|
+
shadow: "none"
|
|
209
|
+
}),
|
|
210
|
+
e.annotation.differenceArrow({
|
|
211
|
+
stroke: t.text,
|
|
212
|
+
strokeWidth: 1
|
|
213
|
+
}),
|
|
214
|
+
e.annotation.differenceArrow.label({
|
|
215
|
+
...o,
|
|
216
|
+
fill: t.paper,
|
|
217
|
+
stroke: t.rule,
|
|
218
|
+
strokeWidth: 1,
|
|
219
|
+
fontSize: 14
|
|
220
|
+
}),
|
|
221
|
+
e.panelBorder.bottom({ strokeWidth: 0 }, { coord: "polar" })
|
|
222
|
+
]
|
|
223
|
+
}, h = {
|
|
224
|
+
name: "financial",
|
|
225
|
+
styles: l,
|
|
226
|
+
palette: a,
|
|
227
|
+
colormap: d,
|
|
228
|
+
config: {
|
|
229
|
+
axes: { y: { position: "right" } },
|
|
230
|
+
legend: {
|
|
231
|
+
position: "top",
|
|
232
|
+
align: "start"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
colorScheme: "light"
|
|
236
|
+
};
|
|
237
|
+
export {
|
|
238
|
+
h as financial
|
|
239
|
+
};
|
package/dist/styles.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Stylesheet } from '@graphysdk/react';
|
|
2
|
+
export declare const FINANCIAL_COLORS: {
|
|
3
|
+
readonly paper: "#FFF1E5";
|
|
4
|
+
readonly raised: "#FFF9F5";
|
|
5
|
+
readonly divider: "#FFF9F5";
|
|
6
|
+
readonly text: "#33302E";
|
|
7
|
+
readonly secondary: "#66605C";
|
|
8
|
+
readonly rule: "#CCC1B7";
|
|
9
|
+
readonly axis: "#66605C";
|
|
10
|
+
readonly edge: "#E0D3C5";
|
|
11
|
+
};
|
|
12
|
+
export declare const FINANCIAL_HUES: {
|
|
13
|
+
readonly blue: "#468DC2";
|
|
14
|
+
readonly red: "#BD3F44";
|
|
15
|
+
readonly aqua: "#8ED9E3";
|
|
16
|
+
readonly navy: "#14466B";
|
|
17
|
+
readonly ochre: "#DDA63A";
|
|
18
|
+
readonly teal: "#21878C";
|
|
19
|
+
readonly pink: "#E58AA6";
|
|
20
|
+
readonly claret: "#8A2346";
|
|
21
|
+
readonly stone: "#C5C7AE";
|
|
22
|
+
readonly green: "#5F9150";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The order groups take their colours in. A dark colour follows each pale one, so two neighbours in a
|
|
26
|
+
* stack or a legend are told apart by how dark they are as well as by their hue.
|
|
27
|
+
*/
|
|
28
|
+
export declare const FINANCIAL_PALETTE: readonly string[];
|
|
29
|
+
/** For a colour that stands for a number: from a pale blue to the darkest. */
|
|
30
|
+
export declare const FINANCIAL_COLORMAP: readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* Salmon paper with no frame, solid rules for the values and none for the categories, a baseline
|
|
33
|
+
* ruled in a darker grey with ticks under it, and square shapes in flat colour, the bars of a stack
|
|
34
|
+
* parted by a thin pale line.
|
|
35
|
+
*/
|
|
36
|
+
export declare const financialStyles: Stylesheet;
|
package/fonts.css
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# PolyForm Free Trial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/free-trial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software
|
|
14
|
+
to do everything you might do with the software that would
|
|
15
|
+
otherwise infringe the licensor's copyright in it for any
|
|
16
|
+
permitted purpose. However, you may only make changes or
|
|
17
|
+
new works based on the software according to [Changes and New
|
|
18
|
+
Works License](#changes-and-new-works-license), and you may
|
|
19
|
+
not distribute copies of the software.
|
|
20
|
+
|
|
21
|
+
## Changes and New Works License
|
|
22
|
+
|
|
23
|
+
The licensor grants you an additional copyright license to
|
|
24
|
+
make changes and new works based on the software for any
|
|
25
|
+
permitted purpose.
|
|
26
|
+
|
|
27
|
+
## Patent License
|
|
28
|
+
|
|
29
|
+
The licensor grants you a patent license for the software that
|
|
30
|
+
covers patent claims the licensor can license, or becomes able
|
|
31
|
+
to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Fair Use
|
|
34
|
+
|
|
35
|
+
You may have "fair use" rights for the software under the
|
|
36
|
+
law. These terms do not limit them.
|
|
37
|
+
|
|
38
|
+
## Free Trial
|
|
39
|
+
|
|
40
|
+
Use to evaluate whether the software suits a particular
|
|
41
|
+
application for less than 32 consecutive calendar days, on
|
|
42
|
+
behalf of you or your company, is use for a permitted purpose.
|
|
43
|
+
|
|
44
|
+
## No Other Rights
|
|
45
|
+
|
|
46
|
+
These terms do not allow you to sublicense or transfer any of
|
|
47
|
+
your licenses to anyone else, or prevent the licensor from
|
|
48
|
+
granting licenses to anyone else. These terms do not imply
|
|
49
|
+
any other licenses.
|
|
50
|
+
|
|
51
|
+
## Patent Defense
|
|
52
|
+
|
|
53
|
+
If you make any written claim that the software infringes or
|
|
54
|
+
contributes to infringement of any patent, your patent license
|
|
55
|
+
for the software granted under these terms ends immediately. If
|
|
56
|
+
your company makes such a claim, your patent license ends
|
|
57
|
+
immediately for work on behalf of your company.
|
|
58
|
+
|
|
59
|
+
## Violations
|
|
60
|
+
|
|
61
|
+
If you violate any of these terms, or do anything with the
|
|
62
|
+
software not covered by your licenses, all your licenses
|
|
63
|
+
end immediately.
|
|
64
|
+
|
|
65
|
+
## No Liability
|
|
66
|
+
|
|
67
|
+
_**As far as the law allows, the software comes as is, without
|
|
68
|
+
any warranty or condition, and the licensor will not be liable
|
|
69
|
+
to you for any damages arising out of these terms or the use
|
|
70
|
+
or nature of the software, under any kind of legal claim.**_
|
|
71
|
+
|
|
72
|
+
## Definitions
|
|
73
|
+
|
|
74
|
+
The **licensor** is the individual or entity offering these
|
|
75
|
+
terms, and the **software** is the software the licensor makes
|
|
76
|
+
available under these terms.
|
|
77
|
+
|
|
78
|
+
**You** refers to the individual or entity agreeing to these
|
|
79
|
+
terms.
|
|
80
|
+
|
|
81
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
82
|
+
or other kind of organization that you work for, plus all
|
|
83
|
+
organizations that have control over, are under the control of,
|
|
84
|
+
or are under common control with that organization. **Control**
|
|
85
|
+
means ownership of substantially all the assets of an entity,
|
|
86
|
+
or the power to direct its management and policies by vote,
|
|
87
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
88
|
+
|
|
89
|
+
**Your licenses** are all the licenses granted to you for the
|
|
90
|
+
software under these terms.
|
|
91
|
+
|
|
92
|
+
**Use** means anything you do with the software requiring one
|
|
93
|
+
of your licenses.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to [Distribution
|
|
18
|
+
License](#distribution-license) and make changes or new works
|
|
19
|
+
based on the software according to [Changes and New Works
|
|
20
|
+
License](#changes-and-new-works-license).
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Graphy Technologies Ltd. (https://graphy.dev)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Noncommercial Purposes
|
|
53
|
+
|
|
54
|
+
Any noncommercial purpose is a permitted purpose.
|
|
55
|
+
|
|
56
|
+
## Personal Uses
|
|
57
|
+
|
|
58
|
+
Personal use for research, experiment, and testing for
|
|
59
|
+
the benefit of public knowledge, personal study, private
|
|
60
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
61
|
+
observance, without any anticipated commercial application,
|
|
62
|
+
is use for a permitted purpose.
|
|
63
|
+
|
|
64
|
+
## Noncommercial Organizations
|
|
65
|
+
|
|
66
|
+
Use by any charitable organization, educational institution,
|
|
67
|
+
public research organization, public safety or health
|
|
68
|
+
organization, environmental protection organization,
|
|
69
|
+
or government institution is use for a permitted purpose
|
|
70
|
+
regardless of the source of funding or obligations resulting
|
|
71
|
+
from the funding.
|
|
72
|
+
|
|
73
|
+
## Fair Use
|
|
74
|
+
|
|
75
|
+
You may have "fair use" rights for the software under the
|
|
76
|
+
law. These terms do not limit them.
|
|
77
|
+
|
|
78
|
+
## No Other Rights
|
|
79
|
+
|
|
80
|
+
These terms do not allow you to sublicense or transfer any of
|
|
81
|
+
your licenses to anyone else, or prevent the licensor from
|
|
82
|
+
granting licenses to anyone else. These terms do not imply
|
|
83
|
+
any other licenses.
|
|
84
|
+
|
|
85
|
+
## Patent Defense
|
|
86
|
+
|
|
87
|
+
If you make any written claim that the software infringes or
|
|
88
|
+
contributes to infringement of any patent, your patent license
|
|
89
|
+
for the software granted under these terms ends immediately. If
|
|
90
|
+
your company makes such a claim, your patent license ends
|
|
91
|
+
immediately for work on behalf of your company.
|
|
92
|
+
|
|
93
|
+
## Violations
|
|
94
|
+
|
|
95
|
+
The first time you are notified in writing that you have
|
|
96
|
+
violated any of these terms, or done anything with the software
|
|
97
|
+
not covered by your licenses, your licenses can nonetheless
|
|
98
|
+
continue if you come into full compliance with these terms,
|
|
99
|
+
and take practical steps to correct past violations, within
|
|
100
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
101
|
+
end immediately.
|
|
102
|
+
|
|
103
|
+
## No Liability
|
|
104
|
+
|
|
105
|
+
_**As far as the law allows, the software comes as is, without
|
|
106
|
+
any warranty or condition, and the licensor will not be liable
|
|
107
|
+
to you for any damages arising out of these terms or the use
|
|
108
|
+
or nature of the software, under any kind of legal claim.**_
|
|
109
|
+
|
|
110
|
+
## Definitions
|
|
111
|
+
|
|
112
|
+
The **licensor** is the individual or entity offering these
|
|
113
|
+
terms, and the **software** is the software the licensor makes
|
|
114
|
+
available under these terms.
|
|
115
|
+
|
|
116
|
+
**You** refers to the individual or entity agreeing to these
|
|
117
|
+
terms.
|
|
118
|
+
|
|
119
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
120
|
+
or other kind of organization that you work for, plus all
|
|
121
|
+
organizations that have control over, are under the control of,
|
|
122
|
+
or are under common control with that organization. **Control**
|
|
123
|
+
means ownership of substantially all the assets of an entity,
|
|
124
|
+
or the power to direct its management and policies by vote,
|
|
125
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
126
|
+
|
|
127
|
+
**Your licenses** are all the licenses granted to you for the
|
|
128
|
+
software under these terms.
|
|
129
|
+
|
|
130
|
+
**Use** means anything you do with the software requiring one
|
|
131
|
+
of your licenses.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# PolyForm Small Business License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/small-business/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to [Distribution
|
|
18
|
+
License](#distribution-license) and make changes or new works
|
|
19
|
+
based on the software according to [Changes and New Works
|
|
20
|
+
License](#changes-and-new-works-license).
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Graphy Technologies Ltd. (https://graphy.dev)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Fair Use
|
|
53
|
+
|
|
54
|
+
You may have "fair use" rights for the software under the
|
|
55
|
+
law. These terms do not limit them.
|
|
56
|
+
|
|
57
|
+
## Small Business
|
|
58
|
+
|
|
59
|
+
Use of the software for the benefit of your company is use for
|
|
60
|
+
a permitted purpose if your company has fewer than 100 total
|
|
61
|
+
individuals working as employees and independent contractors,
|
|
62
|
+
and less than 1,000,000 USD (2019) total revenue in the prior
|
|
63
|
+
tax year. Adjust this revenue threshold for inflation according
|
|
64
|
+
to the United States Bureau of Labor Statistics' consumer price
|
|
65
|
+
index for all urban consumers, U.S. city average, for all items,
|
|
66
|
+
not seasonally adjusted, with 1982–1984=100 reference base.
|
|
67
|
+
|
|
68
|
+
## No Other Rights
|
|
69
|
+
|
|
70
|
+
These terms do not allow you to sublicense or transfer any of
|
|
71
|
+
your licenses to anyone else, or prevent the licensor from
|
|
72
|
+
granting licenses to anyone else. These terms do not imply
|
|
73
|
+
any other licenses.
|
|
74
|
+
|
|
75
|
+
## Patent Defense
|
|
76
|
+
|
|
77
|
+
If you make any written claim that the software infringes or
|
|
78
|
+
contributes to infringement of any patent, your patent license
|
|
79
|
+
for the software granted under these terms ends immediately. If
|
|
80
|
+
your company makes such a claim, your patent license ends
|
|
81
|
+
immediately for work on behalf of your company.
|
|
82
|
+
|
|
83
|
+
## Violations
|
|
84
|
+
|
|
85
|
+
The first time you are notified in writing that you have
|
|
86
|
+
violated any of these terms, or done anything with the software
|
|
87
|
+
not covered by your licenses, your licenses can nonetheless
|
|
88
|
+
continue if you come into full compliance with these terms,
|
|
89
|
+
and take practical steps to correct past violations, within
|
|
90
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
91
|
+
end immediately.
|
|
92
|
+
|
|
93
|
+
## No Liability
|
|
94
|
+
|
|
95
|
+
_**As far as the law allows, the software comes as is, without
|
|
96
|
+
any warranty or condition, and the licensor will not be liable
|
|
97
|
+
to you for any damages arising out of these terms or the use
|
|
98
|
+
or nature of the software, under any kind of legal claim.**_
|
|
99
|
+
|
|
100
|
+
## Definitions
|
|
101
|
+
|
|
102
|
+
The **licensor** is the individual or entity offering these
|
|
103
|
+
terms, and the **software** is the software the licensor makes
|
|
104
|
+
available under these terms.
|
|
105
|
+
|
|
106
|
+
**You** refers to the individual or entity agreeing to these
|
|
107
|
+
terms.
|
|
108
|
+
|
|
109
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
110
|
+
or other kind of organization that you work for, plus all
|
|
111
|
+
organizations that have control over, are under the control of,
|
|
112
|
+
or are under common control with that organization. **Control**
|
|
113
|
+
means ownership of substantially all the assets of an entity,
|
|
114
|
+
or the power to direct its management and policies by vote,
|
|
115
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
116
|
+
|
|
117
|
+
**Your licenses** are all the licenses granted to you for the
|
|
118
|
+
software under these terms.
|
|
119
|
+
|
|
120
|
+
**Use** means anything you do with the software requiring one
|
|
121
|
+
of your licenses.
|
package/package.json
CHANGED
|
@@ -1,6 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphysdk/theme-financial",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"author": "Graphy",
|
|
4
|
+
"description": "Financial theme for the Graphy charting SDK (beta)",
|
|
5
|
+
"homepage": "https://docs.graphy.dev/sdk-next/themes/financial",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"graphy",
|
|
9
|
+
"chart",
|
|
10
|
+
"react",
|
|
11
|
+
"visualization",
|
|
12
|
+
"grammar-of-graphics",
|
|
13
|
+
"theme",
|
|
14
|
+
"financial"
|
|
15
|
+
],
|
|
16
|
+
"version": "0.1.0",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": [
|
|
19
|
+
"*.css"
|
|
20
|
+
],
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"fonts.css",
|
|
25
|
+
"src/fonts.css.d.ts",
|
|
26
|
+
"LICENSE.md",
|
|
27
|
+
"licenses",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.mjs",
|
|
34
|
+
"require": "./dist/index.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./fonts.css": {
|
|
37
|
+
"types": "./src/fonts.css.d.ts",
|
|
38
|
+
"default": "./fonts.css"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "^19.0.0",
|
|
43
|
+
"@graphysdk/react": "^1.9.0-beta.1791447671234"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@testing-library/react": "^16.3.1",
|
|
47
|
+
"@types/react": "^19.2.14",
|
|
48
|
+
"@types/react-dom": "^19.2.3",
|
|
49
|
+
"react": "^19.2.4",
|
|
50
|
+
"react-dom": "^19.2.4",
|
|
51
|
+
"rollup-plugin-node-externals": "^8.1.1",
|
|
52
|
+
"vite": "^8.1.5",
|
|
53
|
+
"vite-plugin-dts": "^4.5.4",
|
|
54
|
+
"vitest": "^4.1.11",
|
|
55
|
+
"@graphysdk/react": "1.9.0-beta.1791447671234",
|
|
56
|
+
"@graphytools/eslint-config": "0.0.1",
|
|
57
|
+
"@graphysdk/viz-engine": "1.8.0",
|
|
58
|
+
"@graphytools/typescript-config": "0.0.1",
|
|
59
|
+
"@graphytools/vitest-config": "1.0.0"
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
},
|
|
64
|
+
"lint-staged": {
|
|
65
|
+
"*.{ts,tsx,js,jsx,json,css,md}": [
|
|
66
|
+
"prettier --write"
|
|
67
|
+
],
|
|
68
|
+
"*.{ts,tsx}": [
|
|
69
|
+
"eslint --max-warnings=0 --fix"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "vite build",
|
|
74
|
+
"test": "vitest run",
|
|
75
|
+
"test:watch": "TZ=utc vitest",
|
|
76
|
+
"lint": "eslint . --max-warnings 0",
|
|
77
|
+
"lint:fix": "eslint . --fix",
|
|
78
|
+
"format": "prettier --write .",
|
|
79
|
+
"format:check": "prettier --check .",
|
|
80
|
+
"typecheck": "tsc --noEmit"
|
|
81
|
+
}
|
|
6
82
|
}
|