@iamproperty/components 5.7.1-beta2 → 5.7.1-beta4
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/assets/css/components/barchart.component.css +1 -0
- package/assets/css/components/barchart.component.css.map +1 -0
- package/assets/css/components/charts.config.css +1 -0
- package/assets/css/components/charts.config.css.map +1 -0
- package/assets/css/components/charts.module.css +1 -0
- package/assets/css/components/charts.module.css.map +1 -0
- package/assets/css/components/tabs.css +1 -1
- package/assets/css/components/tabs.css.map +1 -1
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/barchart/barchart.component.js +53 -0
- package/assets/js/components/barchart/barchart.component.min.js +21 -0
- package/assets/js/components/barchart/barchart.component.min.js.map +1 -0
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.js +2 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +4 -4
- package/assets/js/components/fileupload/fileupload.component.min.js.map +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +4 -4
- package/assets/js/dynamic.min.js +1 -1
- package/assets/js/modules/chart.module.js +350 -0
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/sass/_components.scss +0 -8
- package/assets/sass/_corefiles.scss +2 -0
- package/assets/sass/components/barchart.component.scss +341 -0
- package/assets/sass/components/charts.config.scss +79 -0
- package/assets/sass/components/charts.module.scss +652 -0
- package/assets/sass/components/tabs.scss +3 -14
- package/assets/ts/components/barchart/README.md +37 -0
- package/assets/ts/components/barchart/barchart.component.ts +79 -0
- package/assets/ts/components/fileupload/fileupload.component.ts +2 -1
- package/assets/ts/modules/chart.module.ts +506 -0
- package/dist/components.es.js +11 -11
- package/dist/components.umd.js +24 -24
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/BarChart/BarChart.vue +25 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
iam-barchart {
|
|
2
|
+
|
|
3
|
+
--chart-bar-alignment: left;
|
|
4
|
+
--chart-text-color: var(--colour-heading);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
iam-barchart:not(.chart--horizontal)::part(xaxis-label) {
|
|
8
|
+
|
|
9
|
+
text-align: left;
|
|
10
|
+
transform-origin: 0rem 1rem;
|
|
11
|
+
transform: rotate(45deg);
|
|
12
|
+
max-width: 5rem;
|
|
13
|
+
font-size: 1rem;
|
|
14
|
+
color: var(--colour-heading);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
iam-barchart:not(.chart--horizontal)::part(spacer) {
|
|
18
|
+
|
|
19
|
+
aspect-ratio: 1/1;
|
|
20
|
+
display: block;
|
|
21
|
+
width: fit-content;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
iam-barchart:not(.chart--horizontal)::part(chart-key) {
|
|
25
|
+
|
|
26
|
+
padding-top: 2rem;
|
|
27
|
+
order: 3;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
iam-barchart:not(.chart--horizontal)::part(key),
|
|
31
|
+
iam-barchart:not(.chart--horizontal)::part(key-checked),
|
|
32
|
+
iam-barchart:not(.chart--horizontal)::part(key-unchecked) {
|
|
33
|
+
|
|
34
|
+
--key-border-radius: 50%;
|
|
35
|
+
--btn-border-width: 1px;
|
|
36
|
+
--btn-padding-block: #{rem(6)};
|
|
37
|
+
--btn-padding-inline: #{rem(6)};
|
|
38
|
+
|
|
39
|
+
background-color: var(--colour-canvas-2);
|
|
40
|
+
border: var(--btn-border-width) solid var(--colour-muted);
|
|
41
|
+
border-radius: rem(4)!important;
|
|
42
|
+
font-weight: 400!important;
|
|
43
|
+
font-size: 1rem;
|
|
44
|
+
line-height: rem(20);
|
|
45
|
+
padding: calc(var(--btn-padding-block) - var(--btn-border-width)) calc(var(--btn-padding-inline) - var(--btn-border-width));
|
|
46
|
+
color: var(--colour-heading);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
iam-barchart:not(.chart--horizontal)::part(key):is(:hover, :focus, .hover, :focus-within):not([disabled],:active, .active),
|
|
50
|
+
iam-barchart:not(.chart--horizontal)::part(key-checked):is(:hover, :focus, .hover, :focus-within):not([disabled],:active, .active),
|
|
51
|
+
iam-barchart:not(.chart--horizontal)::part(key-unchecked):is(:hover, :focus, .hover, :focus-within):not([disabled],:active, .active) {
|
|
52
|
+
background: var(--colour-btn-action-hover-bg);
|
|
53
|
+
}
|
|
54
|
+
iam-barchart:not(.chart--horizontal)::part(key):is(:hover, :focus, .hover, :focus-within),
|
|
55
|
+
iam-barchart:not(.chart--horizontal)::part(key-checked):is(:hover, :focus, .hover, :focus-within),
|
|
56
|
+
iam-barchart:not(.chart--horizontal)::part(key-unchecked):is(:hover, :focus, .hover, :focus-within){
|
|
57
|
+
background: var(--colour-btn-action-hover-bg);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
iam-barchart:not(.chart--horizontal)::part(key-unchecked) {
|
|
61
|
+
|
|
62
|
+
opacity: 0.25;
|
|
63
|
+
}
|
|
64
|
+
iam-barchart::part(tooltip) {
|
|
65
|
+
text-decoration: none!important;
|
|
66
|
+
}
|
|
67
|
+
iam-barchart::part(tooltip):after{
|
|
68
|
+
|
|
69
|
+
font-family: "Font Awesome 6 Pro";
|
|
70
|
+
font-weight: 900;
|
|
71
|
+
content: "\f059";
|
|
72
|
+
display: inline-block;
|
|
73
|
+
margin-left: 0.2em;
|
|
74
|
+
margin-right: 0.1em;
|
|
75
|
+
margin-bottom: 0.1em;
|
|
76
|
+
color: var(--colour-primary);
|
|
77
|
+
border: none;
|
|
78
|
+
|
|
79
|
+
}
|
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
@use "../_func" as *;
|
|
2
|
+
|
|
3
|
+
$chart-colour-1: map-get($wider-colours,"3")!default;
|
|
4
|
+
$chart-colour-2: map-get($wider-colours,"4")!default;
|
|
5
|
+
$chart-colour-3: map-get($wider-colours,"5")!default;
|
|
6
|
+
$chart-colour-4: map-get($wider-colours,"6")!default;
|
|
7
|
+
$chart-colour-5: map-get($wider-colours,"7")!default;
|
|
8
|
+
$chart-colour-6: map-get($wider-colours,"8")!default;
|
|
9
|
+
$chart-colour-7: map-get($wider-colours,"9")!default;
|
|
10
|
+
$chart-colour-8: map-get($wider-colours,"10")!default;
|
|
11
|
+
$chart-colour-9: map-get($wider-colours,"11")!default;
|
|
12
|
+
$chart-colour-10: map-get($wider-colours,"12")!default;
|
|
13
|
+
|
|
14
|
+
$chart-colors: ();
|
|
15
|
+
$chart-colors: map-merge((
|
|
16
|
+
1: $chart-colour-1,
|
|
17
|
+
2: $chart-colour-2,
|
|
18
|
+
3: $chart-colour-3,
|
|
19
|
+
4: $chart-colour-4,
|
|
20
|
+
5: $chart-colour-5,
|
|
21
|
+
6: $chart-colour-6,
|
|
22
|
+
7: $chart-colour-7,
|
|
23
|
+
8: $chart-colour-8,
|
|
24
|
+
9: $chart-colour-9,
|
|
25
|
+
10: $chart-colour-10
|
|
26
|
+
), $chart-colors);
|
|
27
|
+
|
|
28
|
+
$chart-colour-1-hover: map-get($wider-colours-hover,"3")!default;
|
|
29
|
+
$chart-colour-2-hover: map-get($wider-colours-hover,"4")!default;
|
|
30
|
+
$chart-colour-3-hover: map-get($wider-colours-hover,"5")!default;
|
|
31
|
+
$chart-colour-4-hover: map-get($wider-colours-hover,"6")!default;
|
|
32
|
+
$chart-colour-5-hover: map-get($wider-colours-hover,"7")!default;
|
|
33
|
+
$chart-colour-6-hover: map-get($wider-colours-hover,"8")!default;
|
|
34
|
+
$chart-colour-7-hover: map-get($wider-colours-hover,"9")!default;
|
|
35
|
+
$chart-colour-8-hover: map-get($wider-colours-hover,"10")!default;
|
|
36
|
+
$chart-colour-9-hover: map-get($wider-colours-hover,"11")!default;
|
|
37
|
+
$chart-colour-10-hover: map-get($wider-colours-hover,"12")!default;
|
|
38
|
+
|
|
39
|
+
$chart-colors-hover: ();
|
|
40
|
+
$chart-colors-hover: map-merge((
|
|
41
|
+
1: $chart-colour-1-hover,
|
|
42
|
+
2: $chart-colour-2-hover,
|
|
43
|
+
3: $chart-colour-3-hover,
|
|
44
|
+
4: $chart-colour-4-hover,
|
|
45
|
+
5: $chart-colour-5-hover,
|
|
46
|
+
6: $chart-colour-6-hover,
|
|
47
|
+
7: $chart-colour-7-hover,
|
|
48
|
+
8: $chart-colour-8-hover,
|
|
49
|
+
9: $chart-colour-9-hover,
|
|
50
|
+
10: $chart-colour-10-hover
|
|
51
|
+
), $chart-colors-hover);
|
|
52
|
+
|
|
53
|
+
$chart-height: #{rem(120)}!default;
|
|
54
|
+
$chart-height-lg: #{rem(200)}!default;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
// #region Apply chart colours
|
|
59
|
+
:host {
|
|
60
|
+
|
|
61
|
+
@each $index, $value in $chart-colors {
|
|
62
|
+
--chart-colour-#{$index}-set: var(--chart-colour-#{$index},#{$value});
|
|
63
|
+
}
|
|
64
|
+
@each $index, $value in $chart-colors-hover {
|
|
65
|
+
--chart-colour-#{$index}-hover: var(--chart-colour-#{$index},#{$value});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
--chart-colour-success: #D2F0C9!important;
|
|
69
|
+
--chart-colour-success-hover: #8AD873!important;
|
|
70
|
+
--chart-colour-danger: #F5C2C7!important;
|
|
71
|
+
--chart-colour-danger-hover: #f5c2e7!important;
|
|
72
|
+
--chart-colour-warning: #FFD280!important;
|
|
73
|
+
--chart-colour-warning-hover: #FFB020!important;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@for $i from 1 to 10 {
|
|
77
|
+
|
|
78
|
+
.chart__key .key:nth-child(10n - #{10 - $i}),
|
|
79
|
+
.chart__outer table tbody tr td:not(:first-child):nth-child(10n - #{10 - ($i+1)}) {
|
|
80
|
+
|
|
81
|
+
--chart-colour: var(#{'--chart-colour-'+$i+'-set'});
|
|
82
|
+
--chart-colour-hover: var(#{'--chart-colour-'+$i+'-hover'});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// #endregion
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
// #region Basic setup - including: container setup, css vars
|
|
90
|
+
|
|
91
|
+
::slotted(table) {
|
|
92
|
+
display: none!important;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.chart__outer {
|
|
96
|
+
|
|
97
|
+
container-type: inline-size;
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
|
|
101
|
+
font-weight: var(--chart-font-weight, bold);;
|
|
102
|
+
color: var(--chart-text-color, black);
|
|
103
|
+
|
|
104
|
+
margin-bottom: 2rem;
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
> * {
|
|
108
|
+
display: block;
|
|
109
|
+
order: 2;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// CSS vars that can be overwritten by declaring them without the -set on the end of the variable i.e. --chart-colour-1: red; would overwrite --chart-colour-1-set
|
|
113
|
+
--body-colour-set: var(--body-colour, Canvas);
|
|
114
|
+
--text-colour-set: var(--text-colour, black);
|
|
115
|
+
|
|
116
|
+
--chart-height-set: var(--chart-height, #{$chart-height});
|
|
117
|
+
--chart-height-lg-set: var(--chart-height-lg, #{$chart-height-lg});
|
|
118
|
+
|
|
119
|
+
--chart-height-resp: var(--chart-height-set);
|
|
120
|
+
|
|
121
|
+
tbody {
|
|
122
|
+
--chart-direction: 360deg;
|
|
123
|
+
--chart-day-bg-pos: 100% calc(var(--single-day) * 7)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
// Non-configurable css vars
|
|
129
|
+
--index-below: -1;
|
|
130
|
+
--index-base: 0;
|
|
131
|
+
--index-focus: 2;
|
|
132
|
+
--index-above: 10;
|
|
133
|
+
--index-floating: 100;
|
|
134
|
+
--index-menu: 200;
|
|
135
|
+
--index-overlay: 1000;
|
|
136
|
+
--key-label-width: 100%;
|
|
137
|
+
--label-size: #{rem(12)};
|
|
138
|
+
--pie-size: calc(50% - 1.4rem);
|
|
139
|
+
--line-thickness: 1px;
|
|
140
|
+
--yaxis-width: auto;
|
|
141
|
+
--yaxis-point-display: block;
|
|
142
|
+
--yaxis-last-point-transform: translate(0,-50%);
|
|
143
|
+
--bar-gap: min(10%, 0.75rem);
|
|
144
|
+
|
|
145
|
+
@container (max-width: 36em) {
|
|
146
|
+
|
|
147
|
+
:has(tr:nth-child(5) td:nth-child(4)),
|
|
148
|
+
:has(tr:nth-child(10)){
|
|
149
|
+
|
|
150
|
+
--yaxis-width: 0;
|
|
151
|
+
--yaxis-point-display: none;
|
|
152
|
+
--yaxis-last-point-transform: translate(0,-100%);
|
|
153
|
+
--bar-gap: 0;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@container (max-width: 63em) {
|
|
158
|
+
:has(tr:nth-child(10)){
|
|
159
|
+
|
|
160
|
+
--bar-gap: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@container (min-width: 36em) {
|
|
165
|
+
|
|
166
|
+
.chart__wrapper {
|
|
167
|
+
--chart-height-resp: var(--chart-height-lg-set);
|
|
168
|
+
--pie-size: calc(33.333% - 1.4rem);
|
|
169
|
+
--line-thickness: 0.8px;
|
|
170
|
+
--yaxis-width: auto;
|
|
171
|
+
--yaxis-point-display: block;
|
|
172
|
+
--yaxis-last-point-transform: translate(0,-50%);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@container (min-width: 62em) {
|
|
177
|
+
|
|
178
|
+
.chart__wrapper {
|
|
179
|
+
|
|
180
|
+
--label-size: #{rem(14)};
|
|
181
|
+
--pie-size: calc(25% - 1.5rem);
|
|
182
|
+
--line-thickness: 0.5px;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.chart__spacer span {
|
|
187
|
+
opacity: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
}
|
|
191
|
+
// #endregion
|
|
192
|
+
|
|
193
|
+
// #region Chart key
|
|
194
|
+
.chart__outer > input[type="checkbox"] {
|
|
195
|
+
opacity: 0;
|
|
196
|
+
position: absolute;
|
|
197
|
+
pointer-events: none;
|
|
198
|
+
bottom: 50%;
|
|
199
|
+
left: 50%;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.chart__key {
|
|
203
|
+
|
|
204
|
+
padding: 0 0 0 0;
|
|
205
|
+
margin-bottom: 1.5rem;
|
|
206
|
+
display: flex;
|
|
207
|
+
overflow: auto;
|
|
208
|
+
scroll-snap-type: x mandatory;
|
|
209
|
+
scroll-padding: 0.75rem;
|
|
210
|
+
//justify-content: flex-end;
|
|
211
|
+
gap: 0.5rem;
|
|
212
|
+
|
|
213
|
+
&:has(label:first-child:last-child){
|
|
214
|
+
display: var(--single-key-display, none);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.key {
|
|
218
|
+
|
|
219
|
+
margin: 0;
|
|
220
|
+
|
|
221
|
+
&:before {
|
|
222
|
+
content: "";
|
|
223
|
+
height: 0.8em;
|
|
224
|
+
width: 0.8em;
|
|
225
|
+
margin-right: 0.3em;
|
|
226
|
+
background-color: var(--chart-colour);
|
|
227
|
+
display: inline-block;
|
|
228
|
+
border-radius: var(--key-border-radius,4px);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&[data-label="Min"],
|
|
232
|
+
&[data-label="Max"] {
|
|
233
|
+
display: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.chart__total {
|
|
237
|
+
display: none;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Hide chart keys
|
|
243
|
+
.chart__outer > input[type="checkbox"]:not(:checked) ~ .chart__key .key {
|
|
244
|
+
|
|
245
|
+
//opacity: 0.25;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@for $i from 1 to 10 {
|
|
249
|
+
|
|
250
|
+
.chart__outer > input[type="checkbox"]:nth-of-type(#{$i}):not(:checked) ~ .chart__key .key:nth-of-type(#{$i}) {
|
|
251
|
+
opacity: 0.25;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
// #endregion
|
|
255
|
+
|
|
256
|
+
// #region y-axis
|
|
257
|
+
:host([data-yaxis]){
|
|
258
|
+
|
|
259
|
+
--yaxis-display: flex;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.chart__yaxis {
|
|
263
|
+
|
|
264
|
+
display: var(--yaxis-display, none);
|
|
265
|
+
flex-direction: column-reverse;
|
|
266
|
+
width: var(--yaxis-width);
|
|
267
|
+
|
|
268
|
+
.axis__point {
|
|
269
|
+
|
|
270
|
+
bottom: var(--percent);
|
|
271
|
+
position: relative;
|
|
272
|
+
height: 0;
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
|
|
275
|
+
&:not(:last-child){
|
|
276
|
+
display: var(--yaxis-point-display);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
span {
|
|
280
|
+
display: block;
|
|
281
|
+
transform: translate(0,-50%);
|
|
282
|
+
padding-right: 0.25rem;
|
|
283
|
+
text-align: right;
|
|
284
|
+
//font-size: var(--label-size);
|
|
285
|
+
font-weight: var(--chart-yaxis-fw, normal);
|
|
286
|
+
font-size: var(--chart-yaxis-fs, #{rem(12)});
|
|
287
|
+
color: var(--colour-body);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&:last-child span {
|
|
291
|
+
|
|
292
|
+
transform: var(--yaxis-last-point-transform);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// #endregion
|
|
297
|
+
|
|
298
|
+
// #region X-axis
|
|
299
|
+
.chart__xaxis {
|
|
300
|
+
margin-bottom: 1rem;
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-direction: column-reverse;
|
|
303
|
+
width: 100%;
|
|
304
|
+
position: absolute;
|
|
305
|
+
left: 0;
|
|
306
|
+
bottom: -1rem;
|
|
307
|
+
|
|
308
|
+
.axis__point {
|
|
309
|
+
|
|
310
|
+
left: var(--percent);
|
|
311
|
+
width: 1px;
|
|
312
|
+
position: absolute;
|
|
313
|
+
height: 0;
|
|
314
|
+
white-space: nowrap;
|
|
315
|
+
|
|
316
|
+
span {
|
|
317
|
+
display: block;
|
|
318
|
+
transform: translate(-50%, 0%);
|
|
319
|
+
text-align: center;
|
|
320
|
+
font-size: var(--label-size);
|
|
321
|
+
position: absolute;
|
|
322
|
+
left: 50%;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
// #endregion
|
|
327
|
+
|
|
328
|
+
// #region Guidelines
|
|
329
|
+
.chart__guidelines {
|
|
330
|
+
|
|
331
|
+
position: absolute;
|
|
332
|
+
top: 0;
|
|
333
|
+
left: 0;
|
|
334
|
+
width: 100%;
|
|
335
|
+
height: 100%;
|
|
336
|
+
display: flex;
|
|
337
|
+
flex-direction: column-reverse;
|
|
338
|
+
pointer-events: none;
|
|
339
|
+
|
|
340
|
+
.guideline {
|
|
341
|
+
|
|
342
|
+
bottom: var(--percent);
|
|
343
|
+
position: absolute;
|
|
344
|
+
right: 0;
|
|
345
|
+
width: 100%;
|
|
346
|
+
height: 0px;
|
|
347
|
+
margin-bottom: -1px;
|
|
348
|
+
border-bottom: 1px dashed #eeeeee;
|
|
349
|
+
pointer-events: none;
|
|
350
|
+
z-index: var(--index-below);
|
|
351
|
+
//overflow: hidden;
|
|
352
|
+
|
|
353
|
+
&:not(.guideline--target) span{
|
|
354
|
+
display: none;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.guideline--target {
|
|
359
|
+
|
|
360
|
+
border-bottom: 1px dashed #000000;
|
|
361
|
+
z-index: var(--index-above);
|
|
362
|
+
text-shadow: 1px solid white;
|
|
363
|
+
overflow: visible;
|
|
364
|
+
|
|
365
|
+
span {
|
|
366
|
+
position: absolute;
|
|
367
|
+
bottom: 0;
|
|
368
|
+
font-size: var(--label-size);
|
|
369
|
+
text-shadow: 1px 1px 2px rgba(255, 255, 255, 1);
|
|
370
|
+
background: rgba(255,255,255,0.6);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
[data-value="0"] {
|
|
375
|
+
border-bottom: 1px solid var(--colour-primary);
|
|
376
|
+
|
|
377
|
+
&:not(:first-child){
|
|
378
|
+
|
|
379
|
+
border-bottom: 1px dashed var(--colour-primary);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
// #endregion
|
|
384
|
+
|
|
385
|
+
// #region Default column chart (Also applies to line chart)
|
|
386
|
+
.chart__wrapper {
|
|
387
|
+
|
|
388
|
+
display: block;
|
|
389
|
+
display: flex;
|
|
390
|
+
flex-direction: row;
|
|
391
|
+
position: relative;
|
|
392
|
+
|
|
393
|
+
.chart {
|
|
394
|
+
|
|
395
|
+
position: relative;
|
|
396
|
+
flex-grow: 1;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
table {
|
|
400
|
+
display: block;
|
|
401
|
+
width: 100%!important;
|
|
402
|
+
padding-top: var(--chart-height-resp); // 16:9 ratio
|
|
403
|
+
position: relative;
|
|
404
|
+
margin-bottom: 0;
|
|
405
|
+
overflow: visible;
|
|
406
|
+
|
|
407
|
+
thead {
|
|
408
|
+
display: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
tbody {
|
|
412
|
+
|
|
413
|
+
display: flex;
|
|
414
|
+
position: absolute;
|
|
415
|
+
width: 100%;
|
|
416
|
+
height: 100%;
|
|
417
|
+
top: 0;
|
|
418
|
+
left: 0;
|
|
419
|
+
flex-direction: row;
|
|
420
|
+
border: none;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
tbody tr {
|
|
424
|
+
display: flex;
|
|
425
|
+
flex-direction: row;
|
|
426
|
+
justify-content: var(--chart-bar-alignment ,center);
|
|
427
|
+
align-items: flex-end;
|
|
428
|
+
border: none;
|
|
429
|
+
width: 100%;
|
|
430
|
+
height: 100%;
|
|
431
|
+
position: relative;
|
|
432
|
+
padding: 0 2px;
|
|
433
|
+
gap: var(--bar-gap);
|
|
434
|
+
|
|
435
|
+
td {
|
|
436
|
+
font-weight: inherit;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
td:first-child { // part=xaxis
|
|
440
|
+
position: absolute;
|
|
441
|
+
top: 100%;
|
|
442
|
+
left: 0%;
|
|
443
|
+
width: fit-content;
|
|
444
|
+
padding: 0;
|
|
445
|
+
white-space: nowrap;
|
|
446
|
+
overflow: hidden;
|
|
447
|
+
text-overflow: ellipsis;
|
|
448
|
+
font-size: var(--label-size);
|
|
449
|
+
text-align: center;
|
|
450
|
+
|
|
451
|
+
@container (min-width: 62em) {
|
|
452
|
+
|
|
453
|
+
display: block;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
button {
|
|
457
|
+
all: unset;
|
|
458
|
+
cursor: pointer;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
td[data-label="Min"],
|
|
463
|
+
td[data-label="Max"] {
|
|
464
|
+
display: none;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
&:first-child td:first-child,
|
|
468
|
+
&:last-child td:first-child {
|
|
469
|
+
|
|
470
|
+
display: block;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
td:not(:first-child) {
|
|
474
|
+
height: 100%;
|
|
475
|
+
height: var(--percent, 0%);
|
|
476
|
+
bottom: var(--bottom,0%);
|
|
477
|
+
width: 100%;
|
|
478
|
+
max-width: #{rem(120)};
|
|
479
|
+
position: relative;
|
|
480
|
+
padding: 0;
|
|
481
|
+
background: var(--chart-colour);
|
|
482
|
+
border-top-right-radius: 4px;
|
|
483
|
+
border-top-left-radius: 4px;
|
|
484
|
+
|
|
485
|
+
&:hover {
|
|
486
|
+
background: var(--chart-colour-hover);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
&:has(span:empty),
|
|
490
|
+
&:empty{
|
|
491
|
+
display: none;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
&[data-label]:before {
|
|
495
|
+
display: none;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
span { //part="popover"
|
|
499
|
+
position: absolute;
|
|
500
|
+
top: var(--cursor-y, 50%);
|
|
501
|
+
left: var(--cursor-x, 50%);
|
|
502
|
+
font-size: var(--label-size);
|
|
503
|
+
line-height: 1.2;
|
|
504
|
+
transform: translate(-50%,0);
|
|
505
|
+
background: var(--chart-details-bg, var(--colour-canvas-2,Canvas));
|
|
506
|
+
opacity: 0;
|
|
507
|
+
pointer-events: none;
|
|
508
|
+
padding: 0.5rem;
|
|
509
|
+
border-radius: 0.5rem;
|
|
510
|
+
margin-bottom: 0.25rem;
|
|
511
|
+
//color: var(--colour-primary-theme);
|
|
512
|
+
white-space: pre;
|
|
513
|
+
text-align: left;
|
|
514
|
+
box-shadow: var(--chart-details-shadow, 0 #{rem(2)} #{rem(12)} rgba(0, 0, 0, 0.25));
|
|
515
|
+
transform: translate(-50%,-100%);
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
&::before {
|
|
519
|
+
content: attr(data-group)'\A';
|
|
520
|
+
}
|
|
521
|
+
&[data-label]::before {
|
|
522
|
+
content: attr(data-group)'\A'attr(data-label)'\A';
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
&:hover span {
|
|
527
|
+
opacity: 1;
|
|
528
|
+
z-index: var(--index-above);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
td:first-child {
|
|
534
|
+
&[data-label]:before {
|
|
535
|
+
display: none;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// change the look of chart when crowded
|
|
541
|
+
@container (max-width: 36em) {
|
|
542
|
+
tbody:has(tr:nth-child(5) td:nth-child(4)) tr,
|
|
543
|
+
tbody:has(tr:nth-child(10)) tr {
|
|
544
|
+
|
|
545
|
+
td:first-child {
|
|
546
|
+
display: none;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
&:first-child td:first-child {
|
|
550
|
+
|
|
551
|
+
left: 0%;
|
|
552
|
+
transform: translate(0,0);
|
|
553
|
+
display: block;
|
|
554
|
+
text-align: left;
|
|
555
|
+
}
|
|
556
|
+
&:last-child td:first-child {
|
|
557
|
+
|
|
558
|
+
left: 100%;
|
|
559
|
+
transform: translate(-100%,0);
|
|
560
|
+
display: block;
|
|
561
|
+
text-align: right;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
&:first-child td:not(:first-child) span {
|
|
565
|
+
|
|
566
|
+
left: -20%;
|
|
567
|
+
transform: translate(0%,0);
|
|
568
|
+
text-align: left;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
&:last-child td:not(:first-child) span {
|
|
572
|
+
|
|
573
|
+
left: 120%;
|
|
574
|
+
transform: translate(-100%,0);
|
|
575
|
+
text-align: right;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
// Hide labels when it gets crowded
|
|
580
|
+
@container (min-width: 36em) {
|
|
581
|
+
|
|
582
|
+
tbody:has(tr:nth-child(25)){
|
|
583
|
+
tr td:first-child {
|
|
584
|
+
display: none!important;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
tr:is(:first-child, :nth-child(2n + 1)) td:first-child {
|
|
588
|
+
display: block!important;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
tbody:has(tr:nth-child(50)){
|
|
593
|
+
|
|
594
|
+
tr:is(:first-child, :nth-child(2n + 1)) td:first-child,
|
|
595
|
+
tr td:first-child {
|
|
596
|
+
display: none!important;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
tr:is(:first-child, :nth-child(10n + 1)) td:first-child {
|
|
600
|
+
display: block!important;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
tbody:has(tr:nth-child(100)){
|
|
605
|
+
|
|
606
|
+
tr:is(:first-child, :nth-child(10n + 1)) td:first-child,
|
|
607
|
+
tr td:first-child {
|
|
608
|
+
display: none!important;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
tr:is(:first-child, :nth-child(20n + 1)) td:first-child {
|
|
612
|
+
display: block!important;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
// #endregion
|
|
619
|
+
|
|
620
|
+
// #region Chart colour overide classes
|
|
621
|
+
:host(.chart-colour--success) td,
|
|
622
|
+
:host(:is(.chart-colour--success,.chart-colour--danger,.chart-colour--wraning)) td.chart-colour--success,
|
|
623
|
+
.chart-colour--success td {
|
|
624
|
+
--chart-colour: var(--chart-colour-success)!important;
|
|
625
|
+
|
|
626
|
+
&:hover {
|
|
627
|
+
--chart-colour-hover: var(--chart-colour-success-hover)!important;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
:host(.chart-colour--danger) td,
|
|
632
|
+
:host(:is(.chart-colour--success,.chart-colour--danger,.chart-colour--wraning)) td.chart-colour--danger,
|
|
633
|
+
.chart-colour--danger,
|
|
634
|
+
.chart-colour--danger td{
|
|
635
|
+
--chart-colour: var(--chart-colour-danger)!important;
|
|
636
|
+
|
|
637
|
+
&:hover {
|
|
638
|
+
--chart-colour-hover: var(--chart-colour-danger-hover)!important;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
:host(.chart-colour--warning) td,
|
|
643
|
+
:host(:is(.chart-colour--success,.chart-colour--danger,.chart-colour--wraning)) td.chart-colour--warning,
|
|
644
|
+
.chart-colour--warning,
|
|
645
|
+
.chart-colour--warning td{
|
|
646
|
+
--chart-colour: var(--chart-colour-warning)!important;
|
|
647
|
+
|
|
648
|
+
&:hover {
|
|
649
|
+
--chart-colour-hover: var(--chart-colour-warning-hover)!important;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
// #endregion
|