Skip to content

Commit 1616cac

Browse files
author
Marko Petzold
committed
thumbnail
1 parent c81760e commit 1616cac

4 files changed

Lines changed: 372 additions & 4 deletions

File tree

demo/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
padding: 0;
1111
width: 100%;
1212
height: 100%;
13-
background-color: aliceblue;
13+
background-color: #f5f5f5;
1414
font-family:
1515
Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
1616
--font-family-serif: Helvetica;
@@ -41,8 +41,8 @@
4141
import '../dist/widget-switch.js'
4242

4343
const data = await fetch('../src/default-data.json').then((res) => res.json())
44-
const themeObject = await fetch('themes/vintage.json').then((res) => res.json())
45-
const theme = { theme_name: 'vintage', theme_object: themeObject }
44+
const themeObject = await fetch('themes/light.json').then((res) => res.json())
45+
const theme = { theme_name: 'light', theme_object: themeObject }
4646
render(
4747
html`
4848
<${tag} .theme="${theme}" .inputData=${data}>

demo/themes/light.json

Lines changed: 368 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,368 @@
1+
{
2+
"color": [
3+
"#5470c6",
4+
"#91cc75",
5+
"#fac858",
6+
"#ee6666",
7+
"#73c0de",
8+
"#3ba272",
9+
"#fc8452",
10+
"#9a60b4",
11+
"#ea7ccc"
12+
],
13+
"backgroundColor": "rgba(0, 0, 0, 0)",
14+
"textStyle": {},
15+
"title": {
16+
"textStyle": {
17+
"color": "#464646"
18+
},
19+
"subtextStyle": {
20+
"color": "#6E7079"
21+
}
22+
},
23+
"line": {
24+
"itemStyle": {
25+
"borderWidth": 1
26+
},
27+
"lineStyle": {
28+
"width": 2
29+
},
30+
"symbolSize": 4,
31+
"symbol": "emptyCircle",
32+
"smooth": false
33+
},
34+
"radar": {
35+
"itemStyle": {
36+
"borderWidth": 1
37+
},
38+
"lineStyle": {
39+
"width": 2
40+
},
41+
"symbolSize": 4,
42+
"symbol": "emptyCircle",
43+
"smooth": false
44+
},
45+
"bar": {
46+
"itemStyle": {
47+
"barBorderWidth": 0,
48+
"barBorderColor": "#ccc"
49+
}
50+
},
51+
"pie": {
52+
"itemStyle": {
53+
"borderWidth": 0,
54+
"borderColor": "#ccc"
55+
}
56+
},
57+
"scatter": {
58+
"itemStyle": {
59+
"borderWidth": 0,
60+
"borderColor": "#ccc"
61+
}
62+
},
63+
"boxplot": {
64+
"itemStyle": {
65+
"borderWidth": 0,
66+
"borderColor": "#ccc"
67+
}
68+
},
69+
"parallel": {
70+
"itemStyle": {
71+
"borderWidth": 0,
72+
"borderColor": "#ccc"
73+
}
74+
},
75+
"sankey": {
76+
"itemStyle": {
77+
"borderWidth": 0,
78+
"borderColor": "#ccc"
79+
}
80+
},
81+
"funnel": {
82+
"itemStyle": {
83+
"borderWidth": 0,
84+
"borderColor": "#ccc"
85+
}
86+
},
87+
"gauge": {
88+
"itemStyle": {
89+
"borderWidth": 0,
90+
"borderColor": "#ccc"
91+
}
92+
},
93+
"candlestick": {
94+
"itemStyle": {
95+
"color": "#eb5454",
96+
"color0": "#47b262",
97+
"borderColor": "#eb5454",
98+
"borderColor0": "#47b262",
99+
"borderWidth": 1
100+
}
101+
},
102+
"graph": {
103+
"itemStyle": {
104+
"borderWidth": 0,
105+
"borderColor": "#ccc"
106+
},
107+
"lineStyle": {
108+
"width": 1,
109+
"color": "#aaa"
110+
},
111+
"symbolSize": 4,
112+
"symbol": "emptyCircle",
113+
"smooth": false,
114+
"color": [
115+
"#5470c6",
116+
"#91cc75",
117+
"#fac858",
118+
"#ee6666",
119+
"#73c0de",
120+
"#3ba272",
121+
"#fc8452",
122+
"#9a60b4",
123+
"#ea7ccc"
124+
],
125+
"label": {
126+
"color": "#eee"
127+
}
128+
},
129+
"map": {
130+
"itemStyle": {
131+
"areaColor": "#eee",
132+
"borderColor": "#444",
133+
"borderWidth": 0.5
134+
},
135+
"label": {
136+
"color": "#000"
137+
},
138+
"emphasis": {
139+
"itemStyle": {
140+
"areaColor": "rgba(255,215,0,0.8)",
141+
"borderColor": "#444",
142+
"borderWidth": 1
143+
},
144+
"label": {
145+
"color": "rgb(100,0,0)"
146+
}
147+
}
148+
},
149+
"geo": {
150+
"itemStyle": {
151+
"areaColor": "#eee",
152+
"borderColor": "#444",
153+
"borderWidth": 0.5
154+
},
155+
"label": {
156+
"color": "#000"
157+
},
158+
"emphasis": {
159+
"itemStyle": {
160+
"areaColor": "rgba(255,215,0,0.8)",
161+
"borderColor": "#444",
162+
"borderWidth": 1
163+
},
164+
"label": {
165+
"color": "rgb(100,0,0)"
166+
}
167+
}
168+
},
169+
"categoryAxis": {
170+
"axisLine": {
171+
"show": true,
172+
"lineStyle": {
173+
"color": "#6E7079"
174+
}
175+
},
176+
"axisTick": {
177+
"show": true,
178+
"lineStyle": {
179+
"color": "#6E7079"
180+
}
181+
},
182+
"axisLabel": {
183+
"show": true,
184+
"color": "#6E7079"
185+
},
186+
"splitLine": {
187+
"show": false,
188+
"lineStyle": {
189+
"color": ["#E0E6F1"]
190+
}
191+
},
192+
"splitArea": {
193+
"show": false,
194+
"areaStyle": {
195+
"color": ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
196+
}
197+
}
198+
},
199+
"valueAxis": {
200+
"axisLine": {
201+
"show": false,
202+
"lineStyle": {
203+
"color": "#6E7079"
204+
}
205+
},
206+
"axisTick": {
207+
"show": false,
208+
"lineStyle": {
209+
"color": "#6E7079"
210+
}
211+
},
212+
"axisLabel": {
213+
"show": true,
214+
"color": "#6E7079"
215+
},
216+
"splitLine": {
217+
"show": true,
218+
"lineStyle": {
219+
"color": ["#E0E6F1"]
220+
}
221+
},
222+
"splitArea": {
223+
"show": false,
224+
"areaStyle": {
225+
"color": ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
226+
}
227+
}
228+
},
229+
"logAxis": {
230+
"axisLine": {
231+
"show": false,
232+
"lineStyle": {
233+
"color": "#6E7079"
234+
}
235+
},
236+
"axisTick": {
237+
"show": false,
238+
"lineStyle": {
239+
"color": "#6E7079"
240+
}
241+
},
242+
"axisLabel": {
243+
"show": true,
244+
"color": "#6E7079"
245+
},
246+
"splitLine": {
247+
"show": true,
248+
"lineStyle": {
249+
"color": ["#E0E6F1"]
250+
}
251+
},
252+
"splitArea": {
253+
"show": false,
254+
"areaStyle": {
255+
"color": ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
256+
}
257+
}
258+
},
259+
"timeAxis": {
260+
"axisLine": {
261+
"show": true,
262+
"lineStyle": {
263+
"color": "#6E7079"
264+
}
265+
},
266+
"axisTick": {
267+
"show": true,
268+
"lineStyle": {
269+
"color": "#6E7079"
270+
}
271+
},
272+
"axisLabel": {
273+
"show": true,
274+
"color": "#6E7079"
275+
},
276+
"splitLine": {
277+
"show": false,
278+
"lineStyle": {
279+
"color": ["#E0E6F1"]
280+
}
281+
},
282+
"splitArea": {
283+
"show": false,
284+
"areaStyle": {
285+
"color": ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
286+
}
287+
}
288+
},
289+
"toolbox": {
290+
"iconStyle": {
291+
"borderColor": "#999"
292+
},
293+
"emphasis": {
294+
"iconStyle": {
295+
"borderColor": "#666"
296+
}
297+
}
298+
},
299+
"legend": {
300+
"textStyle": {
301+
"color": "#333"
302+
}
303+
},
304+
"tooltip": {
305+
"axisPointer": {
306+
"lineStyle": {
307+
"color": "#ccc",
308+
"width": 1
309+
},
310+
"crossStyle": {
311+
"color": "#ccc",
312+
"width": 1
313+
}
314+
}
315+
},
316+
"timeline": {
317+
"lineStyle": {
318+
"color": "#DAE1F5",
319+
"width": 2
320+
},
321+
"itemStyle": {
322+
"color": "#A4B1D7",
323+
"borderWidth": 1
324+
},
325+
"controlStyle": {
326+
"color": "#A4B1D7",
327+
"borderColor": "#A4B1D7",
328+
"borderWidth": 1
329+
},
330+
"checkpointStyle": {
331+
"color": "#316bf3",
332+
"borderColor": "fff"
333+
},
334+
"label": {
335+
"color": "#A4B1D7"
336+
},
337+
"emphasis": {
338+
"itemStyle": {
339+
"color": "#FFF"
340+
},
341+
"controlStyle": {
342+
"color": "#A4B1D7",
343+
"borderColor": "#A4B1D7",
344+
"borderWidth": 1
345+
},
346+
"label": {
347+
"color": "#A4B1D7"
348+
}
349+
}
350+
},
351+
"visualMap": {
352+
"color": ["#bf444c", "#d88273", "#f6efa6"]
353+
},
354+
"dataZoom": {
355+
"handleSize": "undefined%",
356+
"textStyle": {}
357+
},
358+
"markPoint": {
359+
"label": {
360+
"color": "#eee"
361+
},
362+
"emphasis": {
363+
"label": {
364+
"color": "#eee"
365+
}
366+
}
367+
}
368+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"unlink": "npm unlink --global && cd ../RESWARM/frontend && npm unlink @record-evolution/widget-switch && npm i @record-evolution/widget-switch",
2626
"types": "cat src/definition-schema.json | json2ts > src/definition-schema.d.ts",
2727
"start:build": "npm run build && es-dev-server --root-dir dist --app-index index.html --compatibility none --open",
28-
"release": "npm run build && npm run types && npm version patch --tag-version-prefix='' && git push && git push --tag"
28+
"release": "npm run build && npm run types && npm version patch --tag-version-prefix='' && git push && git push --tag && npm run build"
2929
},
3030
"dependencies": {
3131
"@material/web": "^2.4.0",

thumbnail.png

59.9 KB
Loading

0 commit comments

Comments
 (0)