@readme/markdown 7.7.1 → 7.7.3

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/dist/775.js DELETED
@@ -1,1900 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_readme_markdown"] = self["webpackChunk_readme_markdown"] || []).push([[775],{
3
-
4
- /***/ 3775:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
-
7
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8
- /* harmony export */ diagram: () => (/* binding */ diagram)
9
- /* harmony export */ });
10
- /* harmony import */ var _chunk_U7L4IQIU_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5449);
11
- /* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2843);
12
- /* harmony import */ var _chunk_OBAELV6Q_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4196);
13
- /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6322);
14
- /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8066);
15
-
16
-
17
-
18
-
19
-
20
- // src/diagrams/xychart/parser/xychart.jison
21
- var parser = function() {
22
- var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(k, v, o2, l) {
23
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
24
- return o2;
25
- }, "o"), $V0 = [1, 10, 12, 14, 16, 18, 19, 21, 23], $V1 = [2, 6], $V2 = [1, 3], $V3 = [1, 5], $V4 = [1, 6], $V5 = [1, 7], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], $V7 = [1, 25], $V8 = [1, 26], $V9 = [1, 28], $Va = [1, 29], $Vb = [1, 30], $Vc = [1, 31], $Vd = [1, 32], $Ve = [1, 33], $Vf = [1, 34], $Vg = [1, 35], $Vh = [1, 36], $Vi = [1, 37], $Vj = [1, 43], $Vk = [1, 42], $Vl = [1, 47], $Vm = [1, 50], $Vn = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], $Vo = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], $Vp = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $Vq = [1, 64];
26
- var parser2 = {
27
- trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function trace() {
28
- }, "trace"),
29
- yy: {},
30
- symbols_: { "error": 2, "start": 3, "eol": 4, "XYCHART": 5, "chartConfig": 6, "document": 7, "CHART_ORIENTATION": 8, "statement": 9, "title": 10, "text": 11, "X_AXIS": 12, "parseXAxis": 13, "Y_AXIS": 14, "parseYAxis": 15, "LINE": 16, "plotData": 17, "BAR": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "SQUARE_BRACES_START": 24, "commaSeparatedNumbers": 25, "SQUARE_BRACES_END": 26, "NUMBER_WITH_DECIMAL": 27, "COMMA": 28, "xAxisData": 29, "bandData": 30, "ARROW_DELIMITER": 31, "commaSeparatedTexts": 32, "yAxisData": 33, "NEWLINE": 34, "SEMI": 35, "EOF": 36, "alphaNum": 37, "STR": 38, "MD_STR": 39, "alphaNumToken": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "PLUS": 44, "EQUALS": 45, "MULT": 46, "DOT": 47, "BRKT": 48, "MINUS": 49, "UNDERSCORE": 50, "$accept": 0, "$end": 1 },
31
- terminals_: { 2: "error", 5: "XYCHART", 8: "CHART_ORIENTATION", 10: "title", 12: "X_AXIS", 14: "Y_AXIS", 16: "LINE", 18: "BAR", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "SQUARE_BRACES_START", 26: "SQUARE_BRACES_END", 27: "NUMBER_WITH_DECIMAL", 28: "COMMA", 31: "ARROW_DELIMITER", 34: "NEWLINE", 35: "SEMI", 36: "EOF", 38: "STR", 39: "MD_STR", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "PLUS", 45: "EQUALS", 46: "MULT", 47: "DOT", 48: "BRKT", 49: "MINUS", 50: "UNDERSCORE" },
32
- productions_: [0, [3, 2], [3, 3], [3, 2], [3, 1], [6, 1], [7, 0], [7, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 3], [9, 2], [9, 3], [9, 2], [9, 2], [9, 1], [17, 3], [25, 3], [25, 1], [13, 1], [13, 2], [13, 1], [29, 1], [29, 3], [30, 3], [32, 3], [32, 1], [15, 1], [15, 2], [15, 1], [33, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [37, 1], [37, 2], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1]],
33
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
34
- var $0 = $$.length - 1;
35
- switch (yystate) {
36
- case 5:
37
- yy.setOrientation($$[$0]);
38
- break;
39
- case 9:
40
- yy.setDiagramTitle($$[$0].text.trim());
41
- break;
42
- case 12:
43
- yy.setLineData({ text: "", type: "text" }, $$[$0]);
44
- break;
45
- case 13:
46
- yy.setLineData($$[$0 - 1], $$[$0]);
47
- break;
48
- case 14:
49
- yy.setBarData({ text: "", type: "text" }, $$[$0]);
50
- break;
51
- case 15:
52
- yy.setBarData($$[$0 - 1], $$[$0]);
53
- break;
54
- case 16:
55
- this.$ = $$[$0].trim();
56
- yy.setAccTitle(this.$);
57
- break;
58
- case 17:
59
- case 18:
60
- this.$ = $$[$0].trim();
61
- yy.setAccDescription(this.$);
62
- break;
63
- case 19:
64
- this.$ = $$[$0 - 1];
65
- break;
66
- case 20:
67
- this.$ = [Number($$[$0 - 2]), ...$$[$0]];
68
- break;
69
- case 21:
70
- this.$ = [Number($$[$0])];
71
- break;
72
- case 22:
73
- yy.setXAxisTitle($$[$0]);
74
- break;
75
- case 23:
76
- yy.setXAxisTitle($$[$0 - 1]);
77
- break;
78
- case 24:
79
- yy.setXAxisTitle({ type: "text", text: "" });
80
- break;
81
- case 25:
82
- yy.setXAxisBand($$[$0]);
83
- break;
84
- case 26:
85
- yy.setXAxisRangeData(Number($$[$0 - 2]), Number($$[$0]));
86
- break;
87
- case 27:
88
- this.$ = $$[$0 - 1];
89
- break;
90
- case 28:
91
- this.$ = [$$[$0 - 2], ...$$[$0]];
92
- break;
93
- case 29:
94
- this.$ = [$$[$0]];
95
- break;
96
- case 30:
97
- yy.setYAxisTitle($$[$0]);
98
- break;
99
- case 31:
100
- yy.setYAxisTitle($$[$0 - 1]);
101
- break;
102
- case 32:
103
- yy.setYAxisTitle({ type: "text", text: "" });
104
- break;
105
- case 33:
106
- yy.setYAxisRangeData(Number($$[$0 - 2]), Number($$[$0]));
107
- break;
108
- case 37:
109
- this.$ = { text: $$[$0], type: "text" };
110
- break;
111
- case 38:
112
- this.$ = { text: $$[$0], type: "text" };
113
- break;
114
- case 39:
115
- this.$ = { text: $$[$0], type: "markdown" };
116
- break;
117
- case 40:
118
- this.$ = $$[$0];
119
- break;
120
- case 41:
121
- this.$ = $$[$0 - 1] + "" + $$[$0];
122
- break;
123
- }
124
- }, "anonymous"),
125
- table: [o($V0, $V1, { 3: 1, 4: 2, 7: 4, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), { 1: [3] }, o($V0, $V1, { 4: 2, 7: 4, 3: 8, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), o($V0, $V1, { 4: 2, 7: 4, 6: 9, 3: 10, 5: $V2, 8: [1, 11], 34: $V3, 35: $V4, 36: $V5 }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, o($V6, [2, 34]), o($V6, [2, 35]), o($V6, [2, 36]), { 1: [2, 1] }, o($V0, $V1, { 4: 2, 7: 4, 3: 21, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), { 1: [2, 3] }, o($V6, [2, 5]), o($V0, [2, 7], { 4: 22, 34: $V3, 35: $V4, 36: $V5 }), { 11: 23, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 39, 13: 38, 24: $Vj, 27: $Vk, 29: 40, 30: 41, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 45, 15: 44, 27: $Vl, 33: 46, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 49, 17: 48, 24: $Vm, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 52, 17: 51, 24: $Vm, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 20: [1, 53] }, { 22: [1, 54] }, o($Vn, [2, 18]), { 1: [2, 2] }, o($Vn, [2, 8]), o($Vn, [2, 9]), o($Vo, [2, 37], { 40: 55, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }), o($Vo, [2, 38]), o($Vo, [2, 39]), o($Vp, [2, 40]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), o($Vp, [2, 47]), o($Vp, [2, 48]), o($Vp, [2, 49]), o($Vp, [2, 50]), o($Vp, [2, 51]), o($Vn, [2, 10]), o($Vn, [2, 22], { 30: 41, 29: 56, 24: $Vj, 27: $Vk }), o($Vn, [2, 24]), o($Vn, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, o($Vn, [2, 11]), o($Vn, [2, 30], { 33: 60, 27: $Vl }), o($Vn, [2, 32]), { 31: [1, 61] }, o($Vn, [2, 12]), { 17: 62, 24: $Vm }, { 25: 63, 27: $Vq }, o($Vn, [2, 14]), { 17: 65, 24: $Vm }, o($Vn, [2, 16]), o($Vn, [2, 17]), o($Vp, [2, 41]), o($Vn, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, o($Vn, [2, 31]), { 27: [1, 69] }, o($Vn, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, o($Vn, [2, 15]), o($Vn, [2, 26]), o($Vn, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, o($Vn, [2, 33]), o($Vn, [2, 19]), { 25: 73, 27: $Vq }, { 26: [2, 28] }, { 26: [2, 20] }],
126
- defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] },
127
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
128
- if (hash.recoverable) {
129
- this.trace(str);
130
- } else {
131
- var error = new Error(str);
132
- error.hash = hash;
133
- throw error;
134
- }
135
- }, "parseError"),
136
- parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parse(input) {
137
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
138
- var args = lstack.slice.call(arguments, 1);
139
- var lexer2 = Object.create(this.lexer);
140
- var sharedState = { yy: {} };
141
- for (var k in this.yy) {
142
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
143
- sharedState.yy[k] = this.yy[k];
144
- }
145
- }
146
- lexer2.setInput(input, sharedState.yy);
147
- sharedState.yy.lexer = lexer2;
148
- sharedState.yy.parser = this;
149
- if (typeof lexer2.yylloc == "undefined") {
150
- lexer2.yylloc = {};
151
- }
152
- var yyloc = lexer2.yylloc;
153
- lstack.push(yyloc);
154
- var ranges = lexer2.options && lexer2.options.ranges;
155
- if (typeof sharedState.yy.parseError === "function") {
156
- this.parseError = sharedState.yy.parseError;
157
- } else {
158
- this.parseError = Object.getPrototypeOf(this).parseError;
159
- }
160
- function popStack(n) {
161
- stack.length = stack.length - 2 * n;
162
- vstack.length = vstack.length - n;
163
- lstack.length = lstack.length - n;
164
- }
165
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(popStack, "popStack");
166
- function lex() {
167
- var token;
168
- token = tstack.pop() || lexer2.lex() || EOF;
169
- if (typeof token !== "number") {
170
- if (token instanceof Array) {
171
- tstack = token;
172
- token = tstack.pop();
173
- }
174
- token = self.symbols_[token] || token;
175
- }
176
- return token;
177
- }
178
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(lex, "lex");
179
- var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
180
- while (true) {
181
- state = stack[stack.length - 1];
182
- if (this.defaultActions[state]) {
183
- action = this.defaultActions[state];
184
- } else {
185
- if (symbol === null || typeof symbol == "undefined") {
186
- symbol = lex();
187
- }
188
- action = table[state] && table[state][symbol];
189
- }
190
- if (typeof action === "undefined" || !action.length || !action[0]) {
191
- var errStr = "";
192
- expected = [];
193
- for (p in table[state]) {
194
- if (this.terminals_[p] && p > TERROR) {
195
- expected.push("'" + this.terminals_[p] + "'");
196
- }
197
- }
198
- if (lexer2.showPosition) {
199
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
200
- } else {
201
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
202
- }
203
- this.parseError(errStr, {
204
- text: lexer2.match,
205
- token: this.terminals_[symbol] || symbol,
206
- line: lexer2.yylineno,
207
- loc: yyloc,
208
- expected
209
- });
210
- }
211
- if (action[0] instanceof Array && action.length > 1) {
212
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
213
- }
214
- switch (action[0]) {
215
- case 1:
216
- stack.push(symbol);
217
- vstack.push(lexer2.yytext);
218
- lstack.push(lexer2.yylloc);
219
- stack.push(action[1]);
220
- symbol = null;
221
- if (!preErrorSymbol) {
222
- yyleng = lexer2.yyleng;
223
- yytext = lexer2.yytext;
224
- yylineno = lexer2.yylineno;
225
- yyloc = lexer2.yylloc;
226
- if (recovering > 0) {
227
- recovering--;
228
- }
229
- } else {
230
- symbol = preErrorSymbol;
231
- preErrorSymbol = null;
232
- }
233
- break;
234
- case 2:
235
- len = this.productions_[action[1]][1];
236
- yyval.$ = vstack[vstack.length - len];
237
- yyval._$ = {
238
- first_line: lstack[lstack.length - (len || 1)].first_line,
239
- last_line: lstack[lstack.length - 1].last_line,
240
- first_column: lstack[lstack.length - (len || 1)].first_column,
241
- last_column: lstack[lstack.length - 1].last_column
242
- };
243
- if (ranges) {
244
- yyval._$.range = [
245
- lstack[lstack.length - (len || 1)].range[0],
246
- lstack[lstack.length - 1].range[1]
247
- ];
248
- }
249
- r = this.performAction.apply(yyval, [
250
- yytext,
251
- yyleng,
252
- yylineno,
253
- sharedState.yy,
254
- action[1],
255
- vstack,
256
- lstack
257
- ].concat(args));
258
- if (typeof r !== "undefined") {
259
- return r;
260
- }
261
- if (len) {
262
- stack = stack.slice(0, -1 * len * 2);
263
- vstack = vstack.slice(0, -1 * len);
264
- lstack = lstack.slice(0, -1 * len);
265
- }
266
- stack.push(this.productions_[action[1]][0]);
267
- vstack.push(yyval.$);
268
- lstack.push(yyval._$);
269
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
270
- stack.push(newState);
271
- break;
272
- case 3:
273
- return true;
274
- }
275
- }
276
- return true;
277
- }, "parse")
278
- };
279
- var lexer = /* @__PURE__ */ function() {
280
- var lexer2 = {
281
- EOF: 1,
282
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
283
- if (this.yy.parser) {
284
- this.yy.parser.parseError(str, hash);
285
- } else {
286
- throw new Error(str);
287
- }
288
- }, "parseError"),
289
- // resets the lexer, sets new input
290
- setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(input, yy) {
291
- this.yy = yy || this.yy || {};
292
- this._input = input;
293
- this._more = this._backtrack = this.done = false;
294
- this.yylineno = this.yyleng = 0;
295
- this.yytext = this.matched = this.match = "";
296
- this.conditionStack = ["INITIAL"];
297
- this.yylloc = {
298
- first_line: 1,
299
- first_column: 0,
300
- last_line: 1,
301
- last_column: 0
302
- };
303
- if (this.options.ranges) {
304
- this.yylloc.range = [0, 0];
305
- }
306
- this.offset = 0;
307
- return this;
308
- }, "setInput"),
309
- // consumes and returns one char from the input
310
- input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
311
- var ch = this._input[0];
312
- this.yytext += ch;
313
- this.yyleng++;
314
- this.offset++;
315
- this.match += ch;
316
- this.matched += ch;
317
- var lines = ch.match(/(?:\r\n?|\n).*/g);
318
- if (lines) {
319
- this.yylineno++;
320
- this.yylloc.last_line++;
321
- } else {
322
- this.yylloc.last_column++;
323
- }
324
- if (this.options.ranges) {
325
- this.yylloc.range[1]++;
326
- }
327
- this._input = this._input.slice(1);
328
- return ch;
329
- }, "input"),
330
- // unshifts one char (or a string) into the input
331
- unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(ch) {
332
- var len = ch.length;
333
- var lines = ch.split(/(?:\r\n?|\n)/g);
334
- this._input = ch + this._input;
335
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
336
- this.offset -= len;
337
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
338
- this.match = this.match.substr(0, this.match.length - 1);
339
- this.matched = this.matched.substr(0, this.matched.length - 1);
340
- if (lines.length - 1) {
341
- this.yylineno -= lines.length - 1;
342
- }
343
- var r = this.yylloc.range;
344
- this.yylloc = {
345
- first_line: this.yylloc.first_line,
346
- last_line: this.yylineno + 1,
347
- first_column: this.yylloc.first_column,
348
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
349
- };
350
- if (this.options.ranges) {
351
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
352
- }
353
- this.yyleng = this.yytext.length;
354
- return this;
355
- }, "unput"),
356
- // When called from action, caches matched text and appends it on next action
357
- more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
358
- this._more = true;
359
- return this;
360
- }, "more"),
361
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
362
- reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
363
- if (this.options.backtrack_lexer) {
364
- this._backtrack = true;
365
- } else {
366
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
367
- text: "",
368
- token: null,
369
- line: this.yylineno
370
- });
371
- }
372
- return this;
373
- }, "reject"),
374
- // retain first n characters of the match
375
- less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(n) {
376
- this.unput(this.match.slice(n));
377
- }, "less"),
378
- // displays already matched input, i.e. for error messages
379
- pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
380
- var past = this.matched.substr(0, this.matched.length - this.match.length);
381
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
382
- }, "pastInput"),
383
- // displays upcoming input, i.e. for error messages
384
- upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
385
- var next = this.match;
386
- if (next.length < 20) {
387
- next += this._input.substr(0, 20 - next.length);
388
- }
389
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
390
- }, "upcomingInput"),
391
- // displays the character position where the lexing error occurred, i.e. for error messages
392
- showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
393
- var pre = this.pastInput();
394
- var c = new Array(pre.length + 1).join("-");
395
- return pre + this.upcomingInput() + "\n" + c + "^";
396
- }, "showPosition"),
397
- // test the lexed token: return FALSE when not a match, otherwise return token
398
- test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(match, indexed_rule) {
399
- var token, lines, backup;
400
- if (this.options.backtrack_lexer) {
401
- backup = {
402
- yylineno: this.yylineno,
403
- yylloc: {
404
- first_line: this.yylloc.first_line,
405
- last_line: this.last_line,
406
- first_column: this.yylloc.first_column,
407
- last_column: this.yylloc.last_column
408
- },
409
- yytext: this.yytext,
410
- match: this.match,
411
- matches: this.matches,
412
- matched: this.matched,
413
- yyleng: this.yyleng,
414
- offset: this.offset,
415
- _more: this._more,
416
- _input: this._input,
417
- yy: this.yy,
418
- conditionStack: this.conditionStack.slice(0),
419
- done: this.done
420
- };
421
- if (this.options.ranges) {
422
- backup.yylloc.range = this.yylloc.range.slice(0);
423
- }
424
- }
425
- lines = match[0].match(/(?:\r\n?|\n).*/g);
426
- if (lines) {
427
- this.yylineno += lines.length;
428
- }
429
- this.yylloc = {
430
- first_line: this.yylloc.last_line,
431
- last_line: this.yylineno + 1,
432
- first_column: this.yylloc.last_column,
433
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
434
- };
435
- this.yytext += match[0];
436
- this.match += match[0];
437
- this.matches = match;
438
- this.yyleng = this.yytext.length;
439
- if (this.options.ranges) {
440
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
441
- }
442
- this._more = false;
443
- this._backtrack = false;
444
- this._input = this._input.slice(match[0].length);
445
- this.matched += match[0];
446
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
447
- if (this.done && this._input) {
448
- this.done = false;
449
- }
450
- if (token) {
451
- return token;
452
- } else if (this._backtrack) {
453
- for (var k in backup) {
454
- this[k] = backup[k];
455
- }
456
- return false;
457
- }
458
- return false;
459
- }, "test_match"),
460
- // return next match in input
461
- next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
462
- if (this.done) {
463
- return this.EOF;
464
- }
465
- if (!this._input) {
466
- this.done = true;
467
- }
468
- var token, match, tempMatch, index;
469
- if (!this._more) {
470
- this.yytext = "";
471
- this.match = "";
472
- }
473
- var rules = this._currentRules();
474
- for (var i = 0; i < rules.length; i++) {
475
- tempMatch = this._input.match(this.rules[rules[i]]);
476
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
477
- match = tempMatch;
478
- index = i;
479
- if (this.options.backtrack_lexer) {
480
- token = this.test_match(tempMatch, rules[i]);
481
- if (token !== false) {
482
- return token;
483
- } else if (this._backtrack) {
484
- match = false;
485
- continue;
486
- } else {
487
- return false;
488
- }
489
- } else if (!this.options.flex) {
490
- break;
491
- }
492
- }
493
- }
494
- if (match) {
495
- token = this.test_match(match, rules[index]);
496
- if (token !== false) {
497
- return token;
498
- }
499
- return false;
500
- }
501
- if (this._input === "") {
502
- return this.EOF;
503
- } else {
504
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
505
- text: "",
506
- token: null,
507
- line: this.yylineno
508
- });
509
- }
510
- }, "next"),
511
- // return next match that has a token
512
- lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function lex() {
513
- var r = this.next();
514
- if (r) {
515
- return r;
516
- } else {
517
- return this.lex();
518
- }
519
- }, "lex"),
520
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
521
- begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function begin(condition) {
522
- this.conditionStack.push(condition);
523
- }, "begin"),
524
- // pop the previously active lexer condition state off the condition stack
525
- popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function popState() {
526
- var n = this.conditionStack.length - 1;
527
- if (n > 0) {
528
- return this.conditionStack.pop();
529
- } else {
530
- return this.conditionStack[0];
531
- }
532
- }, "popState"),
533
- // produce the lexer rule set which is active for the currently active lexer condition state
534
- _currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function _currentRules() {
535
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
536
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
537
- } else {
538
- return this.conditions["INITIAL"].rules;
539
- }
540
- }, "_currentRules"),
541
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
542
- topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function topState(n) {
543
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
544
- if (n >= 0) {
545
- return this.conditionStack[n];
546
- } else {
547
- return "INITIAL";
548
- }
549
- }, "topState"),
550
- // alias for begin(condition)
551
- pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function pushState(condition) {
552
- this.begin(condition);
553
- }, "pushState"),
554
- // return the number of states currently on the stack
555
- stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function stateStackSize() {
556
- return this.conditionStack.length;
557
- }, "stateStackSize"),
558
- options: { "case-insensitive": true },
559
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
560
- var YYSTATE = YY_START;
561
- switch ($avoiding_name_collisions) {
562
- case 0:
563
- break;
564
- case 1:
565
- break;
566
- case 2:
567
- this.popState();
568
- return 34;
569
- break;
570
- case 3:
571
- this.popState();
572
- return 34;
573
- break;
574
- case 4:
575
- return 34;
576
- break;
577
- case 5:
578
- break;
579
- case 6:
580
- return 10;
581
- break;
582
- case 7:
583
- this.pushState("acc_title");
584
- return 19;
585
- break;
586
- case 8:
587
- this.popState();
588
- return "acc_title_value";
589
- break;
590
- case 9:
591
- this.pushState("acc_descr");
592
- return 21;
593
- break;
594
- case 10:
595
- this.popState();
596
- return "acc_descr_value";
597
- break;
598
- case 11:
599
- this.pushState("acc_descr_multiline");
600
- break;
601
- case 12:
602
- this.popState();
603
- break;
604
- case 13:
605
- return "acc_descr_multiline_value";
606
- break;
607
- case 14:
608
- return 5;
609
- break;
610
- case 15:
611
- return 8;
612
- break;
613
- case 16:
614
- this.pushState("axis_data");
615
- return "X_AXIS";
616
- break;
617
- case 17:
618
- this.pushState("axis_data");
619
- return "Y_AXIS";
620
- break;
621
- case 18:
622
- this.pushState("axis_band_data");
623
- return 24;
624
- break;
625
- case 19:
626
- return 31;
627
- break;
628
- case 20:
629
- this.pushState("data");
630
- return 16;
631
- break;
632
- case 21:
633
- this.pushState("data");
634
- return 18;
635
- break;
636
- case 22:
637
- this.pushState("data_inner");
638
- return 24;
639
- break;
640
- case 23:
641
- return 27;
642
- break;
643
- case 24:
644
- this.popState();
645
- return 26;
646
- break;
647
- case 25:
648
- this.popState();
649
- break;
650
- case 26:
651
- this.pushState("string");
652
- break;
653
- case 27:
654
- this.popState();
655
- break;
656
- case 28:
657
- return "STR";
658
- break;
659
- case 29:
660
- return 24;
661
- break;
662
- case 30:
663
- return 26;
664
- break;
665
- case 31:
666
- return 43;
667
- break;
668
- case 32:
669
- return "COLON";
670
- break;
671
- case 33:
672
- return 44;
673
- break;
674
- case 34:
675
- return 28;
676
- break;
677
- case 35:
678
- return 45;
679
- break;
680
- case 36:
681
- return 46;
682
- break;
683
- case 37:
684
- return 48;
685
- break;
686
- case 38:
687
- return 50;
688
- break;
689
- case 39:
690
- return 47;
691
- break;
692
- case 40:
693
- return 41;
694
- break;
695
- case 41:
696
- return 49;
697
- break;
698
- case 42:
699
- return 42;
700
- break;
701
- case 43:
702
- break;
703
- case 44:
704
- return 35;
705
- break;
706
- case 45:
707
- return 36;
708
- break;
709
- }
710
- }, "anonymous"),
711
- rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\{)/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i],
712
- conditions: { "data_inner": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "data": { "rules": [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 22, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "axis_band_data": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "axis_data": { "rules": [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [], "inclusive": false }, "md_string": { "rules": [], "inclusive": false }, "string": { "rules": [27, 28], "inclusive": false }, "INITIAL": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true } }
713
- };
714
- return lexer2;
715
- }();
716
- parser2.lexer = lexer;
717
- function Parser() {
718
- this.yy = {};
719
- }
720
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(Parser, "Parser");
721
- Parser.prototype = parser2;
722
- parser2.Parser = Parser;
723
- return new Parser();
724
- }();
725
- parser.parser = parser;
726
- var xychart_default = parser;
727
-
728
- // src/diagrams/xychart/chartBuilder/interfaces.ts
729
- function isBarPlot(data) {
730
- return data.type === "bar";
731
- }
732
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(isBarPlot, "isBarPlot");
733
- function isBandAxisData(data) {
734
- return data.type === "band";
735
- }
736
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(isBandAxisData, "isBandAxisData");
737
- function isLinearAxisData(data) {
738
- return data.type === "linear";
739
- }
740
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(isLinearAxisData, "isLinearAxisData");
741
-
742
- // src/diagrams/xychart/chartBuilder/textDimensionCalculator.ts
743
- var TextDimensionCalculatorWithFont = class {
744
- constructor(parentGroup) {
745
- this.parentGroup = parentGroup;
746
- }
747
- static {
748
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "TextDimensionCalculatorWithFont");
749
- }
750
- getMaxDimension(texts, fontSize) {
751
- if (!this.parentGroup) {
752
- return {
753
- width: texts.reduce((acc, cur) => Math.max(cur.length, acc), 0) * fontSize,
754
- height: fontSize
755
- };
756
- }
757
- const dimension = {
758
- width: 0,
759
- height: 0
760
- };
761
- const elem = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", fontSize);
762
- for (const t of texts) {
763
- const bbox = (0,_chunk_U7L4IQIU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .computeDimensionOfText */ .W6)(elem, 1, t);
764
- const width = bbox ? bbox.width : t.length * fontSize;
765
- const height = bbox ? bbox.height : fontSize;
766
- dimension.width = Math.max(dimension.width, width);
767
- dimension.height = Math.max(dimension.height, height);
768
- }
769
- elem.remove();
770
- return dimension;
771
- }
772
- };
773
-
774
- // src/diagrams/xychart/chartBuilder/components/axis/bandAxis.ts
775
-
776
-
777
- // src/diagrams/xychart/chartBuilder/components/axis/baseAxis.ts
778
- var BAR_WIDTH_TO_TICK_WIDTH_RATIO = 0.7;
779
- var MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL = 0.2;
780
- var BaseAxis = class {
781
- constructor(axisConfig, title, textDimensionCalculator, axisThemeConfig) {
782
- this.axisConfig = axisConfig;
783
- this.title = title;
784
- this.textDimensionCalculator = textDimensionCalculator;
785
- this.axisThemeConfig = axisThemeConfig;
786
- this.boundingRect = { x: 0, y: 0, width: 0, height: 0 };
787
- this.axisPosition = "left";
788
- this.showTitle = false;
789
- this.showLabel = false;
790
- this.showTick = false;
791
- this.showAxisLine = false;
792
- this.outerPadding = 0;
793
- this.titleTextHeight = 0;
794
- this.labelTextHeight = 0;
795
- this.range = [0, 10];
796
- this.boundingRect = { x: 0, y: 0, width: 0, height: 0 };
797
- this.axisPosition = "left";
798
- }
799
- static {
800
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BaseAxis");
801
- }
802
- setRange(range) {
803
- this.range = range;
804
- if (this.axisPosition === "left" || this.axisPosition === "right") {
805
- this.boundingRect.height = range[1] - range[0];
806
- } else {
807
- this.boundingRect.width = range[1] - range[0];
808
- }
809
- this.recalculateScale();
810
- }
811
- getRange() {
812
- return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
813
- }
814
- setAxisPosition(axisPosition) {
815
- this.axisPosition = axisPosition;
816
- this.setRange(this.range);
817
- }
818
- getTickDistance() {
819
- const range = this.getRange();
820
- return Math.abs(range[0] - range[1]) / this.getTickValues().length;
821
- }
822
- getAxisOuterPadding() {
823
- return this.outerPadding;
824
- }
825
- getLabelDimension() {
826
- return this.textDimensionCalculator.getMaxDimension(
827
- this.getTickValues().map((tick) => tick.toString()),
828
- this.axisConfig.labelFontSize
829
- );
830
- }
831
- recalculateOuterPaddingToDrawBar() {
832
- if (BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() > this.outerPadding * 2) {
833
- this.outerPadding = Math.floor(BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() / 2);
834
- }
835
- this.recalculateScale();
836
- }
837
- calculateSpaceIfDrawnHorizontally(availableSpace) {
838
- let availableHeight = availableSpace.height;
839
- if (this.axisConfig.showAxisLine && availableHeight > this.axisConfig.axisLineWidth) {
840
- availableHeight -= this.axisConfig.axisLineWidth;
841
- this.showAxisLine = true;
842
- }
843
- if (this.axisConfig.showLabel) {
844
- const spaceRequired = this.getLabelDimension();
845
- const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.width;
846
- this.outerPadding = Math.min(spaceRequired.width / 2, maxPadding);
847
- const heightRequired = spaceRequired.height + this.axisConfig.labelPadding * 2;
848
- this.labelTextHeight = spaceRequired.height;
849
- if (heightRequired <= availableHeight) {
850
- availableHeight -= heightRequired;
851
- this.showLabel = true;
852
- }
853
- }
854
- if (this.axisConfig.showTick && availableHeight >= this.axisConfig.tickLength) {
855
- this.showTick = true;
856
- availableHeight -= this.axisConfig.tickLength;
857
- }
858
- if (this.axisConfig.showTitle && this.title) {
859
- const spaceRequired = this.textDimensionCalculator.getMaxDimension(
860
- [this.title],
861
- this.axisConfig.titleFontSize
862
- );
863
- const heightRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;
864
- this.titleTextHeight = spaceRequired.height;
865
- if (heightRequired <= availableHeight) {
866
- availableHeight -= heightRequired;
867
- this.showTitle = true;
868
- }
869
- }
870
- this.boundingRect.width = availableSpace.width;
871
- this.boundingRect.height = availableSpace.height - availableHeight;
872
- }
873
- calculateSpaceIfDrawnVertical(availableSpace) {
874
- let availableWidth = availableSpace.width;
875
- if (this.axisConfig.showAxisLine && availableWidth > this.axisConfig.axisLineWidth) {
876
- availableWidth -= this.axisConfig.axisLineWidth;
877
- this.showAxisLine = true;
878
- }
879
- if (this.axisConfig.showLabel) {
880
- const spaceRequired = this.getLabelDimension();
881
- const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.height;
882
- this.outerPadding = Math.min(spaceRequired.height / 2, maxPadding);
883
- const widthRequired = spaceRequired.width + this.axisConfig.labelPadding * 2;
884
- if (widthRequired <= availableWidth) {
885
- availableWidth -= widthRequired;
886
- this.showLabel = true;
887
- }
888
- }
889
- if (this.axisConfig.showTick && availableWidth >= this.axisConfig.tickLength) {
890
- this.showTick = true;
891
- availableWidth -= this.axisConfig.tickLength;
892
- }
893
- if (this.axisConfig.showTitle && this.title) {
894
- const spaceRequired = this.textDimensionCalculator.getMaxDimension(
895
- [this.title],
896
- this.axisConfig.titleFontSize
897
- );
898
- const widthRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;
899
- this.titleTextHeight = spaceRequired.height;
900
- if (widthRequired <= availableWidth) {
901
- availableWidth -= widthRequired;
902
- this.showTitle = true;
903
- }
904
- }
905
- this.boundingRect.width = availableSpace.width - availableWidth;
906
- this.boundingRect.height = availableSpace.height;
907
- }
908
- calculateSpace(availableSpace) {
909
- if (this.axisPosition === "left" || this.axisPosition === "right") {
910
- this.calculateSpaceIfDrawnVertical(availableSpace);
911
- } else {
912
- this.calculateSpaceIfDrawnHorizontally(availableSpace);
913
- }
914
- this.recalculateScale();
915
- return {
916
- width: this.boundingRect.width,
917
- height: this.boundingRect.height
918
- };
919
- }
920
- setBoundingBoxXY(point) {
921
- this.boundingRect.x = point.x;
922
- this.boundingRect.y = point.y;
923
- }
924
- getDrawableElementsForLeftAxis() {
925
- const drawableElement = [];
926
- if (this.showAxisLine) {
927
- const x = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
928
- drawableElement.push({
929
- type: "path",
930
- groupTexts: ["left-axis", "axisl-line"],
931
- data: [
932
- {
933
- path: `M ${x},${this.boundingRect.y} L ${x},${this.boundingRect.y + this.boundingRect.height} `,
934
- strokeFill: this.axisThemeConfig.axisLineColor,
935
- strokeWidth: this.axisConfig.axisLineWidth
936
- }
937
- ]
938
- });
939
- }
940
- if (this.showLabel) {
941
- drawableElement.push({
942
- type: "text",
943
- groupTexts: ["left-axis", "label"],
944
- data: this.getTickValues().map((tick) => ({
945
- text: tick.toString(),
946
- x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
947
- y: this.getScaleValue(tick),
948
- fill: this.axisThemeConfig.labelColor,
949
- fontSize: this.axisConfig.labelFontSize,
950
- rotation: 0,
951
- verticalPos: "middle",
952
- horizontalPos: "right"
953
- }))
954
- });
955
- }
956
- if (this.showTick) {
957
- const x = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
958
- drawableElement.push({
959
- type: "path",
960
- groupTexts: ["left-axis", "ticks"],
961
- data: this.getTickValues().map((tick) => ({
962
- path: `M ${x},${this.getScaleValue(tick)} L ${x - this.axisConfig.tickLength},${this.getScaleValue(tick)}`,
963
- strokeFill: this.axisThemeConfig.tickColor,
964
- strokeWidth: this.axisConfig.tickWidth
965
- }))
966
- });
967
- }
968
- if (this.showTitle) {
969
- drawableElement.push({
970
- type: "text",
971
- groupTexts: ["left-axis", "title"],
972
- data: [
973
- {
974
- text: this.title,
975
- x: this.boundingRect.x + this.axisConfig.titlePadding,
976
- y: this.boundingRect.y + this.boundingRect.height / 2,
977
- fill: this.axisThemeConfig.titleColor,
978
- fontSize: this.axisConfig.titleFontSize,
979
- rotation: 270,
980
- verticalPos: "top",
981
- horizontalPos: "center"
982
- }
983
- ]
984
- });
985
- }
986
- return drawableElement;
987
- }
988
- getDrawableElementsForBottomAxis() {
989
- const drawableElement = [];
990
- if (this.showAxisLine) {
991
- const y = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
992
- drawableElement.push({
993
- type: "path",
994
- groupTexts: ["bottom-axis", "axis-line"],
995
- data: [
996
- {
997
- path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`,
998
- strokeFill: this.axisThemeConfig.axisLineColor,
999
- strokeWidth: this.axisConfig.axisLineWidth
1000
- }
1001
- ]
1002
- });
1003
- }
1004
- if (this.showLabel) {
1005
- drawableElement.push({
1006
- type: "text",
1007
- groupTexts: ["bottom-axis", "label"],
1008
- data: this.getTickValues().map((tick) => ({
1009
- text: tick.toString(),
1010
- x: this.getScaleValue(tick),
1011
- y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
1012
- fill: this.axisThemeConfig.labelColor,
1013
- fontSize: this.axisConfig.labelFontSize,
1014
- rotation: 0,
1015
- verticalPos: "top",
1016
- horizontalPos: "center"
1017
- }))
1018
- });
1019
- }
1020
- if (this.showTick) {
1021
- const y = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1022
- drawableElement.push({
1023
- type: "path",
1024
- groupTexts: ["bottom-axis", "ticks"],
1025
- data: this.getTickValues().map((tick) => ({
1026
- path: `M ${this.getScaleValue(tick)},${y} L ${this.getScaleValue(tick)},${y + this.axisConfig.tickLength}`,
1027
- strokeFill: this.axisThemeConfig.tickColor,
1028
- strokeWidth: this.axisConfig.tickWidth
1029
- }))
1030
- });
1031
- }
1032
- if (this.showTitle) {
1033
- drawableElement.push({
1034
- type: "text",
1035
- groupTexts: ["bottom-axis", "title"],
1036
- data: [
1037
- {
1038
- text: this.title,
1039
- x: this.range[0] + (this.range[1] - this.range[0]) / 2,
1040
- y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
1041
- fill: this.axisThemeConfig.titleColor,
1042
- fontSize: this.axisConfig.titleFontSize,
1043
- rotation: 0,
1044
- verticalPos: "top",
1045
- horizontalPos: "center"
1046
- }
1047
- ]
1048
- });
1049
- }
1050
- return drawableElement;
1051
- }
1052
- getDrawableElementsForTopAxis() {
1053
- const drawableElement = [];
1054
- if (this.showAxisLine) {
1055
- const y = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
1056
- drawableElement.push({
1057
- type: "path",
1058
- groupTexts: ["top-axis", "axis-line"],
1059
- data: [
1060
- {
1061
- path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`,
1062
- strokeFill: this.axisThemeConfig.axisLineColor,
1063
- strokeWidth: this.axisConfig.axisLineWidth
1064
- }
1065
- ]
1066
- });
1067
- }
1068
- if (this.showLabel) {
1069
- drawableElement.push({
1070
- type: "text",
1071
- groupTexts: ["top-axis", "label"],
1072
- data: this.getTickValues().map((tick) => ({
1073
- text: tick.toString(),
1074
- x: this.getScaleValue(tick),
1075
- y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
1076
- fill: this.axisThemeConfig.labelColor,
1077
- fontSize: this.axisConfig.labelFontSize,
1078
- rotation: 0,
1079
- verticalPos: "top",
1080
- horizontalPos: "center"
1081
- }))
1082
- });
1083
- }
1084
- if (this.showTick) {
1085
- const y = this.boundingRect.y;
1086
- drawableElement.push({
1087
- type: "path",
1088
- groupTexts: ["top-axis", "ticks"],
1089
- data: this.getTickValues().map((tick) => ({
1090
- path: `M ${this.getScaleValue(tick)},${y + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(tick)},${y + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
1091
- strokeFill: this.axisThemeConfig.tickColor,
1092
- strokeWidth: this.axisConfig.tickWidth
1093
- }))
1094
- });
1095
- }
1096
- if (this.showTitle) {
1097
- drawableElement.push({
1098
- type: "text",
1099
- groupTexts: ["top-axis", "title"],
1100
- data: [
1101
- {
1102
- text: this.title,
1103
- x: this.boundingRect.x + this.boundingRect.width / 2,
1104
- y: this.boundingRect.y + this.axisConfig.titlePadding,
1105
- fill: this.axisThemeConfig.titleColor,
1106
- fontSize: this.axisConfig.titleFontSize,
1107
- rotation: 0,
1108
- verticalPos: "top",
1109
- horizontalPos: "center"
1110
- }
1111
- ]
1112
- });
1113
- }
1114
- return drawableElement;
1115
- }
1116
- getDrawableElements() {
1117
- if (this.axisPosition === "left") {
1118
- return this.getDrawableElementsForLeftAxis();
1119
- }
1120
- if (this.axisPosition === "right") {
1121
- throw Error("Drawing of right axis is not implemented");
1122
- }
1123
- if (this.axisPosition === "bottom") {
1124
- return this.getDrawableElementsForBottomAxis();
1125
- }
1126
- if (this.axisPosition === "top") {
1127
- return this.getDrawableElementsForTopAxis();
1128
- }
1129
- return [];
1130
- }
1131
- };
1132
-
1133
- // src/diagrams/xychart/chartBuilder/components/axis/bandAxis.ts
1134
- var BandAxis = class extends BaseAxis {
1135
- static {
1136
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BandAxis");
1137
- }
1138
- constructor(axisConfig, axisThemeConfig, categories, title, textDimensionCalculator) {
1139
- super(axisConfig, title, textDimensionCalculator, axisThemeConfig);
1140
- this.categories = categories;
1141
- this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange());
1142
- }
1143
- setRange(range) {
1144
- super.setRange(range);
1145
- }
1146
- recalculateScale() {
1147
- this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5);
1148
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
1149
- }
1150
- getTickValues() {
1151
- return this.categories;
1152
- }
1153
- getScaleValue(value) {
1154
- return this.scale(value) ?? this.getRange()[0];
1155
- }
1156
- };
1157
-
1158
- // src/diagrams/xychart/chartBuilder/components/axis/linearAxis.ts
1159
-
1160
- var LinearAxis = class extends BaseAxis {
1161
- static {
1162
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "LinearAxis");
1163
- }
1164
- constructor(axisConfig, axisThemeConfig, domain, title, textDimensionCalculator) {
1165
- super(axisConfig, title, textDimensionCalculator, axisThemeConfig);
1166
- this.domain = domain;
1167
- this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleLinear */ .m4Y)().domain(this.domain).range(this.getRange());
1168
- }
1169
- getTickValues() {
1170
- return this.scale.ticks();
1171
- }
1172
- recalculateScale() {
1173
- const domain = [...this.domain];
1174
- if (this.axisPosition === "left") {
1175
- domain.reverse();
1176
- }
1177
- this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleLinear */ .m4Y)().domain(domain).range(this.getRange());
1178
- }
1179
- getScaleValue(value) {
1180
- return this.scale(value);
1181
- }
1182
- };
1183
-
1184
- // src/diagrams/xychart/chartBuilder/components/axis/index.ts
1185
- function getAxis(data, axisConfig, axisThemeConfig, tmpSVGGroup2) {
1186
- const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2);
1187
- if (isBandAxisData(data)) {
1188
- return new BandAxis(
1189
- axisConfig,
1190
- axisThemeConfig,
1191
- data.categories,
1192
- data.title,
1193
- textDimensionCalculator
1194
- );
1195
- }
1196
- return new LinearAxis(
1197
- axisConfig,
1198
- axisThemeConfig,
1199
- [data.min, data.max],
1200
- data.title,
1201
- textDimensionCalculator
1202
- );
1203
- }
1204
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getAxis, "getAxis");
1205
-
1206
- // src/diagrams/xychart/chartBuilder/components/chartTitle.ts
1207
- var ChartTitle = class {
1208
- constructor(textDimensionCalculator, chartConfig, chartData, chartThemeConfig) {
1209
- this.textDimensionCalculator = textDimensionCalculator;
1210
- this.chartConfig = chartConfig;
1211
- this.chartData = chartData;
1212
- this.chartThemeConfig = chartThemeConfig;
1213
- this.boundingRect = {
1214
- x: 0,
1215
- y: 0,
1216
- width: 0,
1217
- height: 0
1218
- };
1219
- this.showChartTitle = false;
1220
- }
1221
- static {
1222
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "ChartTitle");
1223
- }
1224
- setBoundingBoxXY(point) {
1225
- this.boundingRect.x = point.x;
1226
- this.boundingRect.y = point.y;
1227
- }
1228
- calculateSpace(availableSpace) {
1229
- const titleDimension = this.textDimensionCalculator.getMaxDimension(
1230
- [this.chartData.title],
1231
- this.chartConfig.titleFontSize
1232
- );
1233
- const widthRequired = Math.max(titleDimension.width, availableSpace.width);
1234
- const heightRequired = titleDimension.height + 2 * this.chartConfig.titlePadding;
1235
- if (titleDimension.width <= widthRequired && titleDimension.height <= heightRequired && this.chartConfig.showTitle && this.chartData.title) {
1236
- this.boundingRect.width = widthRequired;
1237
- this.boundingRect.height = heightRequired;
1238
- this.showChartTitle = true;
1239
- }
1240
- return {
1241
- width: this.boundingRect.width,
1242
- height: this.boundingRect.height
1243
- };
1244
- }
1245
- getDrawableElements() {
1246
- const drawableElem = [];
1247
- if (this.showChartTitle) {
1248
- drawableElem.push({
1249
- groupTexts: ["chart-title"],
1250
- type: "text",
1251
- data: [
1252
- {
1253
- fontSize: this.chartConfig.titleFontSize,
1254
- text: this.chartData.title,
1255
- verticalPos: "middle",
1256
- horizontalPos: "center",
1257
- x: this.boundingRect.x + this.boundingRect.width / 2,
1258
- y: this.boundingRect.y + this.boundingRect.height / 2,
1259
- fill: this.chartThemeConfig.titleColor,
1260
- rotation: 0
1261
- }
1262
- ]
1263
- });
1264
- }
1265
- return drawableElem;
1266
- }
1267
- };
1268
- function getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) {
1269
- const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2);
1270
- return new ChartTitle(textDimensionCalculator, chartConfig, chartData, chartThemeConfig);
1271
- }
1272
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartTitleComponent, "getChartTitleComponent");
1273
-
1274
- // src/diagrams/xychart/chartBuilder/components/plot/linePlot.ts
1275
-
1276
- var LinePlot = class {
1277
- constructor(plotData, xAxis, yAxis, orientation, plotIndex2) {
1278
- this.plotData = plotData;
1279
- this.xAxis = xAxis;
1280
- this.yAxis = yAxis;
1281
- this.orientation = orientation;
1282
- this.plotIndex = plotIndex2;
1283
- }
1284
- static {
1285
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "LinePlot");
1286
- }
1287
- getDrawableElement() {
1288
- const finalData = this.plotData.data.map((d) => [
1289
- this.xAxis.getScaleValue(d[0]),
1290
- this.yAxis.getScaleValue(d[1])
1291
- ]);
1292
- let path;
1293
- if (this.orientation === "horizontal") {
1294
- path = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .line */ .n8j)().y((d) => d[0]).x((d) => d[1])(finalData);
1295
- } else {
1296
- path = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .line */ .n8j)().x((d) => d[0]).y((d) => d[1])(finalData);
1297
- }
1298
- if (!path) {
1299
- return [];
1300
- }
1301
- return [
1302
- {
1303
- groupTexts: ["plot", `line-plot-${this.plotIndex}`],
1304
- type: "path",
1305
- data: [
1306
- {
1307
- path,
1308
- strokeFill: this.plotData.strokeFill,
1309
- strokeWidth: this.plotData.strokeWidth
1310
- }
1311
- ]
1312
- }
1313
- ];
1314
- }
1315
- };
1316
-
1317
- // src/diagrams/xychart/chartBuilder/components/plot/barPlot.ts
1318
- var BarPlot = class {
1319
- constructor(barData, boundingRect, xAxis, yAxis, orientation, plotIndex2) {
1320
- this.barData = barData;
1321
- this.boundingRect = boundingRect;
1322
- this.xAxis = xAxis;
1323
- this.yAxis = yAxis;
1324
- this.orientation = orientation;
1325
- this.plotIndex = plotIndex2;
1326
- }
1327
- static {
1328
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BarPlot");
1329
- }
1330
- getDrawableElement() {
1331
- const finalData = this.barData.data.map((d) => [
1332
- this.xAxis.getScaleValue(d[0]),
1333
- this.yAxis.getScaleValue(d[1])
1334
- ]);
1335
- const barPaddingPercent = 0.05;
1336
- const barWidth = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - barPaddingPercent);
1337
- const barWidthHalf = barWidth / 2;
1338
- if (this.orientation === "horizontal") {
1339
- return [
1340
- {
1341
- groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1342
- type: "rect",
1343
- data: finalData.map((data) => ({
1344
- x: this.boundingRect.x,
1345
- y: data[0] - barWidthHalf,
1346
- height: barWidth,
1347
- width: data[1] - this.boundingRect.x,
1348
- fill: this.barData.fill,
1349
- strokeWidth: 0,
1350
- strokeFill: this.barData.fill
1351
- }))
1352
- }
1353
- ];
1354
- }
1355
- return [
1356
- {
1357
- groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1358
- type: "rect",
1359
- data: finalData.map((data) => ({
1360
- x: data[0] - barWidthHalf,
1361
- y: data[1],
1362
- width: barWidth,
1363
- height: this.boundingRect.y + this.boundingRect.height - data[1],
1364
- fill: this.barData.fill,
1365
- strokeWidth: 0,
1366
- strokeFill: this.barData.fill
1367
- }))
1368
- }
1369
- ];
1370
- }
1371
- };
1372
-
1373
- // src/diagrams/xychart/chartBuilder/components/plot/index.ts
1374
- var BasePlot = class {
1375
- constructor(chartConfig, chartData, chartThemeConfig) {
1376
- this.chartConfig = chartConfig;
1377
- this.chartData = chartData;
1378
- this.chartThemeConfig = chartThemeConfig;
1379
- this.boundingRect = {
1380
- x: 0,
1381
- y: 0,
1382
- width: 0,
1383
- height: 0
1384
- };
1385
- }
1386
- static {
1387
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BasePlot");
1388
- }
1389
- setAxes(xAxis, yAxis) {
1390
- this.xAxis = xAxis;
1391
- this.yAxis = yAxis;
1392
- }
1393
- setBoundingBoxXY(point) {
1394
- this.boundingRect.x = point.x;
1395
- this.boundingRect.y = point.y;
1396
- }
1397
- calculateSpace(availableSpace) {
1398
- this.boundingRect.width = availableSpace.width;
1399
- this.boundingRect.height = availableSpace.height;
1400
- return {
1401
- width: this.boundingRect.width,
1402
- height: this.boundingRect.height
1403
- };
1404
- }
1405
- getDrawableElements() {
1406
- if (!(this.xAxis && this.yAxis)) {
1407
- throw Error("Axes must be passed to render Plots");
1408
- }
1409
- const drawableElem = [];
1410
- for (const [i, plot] of this.chartData.plots.entries()) {
1411
- switch (plot.type) {
1412
- case "line":
1413
- {
1414
- const linePlot = new LinePlot(
1415
- plot,
1416
- this.xAxis,
1417
- this.yAxis,
1418
- this.chartConfig.chartOrientation,
1419
- i
1420
- );
1421
- drawableElem.push(...linePlot.getDrawableElement());
1422
- }
1423
- break;
1424
- case "bar":
1425
- {
1426
- const barPlot = new BarPlot(
1427
- plot,
1428
- this.boundingRect,
1429
- this.xAxis,
1430
- this.yAxis,
1431
- this.chartConfig.chartOrientation,
1432
- i
1433
- );
1434
- drawableElem.push(...barPlot.getDrawableElement());
1435
- }
1436
- break;
1437
- }
1438
- }
1439
- return drawableElem;
1440
- }
1441
- };
1442
- function getPlotComponent(chartConfig, chartData, chartThemeConfig) {
1443
- return new BasePlot(chartConfig, chartData, chartThemeConfig);
1444
- }
1445
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getPlotComponent, "getPlotComponent");
1446
-
1447
- // src/diagrams/xychart/chartBuilder/orchestrator.ts
1448
- var Orchestrator = class {
1449
- constructor(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) {
1450
- this.chartConfig = chartConfig;
1451
- this.chartData = chartData;
1452
- this.componentStore = {
1453
- title: getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2),
1454
- plot: getPlotComponent(chartConfig, chartData, chartThemeConfig),
1455
- xAxis: getAxis(
1456
- chartData.xAxis,
1457
- chartConfig.xAxis,
1458
- {
1459
- titleColor: chartThemeConfig.xAxisTitleColor,
1460
- labelColor: chartThemeConfig.xAxisLabelColor,
1461
- tickColor: chartThemeConfig.xAxisTickColor,
1462
- axisLineColor: chartThemeConfig.xAxisLineColor
1463
- },
1464
- tmpSVGGroup2
1465
- ),
1466
- yAxis: getAxis(
1467
- chartData.yAxis,
1468
- chartConfig.yAxis,
1469
- {
1470
- titleColor: chartThemeConfig.yAxisTitleColor,
1471
- labelColor: chartThemeConfig.yAxisLabelColor,
1472
- tickColor: chartThemeConfig.yAxisTickColor,
1473
- axisLineColor: chartThemeConfig.yAxisLineColor
1474
- },
1475
- tmpSVGGroup2
1476
- )
1477
- };
1478
- }
1479
- static {
1480
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "Orchestrator");
1481
- }
1482
- calculateVerticalSpace() {
1483
- let availableWidth = this.chartConfig.width;
1484
- let availableHeight = this.chartConfig.height;
1485
- let plotX = 0;
1486
- let plotY = 0;
1487
- let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100);
1488
- let chartHeight = Math.floor(
1489
- availableHeight * this.chartConfig.plotReservedSpacePercent / 100
1490
- );
1491
- let spaceUsed = this.componentStore.plot.calculateSpace({
1492
- width: chartWidth,
1493
- height: chartHeight
1494
- });
1495
- availableWidth -= spaceUsed.width;
1496
- availableHeight -= spaceUsed.height;
1497
- spaceUsed = this.componentStore.title.calculateSpace({
1498
- width: this.chartConfig.width,
1499
- height: availableHeight
1500
- });
1501
- plotY = spaceUsed.height;
1502
- availableHeight -= spaceUsed.height;
1503
- this.componentStore.xAxis.setAxisPosition("bottom");
1504
- spaceUsed = this.componentStore.xAxis.calculateSpace({
1505
- width: availableWidth,
1506
- height: availableHeight
1507
- });
1508
- availableHeight -= spaceUsed.height;
1509
- this.componentStore.yAxis.setAxisPosition("left");
1510
- spaceUsed = this.componentStore.yAxis.calculateSpace({
1511
- width: availableWidth,
1512
- height: availableHeight
1513
- });
1514
- plotX = spaceUsed.width;
1515
- availableWidth -= spaceUsed.width;
1516
- if (availableWidth > 0) {
1517
- chartWidth += availableWidth;
1518
- availableWidth = 0;
1519
- }
1520
- if (availableHeight > 0) {
1521
- chartHeight += availableHeight;
1522
- availableHeight = 0;
1523
- }
1524
- this.componentStore.plot.calculateSpace({
1525
- width: chartWidth,
1526
- height: chartHeight
1527
- });
1528
- this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });
1529
- this.componentStore.xAxis.setRange([plotX, plotX + chartWidth]);
1530
- this.componentStore.xAxis.setBoundingBoxXY({ x: plotX, y: plotY + chartHeight });
1531
- this.componentStore.yAxis.setRange([plotY, plotY + chartHeight]);
1532
- this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: plotY });
1533
- if (this.chartData.plots.some((p) => isBarPlot(p))) {
1534
- this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1535
- }
1536
- }
1537
- calculateHorizontalSpace() {
1538
- let availableWidth = this.chartConfig.width;
1539
- let availableHeight = this.chartConfig.height;
1540
- let titleYEnd = 0;
1541
- let plotX = 0;
1542
- let plotY = 0;
1543
- let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100);
1544
- let chartHeight = Math.floor(
1545
- availableHeight * this.chartConfig.plotReservedSpacePercent / 100
1546
- );
1547
- let spaceUsed = this.componentStore.plot.calculateSpace({
1548
- width: chartWidth,
1549
- height: chartHeight
1550
- });
1551
- availableWidth -= spaceUsed.width;
1552
- availableHeight -= spaceUsed.height;
1553
- spaceUsed = this.componentStore.title.calculateSpace({
1554
- width: this.chartConfig.width,
1555
- height: availableHeight
1556
- });
1557
- titleYEnd = spaceUsed.height;
1558
- availableHeight -= spaceUsed.height;
1559
- this.componentStore.xAxis.setAxisPosition("left");
1560
- spaceUsed = this.componentStore.xAxis.calculateSpace({
1561
- width: availableWidth,
1562
- height: availableHeight
1563
- });
1564
- availableWidth -= spaceUsed.width;
1565
- plotX = spaceUsed.width;
1566
- this.componentStore.yAxis.setAxisPosition("top");
1567
- spaceUsed = this.componentStore.yAxis.calculateSpace({
1568
- width: availableWidth,
1569
- height: availableHeight
1570
- });
1571
- availableHeight -= spaceUsed.height;
1572
- plotY = titleYEnd + spaceUsed.height;
1573
- if (availableWidth > 0) {
1574
- chartWidth += availableWidth;
1575
- availableWidth = 0;
1576
- }
1577
- if (availableHeight > 0) {
1578
- chartHeight += availableHeight;
1579
- availableHeight = 0;
1580
- }
1581
- this.componentStore.plot.calculateSpace({
1582
- width: chartWidth,
1583
- height: chartHeight
1584
- });
1585
- this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });
1586
- this.componentStore.yAxis.setRange([plotX, plotX + chartWidth]);
1587
- this.componentStore.yAxis.setBoundingBoxXY({ x: plotX, y: titleYEnd });
1588
- this.componentStore.xAxis.setRange([plotY, plotY + chartHeight]);
1589
- this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: plotY });
1590
- if (this.chartData.plots.some((p) => isBarPlot(p))) {
1591
- this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1592
- }
1593
- }
1594
- calculateSpace() {
1595
- if (this.chartConfig.chartOrientation === "horizontal") {
1596
- this.calculateHorizontalSpace();
1597
- } else {
1598
- this.calculateVerticalSpace();
1599
- }
1600
- }
1601
- getDrawableElement() {
1602
- this.calculateSpace();
1603
- const drawableElem = [];
1604
- this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1605
- for (const component of Object.values(this.componentStore)) {
1606
- drawableElem.push(...component.getDrawableElements());
1607
- }
1608
- return drawableElem;
1609
- }
1610
- };
1611
-
1612
- // src/diagrams/xychart/chartBuilder/index.ts
1613
- var XYChartBuilder = class {
1614
- static {
1615
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "XYChartBuilder");
1616
- }
1617
- static build(config, chartData, chartThemeConfig, tmpSVGGroup2) {
1618
- const orchestrator = new Orchestrator(config, chartData, chartThemeConfig, tmpSVGGroup2);
1619
- return orchestrator.getDrawableElement();
1620
- }
1621
- };
1622
-
1623
- // src/diagrams/xychart/xychartDb.ts
1624
- var plotIndex = 0;
1625
- var tmpSVGGroup;
1626
- var xyChartConfig = getChartDefaultConfig();
1627
- var xyChartThemeConfig = getChartDefaultThemeConfig();
1628
- var xyChartData = getChartDefaultData();
1629
- var plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim());
1630
- var hasSetXAxis = false;
1631
- var hasSetYAxis = false;
1632
- function getChartDefaultThemeConfig() {
1633
- const defaultThemeVariables = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getThemeVariables */ .P$)();
1634
- const config = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)();
1635
- return (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)(defaultThemeVariables.xyChart, config.themeVariables.xyChart);
1636
- }
1637
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartDefaultThemeConfig, "getChartDefaultThemeConfig");
1638
- function getChartDefaultConfig() {
1639
- const config = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)();
1640
- return (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)(
1641
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .defaultConfig_default */ .UI.xyChart,
1642
- config.xyChart
1643
- );
1644
- }
1645
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartDefaultConfig, "getChartDefaultConfig");
1646
- function getChartDefaultData() {
1647
- return {
1648
- yAxis: {
1649
- type: "linear",
1650
- title: "",
1651
- min: Infinity,
1652
- max: -Infinity
1653
- },
1654
- xAxis: {
1655
- type: "band",
1656
- title: "",
1657
- categories: []
1658
- },
1659
- title: "",
1660
- plots: []
1661
- };
1662
- }
1663
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartDefaultData, "getChartDefaultData");
1664
- function textSanitizer(text) {
1665
- const config = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)();
1666
- return (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .sanitizeText */ .jZ)(text.trim(), config);
1667
- }
1668
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(textSanitizer, "textSanitizer");
1669
- function setTmpSVGG(SVGG) {
1670
- tmpSVGGroup = SVGG;
1671
- }
1672
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setTmpSVGG, "setTmpSVGG");
1673
- function setOrientation(orientation) {
1674
- if (orientation === "horizontal") {
1675
- xyChartConfig.chartOrientation = "horizontal";
1676
- } else {
1677
- xyChartConfig.chartOrientation = "vertical";
1678
- }
1679
- }
1680
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setOrientation, "setOrientation");
1681
- function setXAxisTitle(title) {
1682
- xyChartData.xAxis.title = textSanitizer(title.text);
1683
- }
1684
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setXAxisTitle, "setXAxisTitle");
1685
- function setXAxisRangeData(min, max) {
1686
- xyChartData.xAxis = { type: "linear", title: xyChartData.xAxis.title, min, max };
1687
- hasSetXAxis = true;
1688
- }
1689
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setXAxisRangeData, "setXAxisRangeData");
1690
- function setXAxisBand(categories) {
1691
- xyChartData.xAxis = {
1692
- type: "band",
1693
- title: xyChartData.xAxis.title,
1694
- categories: categories.map((c) => textSanitizer(c.text))
1695
- };
1696
- hasSetXAxis = true;
1697
- }
1698
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setXAxisBand, "setXAxisBand");
1699
- function setYAxisTitle(title) {
1700
- xyChartData.yAxis.title = textSanitizer(title.text);
1701
- }
1702
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setYAxisTitle, "setYAxisTitle");
1703
- function setYAxisRangeData(min, max) {
1704
- xyChartData.yAxis = { type: "linear", title: xyChartData.yAxis.title, min, max };
1705
- hasSetYAxis = true;
1706
- }
1707
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setYAxisRangeData, "setYAxisRangeData");
1708
- function setYAxisRangeFromPlotData(data) {
1709
- const minValue = Math.min(...data);
1710
- const maxValue = Math.max(...data);
1711
- const prevMinValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.min : Infinity;
1712
- const prevMaxValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.max : -Infinity;
1713
- xyChartData.yAxis = {
1714
- type: "linear",
1715
- title: xyChartData.yAxis.title,
1716
- min: Math.min(prevMinValue, minValue),
1717
- max: Math.max(prevMaxValue, maxValue)
1718
- };
1719
- }
1720
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setYAxisRangeFromPlotData, "setYAxisRangeFromPlotData");
1721
- function transformDataWithoutCategory(data) {
1722
- let retData = [];
1723
- if (data.length === 0) {
1724
- return retData;
1725
- }
1726
- if (!hasSetXAxis) {
1727
- const prevMinValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.min : Infinity;
1728
- const prevMaxValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.max : -Infinity;
1729
- setXAxisRangeData(Math.min(prevMinValue, 1), Math.max(prevMaxValue, data.length));
1730
- }
1731
- if (!hasSetYAxis) {
1732
- setYAxisRangeFromPlotData(data);
1733
- }
1734
- if (isBandAxisData(xyChartData.xAxis)) {
1735
- retData = xyChartData.xAxis.categories.map((c, i) => [c, data[i]]);
1736
- }
1737
- if (isLinearAxisData(xyChartData.xAxis)) {
1738
- const min = xyChartData.xAxis.min;
1739
- const max = xyChartData.xAxis.max;
1740
- const step = (max - min) / (data.length - 1);
1741
- const categories = [];
1742
- for (let i = min; i <= max; i += step) {
1743
- categories.push(`${i}`);
1744
- }
1745
- retData = categories.map((c, i) => [c, data[i]]);
1746
- }
1747
- return retData;
1748
- }
1749
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(transformDataWithoutCategory, "transformDataWithoutCategory");
1750
- function getPlotColorFromPalette(plotIndex2) {
1751
- return plotColorPalette[plotIndex2 === 0 ? 0 : plotIndex2 % plotColorPalette.length];
1752
- }
1753
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getPlotColorFromPalette, "getPlotColorFromPalette");
1754
- function setLineData(title, data) {
1755
- const plotData = transformDataWithoutCategory(data);
1756
- xyChartData.plots.push({
1757
- type: "line",
1758
- strokeFill: getPlotColorFromPalette(plotIndex),
1759
- strokeWidth: 2,
1760
- data: plotData
1761
- });
1762
- plotIndex++;
1763
- }
1764
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setLineData, "setLineData");
1765
- function setBarData(title, data) {
1766
- const plotData = transformDataWithoutCategory(data);
1767
- xyChartData.plots.push({
1768
- type: "bar",
1769
- fill: getPlotColorFromPalette(plotIndex),
1770
- data: plotData
1771
- });
1772
- plotIndex++;
1773
- }
1774
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setBarData, "setBarData");
1775
- function getDrawableElem() {
1776
- if (xyChartData.plots.length === 0) {
1777
- throw Error("No Plot to render, please provide a plot with some data");
1778
- }
1779
- xyChartData.title = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab)();
1780
- return XYChartBuilder.build(xyChartConfig, xyChartData, xyChartThemeConfig, tmpSVGGroup);
1781
- }
1782
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getDrawableElem, "getDrawableElem");
1783
- function getChartThemeConfig() {
1784
- return xyChartThemeConfig;
1785
- }
1786
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartThemeConfig, "getChartThemeConfig");
1787
- function getChartConfig() {
1788
- return xyChartConfig;
1789
- }
1790
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartConfig, "getChartConfig");
1791
- var clear2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
1792
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .clear */ .IU)();
1793
- plotIndex = 0;
1794
- xyChartConfig = getChartDefaultConfig();
1795
- xyChartData = getChartDefaultData();
1796
- xyChartThemeConfig = getChartDefaultThemeConfig();
1797
- plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim());
1798
- hasSetXAxis = false;
1799
- hasSetYAxis = false;
1800
- }, "clear");
1801
- var xychartDb_default = {
1802
- getDrawableElem,
1803
- clear: clear2,
1804
- setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccTitle */ .SV,
1805
- getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccTitle */ .iN,
1806
- setDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setDiagramTitle */ .ke,
1807
- getDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab,
1808
- getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccDescription */ .m7,
1809
- setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccDescription */ .EI,
1810
- setOrientation,
1811
- setXAxisTitle,
1812
- setXAxisRangeData,
1813
- setXAxisBand,
1814
- setYAxisTitle,
1815
- setYAxisRangeData,
1816
- setLineData,
1817
- setBarData,
1818
- setTmpSVGG,
1819
- getChartThemeConfig,
1820
- getChartConfig
1821
- };
1822
-
1823
- // src/diagrams/xychart/xychartRenderer.ts
1824
- var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((txt, id, _version, diagObj) => {
1825
- const db = diagObj.db;
1826
- const themeConfig = db.getChartThemeConfig();
1827
- const chartConfig = db.getChartConfig();
1828
- function getDominantBaseLine(horizontalPos) {
1829
- return horizontalPos === "top" ? "text-before-edge" : "middle";
1830
- }
1831
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getDominantBaseLine, "getDominantBaseLine");
1832
- function getTextAnchor(verticalPos) {
1833
- return verticalPos === "left" ? "start" : verticalPos === "right" ? "end" : "middle";
1834
- }
1835
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getTextAnchor, "getTextAnchor");
1836
- function getTextTransformation(data) {
1837
- return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;
1838
- }
1839
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getTextTransformation, "getTextTransformation");
1840
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.debug("Rendering xychart chart\n" + txt);
1841
- const svg = (0,_chunk_OBAELV6Q_mjs__WEBPACK_IMPORTED_MODULE_2__/* .selectSvgElement */ .D)(id);
1842
- const group = svg.append("g").attr("class", "main");
1843
- const background = group.append("rect").attr("width", chartConfig.width).attr("height", chartConfig.height).attr("class", "background");
1844
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .configureSvgSize */ .a$)(svg, chartConfig.height, chartConfig.width, true);
1845
- svg.attr("viewBox", `0 0 ${chartConfig.width} ${chartConfig.height}`);
1846
- background.attr("fill", themeConfig.backgroundColor);
1847
- db.setTmpSVGG(svg.append("g").attr("class", "mermaid-tmp-group"));
1848
- const shapes = db.getDrawableElem();
1849
- const groups = {};
1850
- function getGroup(gList) {
1851
- let elem = group;
1852
- let prefix = "";
1853
- for (const [i] of gList.entries()) {
1854
- let parent = group;
1855
- if (i > 0 && groups[prefix]) {
1856
- parent = groups[prefix];
1857
- }
1858
- prefix += gList[i];
1859
- elem = groups[prefix];
1860
- if (!elem) {
1861
- elem = groups[prefix] = parent.append("g").attr("class", gList[i]);
1862
- }
1863
- }
1864
- return elem;
1865
- }
1866
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getGroup, "getGroup");
1867
- for (const shape of shapes) {
1868
- if (shape.data.length === 0) {
1869
- continue;
1870
- }
1871
- const shapeGroup = getGroup(shape.groupTexts);
1872
- switch (shape.type) {
1873
- case "rect":
1874
- shapeGroup.selectAll("rect").data(shape.data).enter().append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill).attr("stroke", (data) => data.strokeFill).attr("stroke-width", (data) => data.strokeWidth);
1875
- break;
1876
- case "text":
1877
- shapeGroup.selectAll("text").data(shape.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.verticalPos)).attr("text-anchor", (data) => getTextAnchor(data.horizontalPos)).attr("transform", (data) => getTextTransformation(data)).text((data) => data.text);
1878
- break;
1879
- case "path":
1880
- shapeGroup.selectAll("path").data(shape.data).enter().append("path").attr("d", (data) => data.path).attr("fill", (data) => data.fill ? data.fill : "none").attr("stroke", (data) => data.strokeFill).attr("stroke-width", (data) => data.strokeWidth);
1881
- break;
1882
- }
1883
- }
1884
- }, "draw");
1885
- var xychartRenderer_default = {
1886
- draw
1887
- };
1888
-
1889
- // src/diagrams/xychart/xychartDiagram.ts
1890
- var diagram = {
1891
- parser: xychart_default,
1892
- db: xychartDb_default,
1893
- renderer: xychartRenderer_default
1894
- };
1895
-
1896
-
1897
-
1898
- /***/ })
1899
-
1900
- }]);