@massimo-cassandro/minimo 1.18.4 → 1.19.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 +5 -1
- package/design-tokens/{utilities/readme.md → README.md} +26 -16
- package/design-tokens/tokens/src/components/unsplash-page/unsplash-page.minimo.tokens.jsonc +69 -31
- package/design-tokens/{utilities/tokens-config-sample.mjs → tokens-config-sample.mjs} +18 -10
- package/design-tokens/utilities/build-tokens-src/config.mjs +5 -0
- package/design-tokens/utilities/build-tokens-src/formats/css.mjs +18 -2
- package/design-tokens/utilities/build-tokens-src/merge-css.mjs +60 -0
- package/design-tokens/utilities/build-tokens.mjs +12 -0
- package/dev-tools/README.md +8 -0
- package/dev-tools/starter-kit/starter-install.sh +46 -26
- package/package.json +6 -2
- package/snippets/error-pages/error-pages.js +3 -2
- package/src/components/unsplash-page/unsplash-page.minimo.tokens.mjs +78 -39
- package/src/components/unsplash-page/unsplash-page.module.css +25 -6
- package/src/custom-properties.css +8 -1
- package/src/minimo.css +1 -1
- package/src/web-components/s-datatable-component/s-datatable-component.js +4 -1
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/index.js +0 -92
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/hbars.js +0 -356
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/pie.js +0 -245
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/radial-bars.js +0 -177
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/rating-display.js +0 -835
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/costruzione-assi.js +0 -212
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/costruzione-linee.js +0 -101
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/defaults.js +0 -185
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/display-current.js +0 -27
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/grid-areas.js +0 -129
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/parse-opts.js +0 -64
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/paths-setup.js +0 -73
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile.js +0 -126
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/signal-bars.js +0 -290
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/week-utils.js +0 -122
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/hbars-test.js +0 -52
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/mcn-test.js +0 -74
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/pie-test.js +0 -16
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/radial-bars-test.js +0 -48
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/settimanale-mensile-dati-settimanale.js +0 -426
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/settimanale-mensile-test.js +0 -260
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/signal-bars-test.js +0 -64
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/node-test.mjs +0 -86
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/hBars-node-test.mjs +0 -40
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/lines-node-test.mjs +0 -73
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/mcn-node-test.mjs +0 -64
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/pie-node-test.mjs +0 -12
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/radialsBar-node-test.mjs +0 -44
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/settimanale-mensile-node-test.mjs +0 -258
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/signalBars-node-test.mjs +0 -36
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/test-readme.md +0 -24
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/textToPath-test.mjs +0 -14
- package/charts/TODO charts/???/InfoBox.js +0 -456
- package/charts/TODO charts/???/README-upg OLD/342/206/222NEW.md" +0 -53
- package/charts/TODO charts/???/README.md +0 -1
- package/charts/TODO charts/???/TODO.md +0 -39
- package/charts/TODO charts/???/base-cfg.js +0 -66
- package/charts/TODO charts/???/rating-displayOLD.js +0 -837
- package/charts/TODO charts/docs/TODO.md +0 -1
- package/charts/TODO charts/docs/costruzione display rating.md +0 -145
- package/charts/TODO charts/test/node-test.mjs +0 -92
- package/charts/TODO charts/test/test-readme.md +0 -23
- package/charts/TODO charts/test/test-src/rating-display-extra-test.js +0 -132
- package/charts/TODO charts/test/test-src/rating-display-test.js +0 -155
- package/charts/TODO charts/test/textToPath-test.mjs +0 -14
- package/charts/TODO.md +0 -7
- package/charts/src/node-helpers/TODO.md +0 -2
- package/dev-tools/starter-kit/TODO.md +0 -135
- package/src/components/TODO form-multiselect/form-multiselect.css +0 -40
- package/src/components/TODO form-multiselect/form-multiselect.js +0 -83
- package/src/components/TODO vanilla-cookie-consent/cookie-consent.css +0 -20
- package/src/components/TODO vanilla-cookie-consent/cookie-consent.js +0 -76
- package/src/components/TODO vanilla-cookie-consent/render-cookie-list.js +0 -32
- package/src/components/TODO vanilla-cookie-consent/src/cookie-list.js +0 -85
- package/src/components/TODO vanilla-cookie-consent/src/it-translation.js +0 -38
- package/src/components/TODO vanilla-cookie-consent/src/run-analytics.js +0 -54
- package/src/components/TODO vanilla-cookie-consent/src/run-recaptcha.js +0 -71
- package/src/components/autocomplete/TODO.md +0 -4
- package/src/web-components/TODO json-table/README.md +0 -67
- package/src/web-components/TODO json-table/TODO.md +0 -12
- package/src/web-components/TODO json-table/_work/OLD/docs/custom-props-list.md +0 -69
- package/src/web-components/TODO json-table/_work/OLD/script/create-css-custom-props-doc.mjs +0 -113
- package/src/web-components/TODO json-table/_work/OLD/script/src/custom-props-end.md +0 -4
- package/src/web-components/TODO json-table/_work/OLD/script/src/custom-props-start.md +0 -30
- package/src/web-components/TODO json-table/_work/OLD/src/css/icons.module.css +0 -22
- package/src/web-components/TODO json-table/_work/OLD/src/css/info.module.css +0 -42
- package/src/web-components/TODO json-table/_work/OLD/src/css/main-wrapper.module.css +0 -4
- package/src/web-components/TODO json-table/_work/OLD/src/css/table.module.css +0 -154
- package/src/web-components/TODO json-table/_work/OLD/src/css/utility.module.css +0 -9
- package/src/web-components/TODO json-table/_work/OLD/src/icons/false.svg +0 -1
- package/src/web-components/TODO json-table/_work/OLD/src/icons/search-arrows.svg +0 -1
- package/src/web-components/TODO json-table/_work/OLD/src/icons/true.svg +0 -1
- package/src/web-components/TODO json-table/_work/OLD/src/index.js +0 -56
- package/src/web-components/TODO json-table/_work/OLD/src/js/default-columns-data-types.js +0 -172
- package/src/web-components/TODO json-table/_work/OLD/src/js/defaults.js +0 -156
- package/src/web-components/TODO json-table/_work/OLD/src/js/info-section.js +0 -31
- package/src/web-components/TODO json-table/_work/OLD/src/js/listeners.js +0 -17
- package/src/web-components/TODO json-table/_work/OLD/src/js/main-builder.js +0 -26
- package/src/web-components/TODO json-table/_work/OLD/src/js/parse-params.js +0 -121
- package/src/web-components/TODO json-table/_work/OLD/src/js/set-column-classname.js +0 -22
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-builder.js +0 -64
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-foot.js +0 -8
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-head.js +0 -47
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-row.js +0 -83
- package/src/web-components/TODO json-table/_work/OLD/src/js/utilities.js +0 -5
- package/src/web-components/TODO json-table/_work/__json-table-react/index.js +0 -4
- package/src/web-components/TODO json-table/_work/__json-table-react/src/build-page-array.js +0 -73
- package/src/web-components/TODO json-table/_work/__json-table-react/src/columns-data-types.js +0 -73
- package/src/web-components/TODO json-table/_work/__json-table-react/src/defaults.js +0 -50
- package/src/web-components/TODO json-table/_work/__json-table-react/src/download-excel.js +0 -156
- package/src/web-components/TODO json-table/_work/__json-table-react/src/set-className.js +0 -19
- package/src/web-components/TODO json-table/_work/__json-table-react/src/set-download-filename.js +0 -17
- package/src/web-components/TODO json-table/_work/__json-table-react/src/table-to-csv.js +0 -48
- package/src/web-components/TODO json-table/_work/archived/table-to-csv.js +0 -48
- package/src/web-components/TODO json-table/_work/arrow.svg +0 -3
- package/src/web-components/TODO json-table/_work/da decidere/get-cell-data.js +0 -18
- package/src/web-components/TODO json-table/_work/download-button.js +0 -29
- package/src/web-components/TODO json-table/_work/download-excel.js +0 -155
- package/src/web-components/TODO json-table/_work/pagination-array-builder.js +0 -73
- package/src/web-components/TODO json-table/_work/pagination.js +0 -37
- package/src/web-components/TODO json-table/_work/set-download-filename.js +0 -19
- package/src/web-components/TODO json-table/_work/table-info.js +0 -24
- package/src/web-components/TODO json-table/demo/README.md +0 -66
- package/src/web-components/TODO json-table/demo/assets/link-simple.svg +0 -1
- package/src/web-components/TODO json-table/demo/demo-data/json-static-table-demo-data.js +0 -512
- package/src/web-components/TODO json-table/demo/demo.css +0 -32
- package/src/web-components/TODO json-table/demo/demo.js +0 -24
- package/src/web-components/TODO json-table/demo/js/demo-ajax-table.js +0 -165
- package/src/web-components/TODO json-table/demo/js/demo-static-table.js +0 -180
- package/src/web-components/TODO json-table/demo/webpack-modules/css-rules.mjs +0 -122
- package/src/web-components/TODO json-table/demo/webpack-modules/get-jsConfig-aliases.mjs +0 -33
- package/src/web-components/TODO json-table/demo/webpack-modules/svg-rules.mjs +0 -108
- package/src/web-components/TODO json-table/demo/webpack-modules/svgo.config.mjs +0 -26
- package/src/web-components/TODO json-table/demo/webpack.config.mjs +0 -333
- package/src/web-components/TODO json-table/docs/custom-props-list.md +0 -74
- package/src/web-components/TODO json-table/docs-builder/create-css-custom-props-doc.mjs +0 -157
- package/src/web-components/TODO json-table/docs-builder/src/custom-props-end.md +0 -6
- package/src/web-components/TODO json-table/docs-builder/src/custom-props-start.md +0 -29
- package/src/web-components/TODO json-table/src/TODO.md +0 -1
- package/src/web-components/TODO json-table/src/__json-table-react/build-page-array.js +0 -73
- package/src/web-components/TODO json-table/src/__json-table-react/columns-data-types.js +0 -73
- package/src/web-components/TODO json-table/src/__json-table-react/defaults.js +0 -50
- package/src/web-components/TODO json-table/src/__json-table-react/download-excel.js +0 -156
- package/src/web-components/TODO json-table/src/__json-table-react/set-className.js +0 -19
- package/src/web-components/TODO json-table/src/__json-table-react/set-download-filename.js +0 -17
- package/src/web-components/TODO json-table/src/__json-table-react/table-to-csv.js +0 -48
- package/src/web-components/TODO json-table/src/css/custom-media.css +0 -16
- package/src/web-components/TODO json-table/src/css/icons.module.css +0 -22
- package/src/web-components/TODO json-table/src/css/info-section.module.css +0 -78
- package/src/web-components/TODO json-table/src/css/main-builder.module.css +0 -6
- package/src/web-components/TODO json-table/src/css/table.module.css +0 -172
- package/src/web-components/TODO json-table/src/css/utility.module.css +0 -9
- package/src/web-components/TODO json-table/src/icons/arrow-down-bold.svg +0 -1
- package/src/web-components/TODO json-table/src/icons/false.svg +0 -1
- package/src/web-components/TODO json-table/src/icons/true.svg +0 -1
- package/src/web-components/TODO json-table/src/index.js +0 -125
- package/src/web-components/TODO json-table/src/js/default-columns-data-types.js +0 -172
- package/src/web-components/TODO json-table/src/js/defaults.js +0 -510
- package/src/web-components/TODO json-table/src/js/get-ajax-data.js +0 -72
- package/src/web-components/TODO json-table/src/js/info-section.js +0 -39
- package/src/web-components/TODO json-table/src/js/init-ajax-table.js +0 -30
- package/src/web-components/TODO json-table/src/js/init-static-table.js +0 -18
- package/src/web-components/TODO json-table/src/js/main-builder.js +0 -87
- package/src/web-components/TODO json-table/src/js/parse-data-row.js +0 -123
- package/src/web-components/TODO json-table/src/js/parse-params.js +0 -118
- package/src/web-components/TODO json-table/src/js/set-search-listener.js +0 -62
- package/src/web-components/TODO json-table/src/js/set-sort-listeners.js +0 -115
- package/src/web-components/TODO json-table/src/js/static-data-sorting.js +0 -23
- package/src/web-components/TODO json-table/src/js/table-builder.js +0 -45
- package/src/web-components/TODO json-table/src/js/table-row.js +0 -43
- package/src/web-components/TODO json-table/src/js/table-tfoot.js +0 -9
- package/src/web-components/TODO json-table/src/js/table-thead.js +0 -91
- package/src/web-components/TODO json-table/src/js/update-info.js +0 -42
- package/src/web-components/TODO json-table/src/js/utilities.js +0 -5
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { datiSettimanali } from '../../browser-test/src/settimanale-mensile-dati-settimanale.js';
|
|
2
|
-
|
|
3
|
-
export async function settimanaleMensileNodeTest(cfg) {
|
|
4
|
-
|
|
5
|
-
const default_line_attrs = {
|
|
6
|
-
stroke: '#3b3a3a',
|
|
7
|
-
'stroke-width': 1,
|
|
8
|
-
'shape-rendering': 'crispEdges',
|
|
9
|
-
'stroke-linecap': 'round',
|
|
10
|
-
fill: 'none'
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const opts = {
|
|
14
|
-
|
|
15
|
-
/** mostra info utile per il debug */
|
|
16
|
-
debug: true,
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
larghezza e altezza del grafico (px),
|
|
20
|
-
Se il container è presente e i parametro `width` o `height` sono `null`,
|
|
21
|
-
quelli mancanti vengono ricavati dallaìe dimensioni del container
|
|
22
|
-
*/
|
|
23
|
-
width: 1300,
|
|
24
|
-
height: 500,
|
|
25
|
-
|
|
26
|
-
/** attributi facoltativi per l'svg */
|
|
27
|
-
svgAttrs: {},
|
|
28
|
-
|
|
29
|
-
/** griglia orizzontale e verticale */
|
|
30
|
-
horizGrid: true,
|
|
31
|
-
horizGridAttrs: {...default_line_attrs, stroke: '#b5b3b3'},
|
|
32
|
-
|
|
33
|
-
vertGrid: true,
|
|
34
|
-
vertGridAttrs: {...default_line_attrs, stroke: '#b5b3b3', 'stroke-dasharray': '0 4 0'},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/** suddivisioni asse Y */
|
|
39
|
-
stepY_count: 4,
|
|
40
|
-
|
|
41
|
-
/** px, altezza o larghezza ticks (secondo l'orientamento) */
|
|
42
|
-
ticksLength: 10,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/** larghezza area etichette asse y */
|
|
46
|
-
eti_asseY_width: 70,
|
|
47
|
-
|
|
48
|
-
/** altezza area etichette asse x */
|
|
49
|
-
eti_asseX_height: 30,
|
|
50
|
-
|
|
51
|
-
/** altezza aggiuntiva area asse x per visualizzazione dei mesi (solo settimanale) */
|
|
52
|
-
eti_asseX_additional_height: 30,
|
|
53
|
-
|
|
54
|
-
/** spazio extra attorno al bordo */
|
|
55
|
-
padding: 10,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/** titoli assi */
|
|
59
|
-
asseYTitle: 'Travel Value',
|
|
60
|
-
asseYTitleAttrs: {
|
|
61
|
-
fill: '#999999',
|
|
62
|
-
'font-size': 18,
|
|
63
|
-
'font-weight': 600
|
|
64
|
-
},
|
|
65
|
-
asseYTitleFontFilePath: cfg.fontFile.medium,
|
|
66
|
-
|
|
67
|
-
asseXTitle: 'Settimana',
|
|
68
|
-
asseXTitleAttrs: {
|
|
69
|
-
fill: '#999999',
|
|
70
|
-
'font-size': 18,
|
|
71
|
-
'font-weight': 600
|
|
72
|
-
},
|
|
73
|
-
asseXTitleFontFilePath: cfg.fontFile.medium,
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
solo settimanale.
|
|
77
|
-
la settimana zero corrisponde ai dati al 31/12 dell'anno precedente a quello in esame
|
|
78
|
-
se true la settimana zero non viene rappresentata nel grafico
|
|
79
|
-
e l'origine x del grafico corrisponde alla settimana 1
|
|
80
|
-
*/
|
|
81
|
-
skipWeek0: true,
|
|
82
|
-
|
|
83
|
-
/** evidenzia la griglia verticale corrispondente alla settimana / mese correnti */
|
|
84
|
-
showCurrent: false,
|
|
85
|
-
currentWeekAttrs: {},
|
|
86
|
-
currentMonthAttrs: {},
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
Aree di evidenziazione dei mesi (settimanale)
|
|
90
|
-
*/
|
|
91
|
-
monthsAreasAttrs: {
|
|
92
|
-
fill: '#e1e5e8'
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
/** se true mostra un area di relativa ai valori min/max degli scenari */
|
|
96
|
-
mostraRangeScenari: true,
|
|
97
|
-
rangeScenariAttrs: {
|
|
98
|
-
fill: '#e1d2e3'
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
se `lineeRangeScenari` non è un oggetto vuoto, vengono mostrate
|
|
103
|
-
le linee positive/negativo secondo gli attributi svg.js indicati.
|
|
104
|
-
Questa opzione è indipendente da `mostraRangeScenari`
|
|
105
|
-
*/
|
|
106
|
-
lineeRangeScenari: {
|
|
107
|
-
...default_line_attrs,
|
|
108
|
-
stroke: '#7d3c8567'
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
/** anno esaminato */
|
|
112
|
-
anno: new Date().getFullYear(),
|
|
113
|
-
|
|
114
|
-
/** parametri infoBox (vedi componente) */
|
|
115
|
-
// infoBoxItems,
|
|
116
|
-
// infoBoxPositionRefs,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
chartData: datiSettimanali,
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
classi e attributi dei vari elementi.
|
|
123
|
-
Per gli attributi, ogni variabile è un oggetto di attributi svg.js
|
|
124
|
-
{
|
|
125
|
-
stroke: '#414141',
|
|
126
|
-
'stroke-width': 1,
|
|
127
|
-
'shape-rendering': 'crispEdges'
|
|
128
|
-
}
|
|
129
|
-
*/
|
|
130
|
-
axisAttrs: default_line_attrs,
|
|
131
|
-
ticksAttrs: default_line_attrs,
|
|
132
|
-
|
|
133
|
-
gridLinesAttrs: {},
|
|
134
|
-
|
|
135
|
-
labelXAttrs: {
|
|
136
|
-
size: 14,
|
|
137
|
-
weight: 400,
|
|
138
|
-
fill: '#676565',
|
|
139
|
-
},
|
|
140
|
-
labelXFontFilePath: cfg.fontFile.regular, // percorso font per textToPath
|
|
141
|
-
|
|
142
|
-
labelYAttrs: {
|
|
143
|
-
size: 14,
|
|
144
|
-
weight: 400,
|
|
145
|
-
fill: '#4c4949',
|
|
146
|
-
},
|
|
147
|
-
labelYFontFilePath: cfg.fontFile.regular, // percorso font per textToPath
|
|
148
|
-
|
|
149
|
-
budget_standard_line_attrs: {
|
|
150
|
-
...default_line_attrs,
|
|
151
|
-
stroke: '#9a0b9a'
|
|
152
|
-
},
|
|
153
|
-
budget_positivo_line_attrs: {
|
|
154
|
-
...default_line_attrs,
|
|
155
|
-
'stroke-width': 1
|
|
156
|
-
},
|
|
157
|
-
budget_negativo_line_attrs: {
|
|
158
|
-
...default_line_attrs,
|
|
159
|
-
'stroke-width': 1
|
|
160
|
-
},
|
|
161
|
-
consolidato_line_attrs: {
|
|
162
|
-
...default_line_attrs,
|
|
163
|
-
'stroke-width': 3,
|
|
164
|
-
stroke: '#06407a'
|
|
165
|
-
},
|
|
166
|
-
consolidato_points_attrs: {
|
|
167
|
-
r: 3,
|
|
168
|
-
fill: '#06407a'
|
|
169
|
-
},
|
|
170
|
-
consolidato_prec_line_attrs: {
|
|
171
|
-
...default_line_attrs,
|
|
172
|
-
'stroke-width': 3,
|
|
173
|
-
stroke: '#6985ac',
|
|
174
|
-
'stroke-dasharray': '.1 6'
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
showConsolidatoForecast: false,
|
|
178
|
-
consolidato_forecast_line_attrs: {
|
|
179
|
-
...default_line_attrs,
|
|
180
|
-
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
Funzione per formattare le etichette dei valori dell'asse Y.
|
|
185
|
-
Null per nessuna eleborazione.
|
|
186
|
-
La funzione di default assume che il valore sia di tipo numerico
|
|
187
|
-
*/
|
|
188
|
-
labelYFormatter: labelValue => (labelValue / 1e3)
|
|
189
|
-
.toLocaleString('it-IT', {
|
|
190
|
-
minimumFractionDigits: 0,
|
|
191
|
-
maximumFractionDigits: 0,
|
|
192
|
-
useGrouping: 'always'
|
|
193
|
-
}) +
|
|
194
|
-
(labelValue > 0? '\u200AK' : ''), // \u2009 = thin space, \u200A hair space (https://www.compart.com/en/unicode/U+2009)
|
|
195
|
-
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
// voci legenda
|
|
200
|
-
opts.legenda = {
|
|
201
|
-
/** altezza legenda */
|
|
202
|
-
height: 20,
|
|
203
|
-
|
|
204
|
-
/** spazio tra gli elementi della legenda */
|
|
205
|
-
elements_gap: 25,
|
|
206
|
-
|
|
207
|
-
/** dimensioni delle forme della legenda */
|
|
208
|
-
lines_width: 20,
|
|
209
|
-
circles_radius: 16,
|
|
210
|
-
|
|
211
|
-
/** attributi svg.js dei font del testo della legenda (null utilizza default) */
|
|
212
|
-
fontAttrs: {
|
|
213
|
-
fill: '#000',
|
|
214
|
-
'font-size': 14,
|
|
215
|
-
'font-weight': 400
|
|
216
|
-
},
|
|
217
|
-
fontFilePath: cfg.fontFile.regular,
|
|
218
|
-
|
|
219
|
-
/** elementi della legenda */
|
|
220
|
-
items: [
|
|
221
|
-
{
|
|
222
|
-
shape: 'line', // line || circle
|
|
223
|
-
attrs: opts.consolidato_line_attrs, // attributi js di shape
|
|
224
|
-
text: `Consolidato ${opts.anno}`, // testo della voce
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
shape: 'line',
|
|
228
|
-
attrs: opts.consolidato_prec_line_attrs, //
|
|
229
|
-
text: `Consolidato ${opts.anno - 1}`,
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
shape: 'line',
|
|
233
|
-
attrs: opts.budget_standard_line_attrs,
|
|
234
|
-
text: 'Budget',
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
shape: 'circle',
|
|
238
|
-
attrs: {...opts.lineeRangeScenari, ...opts.rangeScenariAttrs},
|
|
239
|
-
text: 'Range positivo-negativo',
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
let svg = await cfg.charts.settimanaleMensile({
|
|
246
|
-
...opts,
|
|
247
|
-
modo: 'settimanale',
|
|
248
|
-
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
await cfg.writeFile(svg, 'settimanale-mensile.svg');
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/signalBars-node-test.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export async function signalBarsNodeTest(cfg) {
|
|
4
|
-
|
|
5
|
-
const signal_bars_svg = await cfg.charts.signalBars({
|
|
6
|
-
height: 150,
|
|
7
|
-
width: 350,
|
|
8
|
-
ranges: [1,2,3,4,5],
|
|
9
|
-
labelFontFilePath: cfg.fontFile.bold,
|
|
10
|
-
labelFont: {
|
|
11
|
-
// family: 'Roboto Flex',
|
|
12
|
-
size: 72,
|
|
13
|
-
// stretch: 'normal',
|
|
14
|
-
// style: 'italic',
|
|
15
|
-
// variant: 'normal',
|
|
16
|
-
// weight: 700
|
|
17
|
-
},
|
|
18
|
-
labelFill: '#04780a',
|
|
19
|
-
barsStrokeWidth: 4,
|
|
20
|
-
barsOnAttr: {
|
|
21
|
-
fill: '#0b3191',
|
|
22
|
-
'fill-opacity': 0.5,
|
|
23
|
-
stroke: '#0a1b45'
|
|
24
|
-
},
|
|
25
|
-
barsOffAttr: {
|
|
26
|
-
fill: '#fff',
|
|
27
|
-
stroke: '#0a1b45'
|
|
28
|
-
},
|
|
29
|
-
value: 3.63,
|
|
30
|
-
label: null,
|
|
31
|
-
labelPosition: 'right',
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
await cfg.writeFile(signal_bars_svg, 'signal-bars.svg');
|
|
35
|
-
}
|
|
36
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# AdaCharts test
|
|
2
|
-
|
|
3
|
-
## browser
|
|
4
|
-
|
|
5
|
-
run (dalla root Ada):
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
open -n -a "Google Chrome" --args --profile-directory="Profile 1"
|
|
9
|
-
cd ./ada-frontend/ada-charts/test/browser-test
|
|
10
|
-
NODE_ENV=development npx webpack serve --config ./webpack/webpack.config.cjs
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## node
|
|
15
|
-
|
|
16
|
-
Per il test node è necessario scaricare il font Roboto Condended da Google Font
|
|
17
|
-
|
|
18
|
-
Il percorso dei font va quindi inserito in `./node-test/node-test.mjs` (nella variabile `fontFile`).
|
|
19
|
-
|
|
20
|
-
Per avviare il test:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
node node-test.mjs
|
|
24
|
-
```
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
import { textToSvgPath } from '../src/svg-text-to-path.js';
|
|
3
|
-
|
|
4
|
-
const labelFontFilePath = './Roboto_Condensed/static/RobotoCondensed-Bold.ttf',
|
|
5
|
-
textString = 'Hello World',
|
|
6
|
-
textSize = 24
|
|
7
|
-
;
|
|
8
|
-
|
|
9
|
-
const { pathData, pathElementString } = await textToSvgPath(labelFontFilePath, textString, textSize);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
console.log(pathData);
|
|
13
|
-
console.log('------');
|
|
14
|
-
console.log(pathElementString);
|