@trebco/treb 30.9.2 → 30.10.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.
@@ -1,250 +0,0 @@
1
- /*
2
- * This file is part of TREB.
3
- *
4
- * TREB is free software: you can redistribute it and/or modify it under the
5
- * terms of the GNU General Public License as published by the Free Software
6
- * Foundation, either version 3 of the License, or (at your option) any
7
- * later version.
8
- *
9
- * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
- * details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
- *
17
- * Copyright 2022-2024 trebco, llc.
18
- * info@treb.app
19
- *
20
- */
21
-
22
- /**
23
- * NOTE: this file uses the color-mod() function and a postcss library
24
- * to translate it. that function is no longer in the spec and will be
25
- * implemented differently, so this will probably need to change.
26
- *
27
- * originally this file used sass so we used some sass library functions
28
- * to do the same thing. all we are doing is (1) set alpha on a color and
29
- * (2) darken a color.
30
- */
31
-
32
- $color1: #8DD3C7;
33
- $color2: #FFFFB3;
34
- $color3: #BEBADA;
35
- $color4: #FB8072;
36
- $color5: #80B1D3;
37
- $color6: #FDB462;
38
- $color7: #B3DE69;
39
- $color8: #FCCDE5;
40
- $color9: #D9D9D9;
41
- $color10: #BC80BD;
42
- $color11: #CCEBC5;
43
- $color12: #FFED6F;
44
-
45
- $font-stack: // "-apple-system",
46
- "BlinkMacSystemFont",
47
- "Segoe UI",
48
- "Roboto",
49
- "Oxygen-Sans",
50
- "Ubuntu",
51
- "Cantarell",
52
- "Helvetica Neue",
53
- "sans-serif";
54
-
55
- .treb-chart {
56
-
57
- font-family: $font-stack;
58
-
59
- /* box-shadow:0 3px 7px rgba(0,0,0,.3); // looks good though */
60
-
61
- background: #fff;
62
-
63
- .axis-label {
64
- font-size: 8.5pt;
65
- }
66
-
67
- .chart-title {
68
- font-size: 14pt;
69
- }
70
-
71
- .chart-column {
72
- fill: $color1;
73
- }
74
-
75
- .chart-column-shadow {
76
- fill: color-mod($color1 shade(25%));
77
- }
78
-
79
- .chart-grid, .chart-ticks {
80
- stroke: #ddd;
81
- }
82
-
83
- .chart-column, .chart-bar {
84
- &.chart-column-shadow {
85
- &.series-1 { fill: color-mod($color1 shade(25%)); }
86
- &.series-2 { fill: color-mod($color3 shade(25%)); }
87
- &.series-3 { fill: color-mod($color4 shade(25%)); }
88
- &.series-4 { fill: color-mod($color5 shade(25%)); }
89
- &.series-5 { fill: color-mod($color6 shade(25%)); }
90
- &.series-6 { fill: color-mod($color7 shade(25%)); }
91
- &.series-7 { fill: color-mod($color8 shade(25%)); }
92
- &.series-8 { fill: color-mod($color9 shade(25%)); }
93
- &.series-9 { fill: color-mod($color10 shade(25%)); }
94
- &.series-10 { fill: color-mod($color11 shade(25%)); }
95
- &.series-11 { fill: color-mod($color12 shade(25%)); }
96
- &.series-12 { fill: color-mod($color2 shade(25%)); }
97
- }
98
-
99
- &.series-1 { fill: $color1; }
100
- &.series-2 { fill: $color3; }
101
- &.series-3 { fill: $color4; }
102
- &.series-4 { fill: $color5; }
103
- &.series-5 { fill: $color6; }
104
- &.series-6 { fill: $color7; }
105
- &.series-7 { fill: $color8; }
106
- &.series-8 { fill: $color9; }
107
- &.series-9 { fill: $color10; }
108
- &.series-10 { fill: $color11; }
109
- &.series-11 { fill: $color12; }
110
- &.series-12 { fill: $color2; }
111
-
112
-
113
- }
114
-
115
- .chart-line, .chart-area {
116
-
117
- .line {
118
-
119
- fill: none;
120
- stroke-width: 2px;
121
- stroke-linecap: round;
122
- stroke-linejoin: round;
123
-
124
- }
125
-
126
- &.scatter-line .line {
127
- stroke-width: 3px;
128
- }
129
-
130
- &.scatter-line .marker {
131
- stroke-width: 6px;
132
- fill: #fff;
133
- /*
134
- d: path('M-1,-1 L1,-1 L1,1 L-1,1 Z');
135
- */
136
- d: path('M0,-1.5 a1.5,1.5,0,1,1,0,3 a1.5,1.5,0,1,1,0,-3'); /* circle */
137
- transition: d .15s ease-in;
138
-
139
- &:hover {
140
- d: path('M0,-3 a3,3,0,1,1,0,6 a3,3,0,1,1,0,-6'); /* circle */
141
- }
142
-
143
- }
144
-
145
- &.series-1 { stroke: $color1; }
146
- &.series-2 { stroke: $color3; }
147
- &.series-3 { stroke: $color4; }
148
- &.series-4 { stroke: $color5; }
149
- &.series-5 { stroke: $color6; }
150
- &.series-6 { stroke: $color7; }
151
- &.series-7 { stroke: $color8; }
152
- &.series-8 { stroke: $color9; }
153
- &.series-9 { stroke: $color10; }
154
- &.series-10 { stroke: $color11; }
155
- &.series-11 { stroke: $color12; }
156
- &.series-12 { stroke: $color2; }
157
-
158
- }
159
-
160
- .chart-area {
161
-
162
- &.series-1 { fill: color-mod($color1 a(.75)); }
163
- &.series-2 { fill: color-mod($color3 a(.75)); }
164
- &.series-3 { fill: color-mod($color4 a(.75)); }
165
- &.series-4 { fill: color-mod($color5 a(.75)); }
166
- &.series-5 { fill: color-mod($color6 a(.75)); }
167
- &.series-6 { fill: color-mod($color7 a(.75)); }
168
- &.series-7 { fill: color-mod($color8 a(.75)); }
169
- &.series-8 { fill: color-mod($color9 a(.75)); }
170
- &.series-9 { fill: color-mod($color10 a(.75)); }
171
- &.series-10 { fill: color-mod($color11 a(.75)); }
172
- &.series-11 { fill: color-mod($color12 a(.75)); }
173
- &.series-12 { fill: color-mod($color2 a(.75)); }
174
-
175
- .fill {
176
- stroke-linecap: round;
177
- stroke-linejoin: round;
178
- }
179
-
180
- }
181
-
182
- .points {
183
- stroke-width: 1;
184
- stroke: #39f;
185
- }
186
-
187
- .mouse-layer {
188
- fill: transparent;
189
- }
190
-
191
- .donut path.callout {
192
- fill: none;
193
- stroke: #999;
194
- stroke-dasharray: 2 2;
195
- }
196
-
197
- text.callout-label {
198
- font-size: 10pt;
199
- }
200
-
201
- .legend {
202
- font-size: 10.5pt;
203
-
204
- & { stroke: none; }
205
-
206
- .series-1 { fill: $color1; }
207
- .series-2 { fill: $color3; }
208
- .series-3 { fill: $color4; }
209
- .series-4 { fill: $color5; }
210
- .series-5 { fill: $color6; }
211
- .series-6 { fill: $color7; }
212
- .series-7 { fill: $color8; }
213
- .series-8 { fill: $color9; }
214
- .series-9 { fill: $color10; }
215
- .series-10 { fill: $color11; }
216
- .series-11 { fill: $color12; }
217
- .series-12 { fill: $color2; }
218
-
219
-
220
- }
221
-
222
- .donut path {
223
-
224
- stroke: none;
225
-
226
- /*
227
- don't use child ordering for color, use explicit series values.
228
- we want to tie color to input order, even if the chart sorts the
229
- data.
230
-
231
- I don't like this. we should use order. if necesary, you can
232
- add the nodes out of order.
233
- */
234
-
235
- &.series-1 { fill: $color1; }
236
- &.series-2 { fill: $color2; }
237
- &.series-3 { fill: $color3; }
238
- &.series-4 { fill: $color4; }
239
- &.series-5 { fill: $color5; }
240
- &.series-6 { fill: $color6; }
241
- &.series-7 { fill: $color7; }
242
- &.series-8 { fill: $color8; }
243
- &.series-9 { fill: $color9; }
244
- &.series-10 { fill: $color10; }
245
- &.series-11 { fill: $color11; }
246
- &.series-12 { fill: $color12; }
247
-
248
- }
249
-
250
- }