@readme/markdown 9.3.0 → 9.3.2

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.
Files changed (122) hide show
  1. package/dist/10.node.js +20064 -19229
  2. package/dist/10.node.js.map +1 -1
  3. package/dist/122.node.js +23 -0
  4. package/dist/122.node.js.map +1 -0
  5. package/dist/{17.node.js → 135.node.js} +109 -110
  6. package/dist/135.node.js.map +1 -0
  7. package/dist/136.node.js +23 -0
  8. package/dist/136.node.js.map +1 -0
  9. package/dist/{52.node.js → 188.node.js} +211 -196
  10. package/dist/188.node.js.map +1 -0
  11. package/dist/214.node.js +1280 -0
  12. package/dist/214.node.js.map +1 -0
  13. package/dist/23.node.js +2563 -0
  14. package/dist/23.node.js.map +1 -0
  15. package/dist/{867.node.js → 311.node.js} +95 -95
  16. package/dist/{867.node.js.map → 311.node.js.map} +1 -1
  17. package/dist/{940.node.js → 339.node.js} +3 -75
  18. package/dist/339.node.js.map +1 -0
  19. package/dist/354.node.js +23 -0
  20. package/dist/354.node.js.map +1 -0
  21. package/dist/359.node.js +2001 -0
  22. package/dist/359.node.js.map +1 -0
  23. package/dist/364.node.js +4435 -0
  24. package/dist/364.node.js.map +1 -0
  25. package/dist/{429.node.js → 371.node.js} +196 -139
  26. package/dist/371.node.js.map +1 -0
  27. package/dist/{687.node.js → 38.node.js} +761 -761
  28. package/dist/38.node.js.map +1 -0
  29. package/dist/391.node.js +522 -0
  30. package/dist/391.node.js.map +1 -0
  31. package/dist/462.node.js +23 -0
  32. package/dist/462.node.js.map +1 -0
  33. package/dist/48.node.js +57 -0
  34. package/dist/48.node.js.map +1 -0
  35. package/dist/486.node.js +16267 -14851
  36. package/dist/486.node.js.map +1 -1
  37. package/dist/537.node.js +59 -0
  38. package/dist/537.node.js.map +1 -0
  39. package/dist/550.node.js +201 -1408
  40. package/dist/550.node.js.map +1 -1
  41. package/dist/{403.node.js → 572.node.js} +118 -118
  42. package/dist/572.node.js.map +1 -0
  43. package/dist/580.node.js +1324 -0
  44. package/dist/580.node.js.map +1 -0
  45. package/dist/{952.node.js → 649.node.js} +39 -39
  46. package/dist/{952.node.js.map → 649.node.js.map} +1 -1
  47. package/dist/740.node.js +23 -0
  48. package/dist/740.node.js.map +1 -0
  49. package/dist/741.node.js +23 -0
  50. package/dist/741.node.js.map +1 -0
  51. package/dist/779.node.js +57 -0
  52. package/dist/779.node.js.map +1 -0
  53. package/dist/805.node.js +1355 -0
  54. package/dist/805.node.js.map +1 -0
  55. package/dist/{246.node.js → 855.node.js} +671 -495
  56. package/dist/855.node.js.map +1 -0
  57. package/dist/{11.node.js → 870.node.js} +70 -63
  58. package/dist/870.node.js.map +1 -0
  59. package/dist/874.node.js +57 -0
  60. package/dist/874.node.js.map +1 -0
  61. package/dist/881.node.js +1344 -720
  62. package/dist/881.node.js.map +1 -1
  63. package/dist/{906.node.js → 890.node.js} +147 -147
  64. package/dist/{906.node.js.map → 890.node.js.map} +1 -1
  65. package/dist/898.node.js +361 -0
  66. package/dist/898.node.js.map +1 -0
  67. package/dist/{551.node.js → 912.node.js} +133 -133
  68. package/dist/{551.node.js.map → 912.node.js.map} +1 -1
  69. package/dist/{745.node.js → 915.node.js} +86 -85
  70. package/dist/915.node.js.map +1 -0
  71. package/dist/982.node.js +1132 -0
  72. package/dist/982.node.js.map +1 -0
  73. package/dist/995.node.js +189 -159
  74. package/dist/995.node.js.map +1 -1
  75. package/dist/lib/plain.d.ts +1 -1
  76. package/dist/main.js +1883 -331
  77. package/dist/main.node.js +1874 -332
  78. package/dist/main.node.js.map +1 -1
  79. package/package.json +1 -2
  80. package/dist/11.node.js.map +0 -1
  81. package/dist/120.node.js +0 -23
  82. package/dist/120.node.js.map +0 -1
  83. package/dist/134.node.js +0 -23
  84. package/dist/134.node.js.map +0 -1
  85. package/dist/150.node.js +0 -1892
  86. package/dist/150.node.js.map +0 -1
  87. package/dist/17.node.js.map +0 -1
  88. package/dist/246.node.js.map +0 -1
  89. package/dist/351.node.js +0 -2404
  90. package/dist/351.node.js.map +0 -1
  91. package/dist/366.node.js +0 -1185
  92. package/dist/366.node.js.map +0 -1
  93. package/dist/403.node.js.map +0 -1
  94. package/dist/429.node.js.map +0 -1
  95. package/dist/485.node.js +0 -518
  96. package/dist/485.node.js.map +0 -1
  97. package/dist/488.node.js +0 -59
  98. package/dist/488.node.js.map +0 -1
  99. package/dist/510.node.js +0 -250
  100. package/dist/510.node.js.map +0 -1
  101. package/dist/52.node.js.map +0 -1
  102. package/dist/617.node.js +0 -23
  103. package/dist/617.node.js.map +0 -1
  104. package/dist/687.node.js.map +0 -1
  105. package/dist/745.node.js.map +0 -1
  106. package/dist/775.node.js +0 -1904
  107. package/dist/775.node.js.map +0 -1
  108. package/dist/788.node.js +0 -1025
  109. package/dist/788.node.js.map +0 -1
  110. package/dist/81.node.js +0 -386
  111. package/dist/81.node.js.map +0 -1
  112. package/dist/849.node.js +0 -2590
  113. package/dist/849.node.js.map +0 -1
  114. package/dist/863.node.js +0 -23
  115. package/dist/863.node.js.map +0 -1
  116. package/dist/885.node.js +0 -52
  117. package/dist/885.node.js.map +0 -1
  118. package/dist/896.node.js +0 -1617
  119. package/dist/896.node.js.map +0 -1
  120. package/dist/91.node.js +0 -23
  121. package/dist/91.node.js.map +0 -1
  122. package/dist/940.node.js.map +0 -1
package/dist/881.node.js CHANGED
@@ -3,83 +3,130 @@ exports.id = 881;
3
3
  exports.ids = [881];
4
4
  exports.modules = {
5
5
 
6
- /***/ 8881:
6
+ /***/ 9881:
7
7
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
8
 
9
9
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
10
  /* harmony export */ diagram: () => (/* binding */ diagram)
11
11
  /* harmony export */ });
12
- /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
13
- /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8066);
14
- /* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5099);
15
- /* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7470);
16
- /* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8750);
12
+ /* harmony import */ var _chunk_C3MQ5ANM_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6499);
13
+ /* harmony import */ var _chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8430);
14
+ /* harmony import */ var _chunk_7B677QYD_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3113);
15
+ /* harmony import */ var _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3804);
16
+ /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8066);
17
17
 
18
18
 
19
- // src/diagrams/timeline/parser/timeline.jison
19
+
20
+
21
+
22
+ // src/diagrams/xychart/parser/xychart.jison
20
23
  var parser = function() {
21
- var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(k, v, o2, l) {
24
+ var o = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(k, v, o2, l) {
22
25
  for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
23
26
  return o2;
24
- }, "o"), $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17];
27
+ }, "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];
25
28
  var parser2 = {
26
- trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function trace() {
29
+ trace: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function trace() {
27
30
  }, "trace"),
28
31
  yy: {},
29
- symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 },
30
- terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" },
31
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]],
32
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
32
+ 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 },
33
+ 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" },
34
+ 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]],
35
+ performAction: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
33
36
  var $0 = $$.length - 1;
34
37
  switch (yystate) {
35
- case 1:
36
- return $$[$0 - 1];
38
+ case 5:
39
+ yy.setOrientation($$[$0]);
37
40
  break;
38
- case 2:
39
- this.$ = [];
41
+ case 9:
42
+ yy.setDiagramTitle($$[$0].text.trim());
40
43
  break;
41
- case 3:
42
- $$[$0 - 1].push($$[$0]);
43
- this.$ = $$[$0 - 1];
44
+ case 12:
45
+ yy.setLineData({ text: "", type: "text" }, $$[$0]);
44
46
  break;
45
- case 4:
46
- case 5:
47
- this.$ = $$[$0];
47
+ case 13:
48
+ yy.setLineData($$[$0 - 1], $$[$0]);
48
49
  break;
49
- case 6:
50
- case 7:
51
- this.$ = [];
50
+ case 14:
51
+ yy.setBarData({ text: "", type: "text" }, $$[$0]);
52
52
  break;
53
- case 8:
54
- yy.getCommonDb().setDiagramTitle($$[$0].substr(6));
55
- this.$ = $$[$0].substr(6);
53
+ case 15:
54
+ yy.setBarData($$[$0 - 1], $$[$0]);
56
55
  break;
57
- case 9:
56
+ case 16:
58
57
  this.$ = $$[$0].trim();
59
- yy.getCommonDb().setAccTitle(this.$);
58
+ yy.setAccTitle(this.$);
60
59
  break;
61
- case 10:
62
- case 11:
60
+ case 17:
61
+ case 18:
63
62
  this.$ = $$[$0].trim();
64
- yy.getCommonDb().setAccDescription(this.$);
63
+ yy.setAccDescription(this.$);
65
64
  break;
66
- case 12:
67
- yy.addSection($$[$0].substr(8));
68
- this.$ = $$[$0].substr(8);
65
+ case 19:
66
+ this.$ = $$[$0 - 1];
69
67
  break;
70
- case 15:
71
- yy.addTask($$[$0], 0, "");
72
- this.$ = $$[$0];
68
+ case 20:
69
+ this.$ = [Number($$[$0 - 2]), ...$$[$0]];
73
70
  break;
74
- case 16:
75
- yy.addEvent($$[$0].substr(2));
71
+ case 21:
72
+ this.$ = [Number($$[$0])];
73
+ break;
74
+ case 22:
75
+ yy.setXAxisTitle($$[$0]);
76
+ break;
77
+ case 23:
78
+ yy.setXAxisTitle($$[$0 - 1]);
79
+ break;
80
+ case 24:
81
+ yy.setXAxisTitle({ type: "text", text: "" });
82
+ break;
83
+ case 25:
84
+ yy.setXAxisBand($$[$0]);
85
+ break;
86
+ case 26:
87
+ yy.setXAxisRangeData(Number($$[$0 - 2]), Number($$[$0]));
88
+ break;
89
+ case 27:
90
+ this.$ = $$[$0 - 1];
91
+ break;
92
+ case 28:
93
+ this.$ = [$$[$0 - 2], ...$$[$0]];
94
+ break;
95
+ case 29:
96
+ this.$ = [$$[$0]];
97
+ break;
98
+ case 30:
99
+ yy.setYAxisTitle($$[$0]);
100
+ break;
101
+ case 31:
102
+ yy.setYAxisTitle($$[$0 - 1]);
103
+ break;
104
+ case 32:
105
+ yy.setYAxisTitle({ type: "text", text: "" });
106
+ break;
107
+ case 33:
108
+ yy.setYAxisRangeData(Number($$[$0 - 2]), Number($$[$0]));
109
+ break;
110
+ case 37:
111
+ this.$ = { text: $$[$0], type: "text" };
112
+ break;
113
+ case 38:
114
+ this.$ = { text: $$[$0], type: "text" };
115
+ break;
116
+ case 39:
117
+ this.$ = { text: $$[$0], type: "markdown" };
118
+ break;
119
+ case 40:
76
120
  this.$ = $$[$0];
77
121
  break;
122
+ case 41:
123
+ this.$ = $$[$0 - 1] + "" + $$[$0];
124
+ break;
78
125
  }
79
126
  }, "anonymous"),
80
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])],
81
- defaultActions: {},
82
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function parseError(str, hash) {
127
+ 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] }],
128
+ defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] },
129
+ parseError: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
83
130
  if (hash.recoverable) {
84
131
  this.trace(str);
85
132
  } else {
@@ -88,7 +135,7 @@ var parser = function() {
88
135
  throw error;
89
136
  }
90
137
  }, "parseError"),
91
- parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function parse(input) {
138
+ parse: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parse(input) {
92
139
  var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
93
140
  var args = lstack.slice.call(arguments, 1);
94
141
  var lexer2 = Object.create(this.lexer);
@@ -117,7 +164,7 @@ var parser = function() {
117
164
  vstack.length = vstack.length - n;
118
165
  lstack.length = lstack.length - n;
119
166
  }
120
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(popStack, "popStack");
167
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(popStack, "popStack");
121
168
  function lex() {
122
169
  var token;
123
170
  token = tstack.pop() || lexer2.lex() || EOF;
@@ -130,7 +177,7 @@ var parser = function() {
130
177
  }
131
178
  return token;
132
179
  }
133
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(lex, "lex");
180
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(lex, "lex");
134
181
  var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
135
182
  while (true) {
136
183
  state = stack[stack.length - 1];
@@ -234,7 +281,7 @@ var parser = function() {
234
281
  var lexer = /* @__PURE__ */ function() {
235
282
  var lexer2 = {
236
283
  EOF: 1,
237
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function parseError(str, hash) {
284
+ parseError: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
238
285
  if (this.yy.parser) {
239
286
  this.yy.parser.parseError(str, hash);
240
287
  } else {
@@ -242,7 +289,7 @@ var parser = function() {
242
289
  }
243
290
  }, "parseError"),
244
291
  // resets the lexer, sets new input
245
- setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(input, yy) {
292
+ setInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(input, yy) {
246
293
  this.yy = yy || this.yy || {};
247
294
  this._input = input;
248
295
  this._more = this._backtrack = this.done = false;
@@ -262,7 +309,7 @@ var parser = function() {
262
309
  return this;
263
310
  }, "setInput"),
264
311
  // consumes and returns one char from the input
265
- input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
312
+ input: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
266
313
  var ch = this._input[0];
267
314
  this.yytext += ch;
268
315
  this.yyleng++;
@@ -283,7 +330,7 @@ var parser = function() {
283
330
  return ch;
284
331
  }, "input"),
285
332
  // unshifts one char (or a string) into the input
286
- unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(ch) {
333
+ unput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(ch) {
287
334
  var len = ch.length;
288
335
  var lines = ch.split(/(?:\r\n?|\n)/g);
289
336
  this._input = ch + this._input;
@@ -309,12 +356,12 @@ var parser = function() {
309
356
  return this;
310
357
  }, "unput"),
311
358
  // When called from action, caches matched text and appends it on next action
312
- more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
359
+ more: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
313
360
  this._more = true;
314
361
  return this;
315
362
  }, "more"),
316
363
  // 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.
317
- reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
364
+ reject: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
318
365
  if (this.options.backtrack_lexer) {
319
366
  this._backtrack = true;
320
367
  } else {
@@ -327,16 +374,16 @@ var parser = function() {
327
374
  return this;
328
375
  }, "reject"),
329
376
  // retain first n characters of the match
330
- less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(n) {
377
+ less: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(n) {
331
378
  this.unput(this.match.slice(n));
332
379
  }, "less"),
333
380
  // displays already matched input, i.e. for error messages
334
- pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
381
+ pastInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
335
382
  var past = this.matched.substr(0, this.matched.length - this.match.length);
336
383
  return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
337
384
  }, "pastInput"),
338
385
  // displays upcoming input, i.e. for error messages
339
- upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
386
+ upcomingInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
340
387
  var next = this.match;
341
388
  if (next.length < 20) {
342
389
  next += this._input.substr(0, 20 - next.length);
@@ -344,13 +391,13 @@ var parser = function() {
344
391
  return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
345
392
  }, "upcomingInput"),
346
393
  // displays the character position where the lexing error occurred, i.e. for error messages
347
- showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
394
+ showPosition: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
348
395
  var pre = this.pastInput();
349
396
  var c = new Array(pre.length + 1).join("-");
350
397
  return pre + this.upcomingInput() + "\n" + c + "^";
351
398
  }, "showPosition"),
352
399
  // test the lexed token: return FALSE when not a match, otherwise return token
353
- test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(match, indexed_rule) {
400
+ test_match: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(match, indexed_rule) {
354
401
  var token, lines, backup;
355
402
  if (this.options.backtrack_lexer) {
356
403
  backup = {
@@ -413,7 +460,7 @@ var parser = function() {
413
460
  return false;
414
461
  }, "test_match"),
415
462
  // return next match in input
416
- next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
463
+ next: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
417
464
  if (this.done) {
418
465
  return this.EOF;
419
466
  }
@@ -464,7 +511,7 @@ var parser = function() {
464
511
  }
465
512
  }, "next"),
466
513
  // return next match that has a token
467
- lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function lex() {
514
+ lex: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function lex() {
468
515
  var r = this.next();
469
516
  if (r) {
470
517
  return r;
@@ -473,11 +520,11 @@ var parser = function() {
473
520
  }
474
521
  }, "lex"),
475
522
  // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
476
- begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function begin(condition) {
523
+ begin: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function begin(condition) {
477
524
  this.conditionStack.push(condition);
478
525
  }, "begin"),
479
526
  // pop the previously active lexer condition state off the condition stack
480
- popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function popState() {
527
+ popState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function popState() {
481
528
  var n = this.conditionStack.length - 1;
482
529
  if (n > 0) {
483
530
  return this.conditionStack.pop();
@@ -486,7 +533,7 @@ var parser = function() {
486
533
  }
487
534
  }, "popState"),
488
535
  // produce the lexer rule set which is active for the currently active lexer condition state
489
- _currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function _currentRules() {
536
+ _currentRules: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function _currentRules() {
490
537
  if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
491
538
  return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
492
539
  } else {
@@ -494,7 +541,7 @@ var parser = function() {
494
541
  }
495
542
  }, "_currentRules"),
496
543
  // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
497
- topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function topState(n) {
544
+ topState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function topState(n) {
498
545
  n = this.conditionStack.length - 1 - Math.abs(n || 0);
499
546
  if (n >= 0) {
500
547
  return this.conditionStack[n];
@@ -503,15 +550,15 @@ var parser = function() {
503
550
  }
504
551
  }, "topState"),
505
552
  // alias for begin(condition)
506
- pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function pushState(condition) {
553
+ pushState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function pushState(condition) {
507
554
  this.begin(condition);
508
555
  }, "pushState"),
509
556
  // return the number of states currently on the stack
510
- stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function stateStackSize() {
557
+ stateStackSize: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function stateStackSize() {
511
558
  return this.conditionStack.length;
512
559
  }, "stateStackSize"),
513
560
  options: { "case-insensitive": true },
514
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
561
+ performAction: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
515
562
  var YYSTATE = YY_START;
516
563
  switch ($avoiding_name_collisions) {
517
564
  case 0:
@@ -519,36 +566,39 @@ var parser = function() {
519
566
  case 1:
520
567
  break;
521
568
  case 2:
522
- return 10;
569
+ this.popState();
570
+ return 34;
523
571
  break;
524
572
  case 3:
573
+ this.popState();
574
+ return 34;
525
575
  break;
526
576
  case 4:
577
+ return 34;
527
578
  break;
528
579
  case 5:
529
- return 4;
530
580
  break;
531
581
  case 6:
532
- return 11;
582
+ return 10;
533
583
  break;
534
584
  case 7:
535
- this.begin("acc_title");
536
- return 12;
585
+ this.pushState("acc_title");
586
+ return 19;
537
587
  break;
538
588
  case 8:
539
589
  this.popState();
540
590
  return "acc_title_value";
541
591
  break;
542
592
  case 9:
543
- this.begin("acc_descr");
544
- return 14;
593
+ this.pushState("acc_descr");
594
+ return 21;
545
595
  break;
546
596
  case 10:
547
597
  this.popState();
548
598
  return "acc_descr_value";
549
599
  break;
550
600
  case 11:
551
- this.begin("acc_descr_multiline");
601
+ this.pushState("acc_descr_multiline");
552
602
  break;
553
603
  case 12:
554
604
  this.popState();
@@ -557,24 +607,111 @@ var parser = function() {
557
607
  return "acc_descr_multiline_value";
558
608
  break;
559
609
  case 14:
560
- return 17;
610
+ return 5;
561
611
  break;
562
612
  case 15:
563
- return 21;
613
+ return 8;
564
614
  break;
565
615
  case 16:
566
- return 20;
616
+ this.pushState("axis_data");
617
+ return "X_AXIS";
567
618
  break;
568
619
  case 17:
569
- return 6;
620
+ this.pushState("axis_data");
621
+ return "Y_AXIS";
570
622
  break;
571
623
  case 18:
572
- return "INVALID";
624
+ this.pushState("axis_band_data");
625
+ return 24;
626
+ break;
627
+ case 19:
628
+ return 31;
629
+ break;
630
+ case 20:
631
+ this.pushState("data");
632
+ return 16;
633
+ break;
634
+ case 21:
635
+ this.pushState("data");
636
+ return 18;
637
+ break;
638
+ case 22:
639
+ this.pushState("data_inner");
640
+ return 24;
641
+ break;
642
+ case 23:
643
+ return 27;
644
+ break;
645
+ case 24:
646
+ this.popState();
647
+ return 26;
648
+ break;
649
+ case 25:
650
+ this.popState();
651
+ break;
652
+ case 26:
653
+ this.pushState("string");
654
+ break;
655
+ case 27:
656
+ this.popState();
657
+ break;
658
+ case 28:
659
+ return "STR";
660
+ break;
661
+ case 29:
662
+ return 24;
663
+ break;
664
+ case 30:
665
+ return 26;
666
+ break;
667
+ case 31:
668
+ return 43;
669
+ break;
670
+ case 32:
671
+ return "COLON";
672
+ break;
673
+ case 33:
674
+ return 44;
675
+ break;
676
+ case 34:
677
+ return 28;
678
+ break;
679
+ case 35:
680
+ return 45;
681
+ break;
682
+ case 36:
683
+ return 46;
684
+ break;
685
+ case 37:
686
+ return 48;
687
+ break;
688
+ case 38:
689
+ return 50;
690
+ break;
691
+ case 39:
692
+ return 47;
693
+ break;
694
+ case 40:
695
+ return 41;
696
+ break;
697
+ case 41:
698
+ return 49;
699
+ break;
700
+ case 42:
701
+ return 42;
702
+ break;
703
+ case 43:
704
+ break;
705
+ case 44:
706
+ return 35;
707
+ break;
708
+ case 45:
709
+ return 36;
573
710
  break;
574
711
  }
575
712
  }, "anonymous"),
576
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^:\n]+)/i, /^(?::\s[^:\n]+)/i, /^(?:[^#:\n]+)/i, /^(?:$)/i, /^(?:.)/i],
577
- conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], "inclusive": true } }
713
+ 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],
714
+ 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 } }
578
715
  };
579
716
  return lexer2;
580
717
  }();
@@ -582,693 +719,1180 @@ var parser = function() {
582
719
  function Parser() {
583
720
  this.yy = {};
584
721
  }
585
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(Parser, "Parser");
722
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(Parser, "Parser");
586
723
  Parser.prototype = parser2;
587
724
  parser2.Parser = Parser;
588
725
  return new Parser();
589
726
  }();
590
727
  parser.parser = parser;
591
- var timeline_default = parser;
728
+ var xychart_default = parser;
592
729
 
593
- // src/diagrams/timeline/timelineDb.js
594
- var timelineDb_exports = {};
595
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__export */ .VA)(timelineDb_exports, {
596
- addEvent: () => addEvent,
597
- addSection: () => addSection,
598
- addTask: () => addTask,
599
- addTaskOrg: () => addTaskOrg,
600
- clear: () => clear2,
601
- default: () => timelineDb_default,
602
- getCommonDb: () => getCommonDb,
603
- getSections: () => getSections,
604
- getTasks: () => getTasks
605
- });
606
- var currentSection = "";
607
- var currentTaskId = 0;
608
- var sections = [];
609
- var tasks = [];
610
- var rawTasks = [];
611
- var getCommonDb = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .commonDb_exports */ .Wt, "getCommonDb");
612
- var clear2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
613
- sections.length = 0;
614
- tasks.length = 0;
615
- currentSection = "";
616
- rawTasks.length = 0;
617
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .clear */ .IU)();
618
- }, "clear");
619
- var addSection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(txt) {
620
- currentSection = txt;
621
- sections.push(txt);
622
- }, "addSection");
623
- var getSections = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
624
- return sections;
625
- }, "getSections");
626
- var getTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
627
- let allItemsProcessed = compileTasks();
628
- const maxDepth = 100;
629
- let iterationCount = 0;
630
- while (!allItemsProcessed && iterationCount < maxDepth) {
631
- allItemsProcessed = compileTasks();
632
- iterationCount++;
633
- }
634
- tasks.push(...rawTasks);
635
- return tasks;
636
- }, "getTasks");
637
- var addTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(period, length, event) {
638
- const rawTask = {
639
- id: currentTaskId++,
640
- section: currentSection,
641
- type: currentSection,
642
- task: period,
643
- score: length ? length : 0,
644
- //if event is defined, then add it the events array
645
- events: event ? [event] : []
646
- };
647
- rawTasks.push(rawTask);
648
- }, "addTask");
649
- var addEvent = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(event) {
650
- const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1);
651
- currentTask.events.push(event);
652
- }, "addEvent");
653
- var addTaskOrg = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(descr) {
654
- const newTask = {
655
- section: currentSection,
656
- type: currentSection,
657
- description: descr,
658
- task: descr,
659
- classes: []
660
- };
661
- tasks.push(newTask);
662
- }, "addTaskOrg");
663
- var compileTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
664
- const compileTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(pos) {
665
- return rawTasks[pos].processed;
666
- }, "compileTask");
667
- let allProcessed = true;
668
- for (const [i, rawTask] of rawTasks.entries()) {
669
- compileTask(i);
670
- allProcessed = allProcessed && rawTask.processed;
671
- }
672
- return allProcessed;
673
- }, "compileTasks");
674
- var timelineDb_default = {
675
- clear: clear2,
676
- getCommonDb,
677
- addSection,
678
- getSections,
679
- getTasks,
680
- addTask,
681
- addTaskOrg,
682
- addEvent
683
- };
730
+ // src/diagrams/xychart/chartBuilder/interfaces.ts
731
+ function isBarPlot(data) {
732
+ return data.type === "bar";
733
+ }
734
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(isBarPlot, "isBarPlot");
735
+ function isBandAxisData(data) {
736
+ return data.type === "band";
737
+ }
738
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(isBandAxisData, "isBandAxisData");
739
+ function isLinearAxisData(data) {
740
+ return data.type === "linear";
741
+ }
742
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(isLinearAxisData, "isLinearAxisData");
684
743
 
685
- // src/diagrams/timeline/timelineRenderer.ts
744
+ // src/diagrams/xychart/chartBuilder/textDimensionCalculator.ts
745
+ var TextDimensionCalculatorWithFont = class {
746
+ constructor(parentGroup) {
747
+ this.parentGroup = parentGroup;
748
+ }
749
+ static {
750
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "TextDimensionCalculatorWithFont");
751
+ }
752
+ getMaxDimension(texts, fontSize) {
753
+ if (!this.parentGroup) {
754
+ return {
755
+ width: texts.reduce((acc, cur) => Math.max(cur.length, acc), 0) * fontSize,
756
+ height: fontSize
757
+ };
758
+ }
759
+ const dimension = {
760
+ width: 0,
761
+ height: 0
762
+ };
763
+ const elem = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", fontSize);
764
+ for (const t of texts) {
765
+ const bbox = (0,_chunk_C3MQ5ANM_mjs__WEBPACK_IMPORTED_MODULE_0__/* .computeDimensionOfText */ .W6)(elem, 1, t);
766
+ const width = bbox ? bbox.width : t.length * fontSize;
767
+ const height = bbox ? bbox.height : fontSize;
768
+ dimension.width = Math.max(dimension.width, width);
769
+ dimension.height = Math.max(dimension.height, height);
770
+ }
771
+ elem.remove();
772
+ return dimension;
773
+ }
774
+ };
686
775
 
776
+ // src/diagrams/xychart/chartBuilder/components/axis/bandAxis.ts
687
777
 
688
- // src/diagrams/timeline/svgDraw.js
689
778
 
690
- var MAX_SECTIONS = 12;
691
- var drawRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, rectData) {
692
- const rectElem = elem.append("rect");
693
- rectElem.attr("x", rectData.x);
694
- rectElem.attr("y", rectData.y);
695
- rectElem.attr("fill", rectData.fill);
696
- rectElem.attr("stroke", rectData.stroke);
697
- rectElem.attr("width", rectData.width);
698
- rectElem.attr("height", rectData.height);
699
- rectElem.attr("rx", rectData.rx);
700
- rectElem.attr("ry", rectData.ry);
701
- if (rectData.class !== void 0) {
702
- rectElem.attr("class", rectData.class);
703
- }
704
- return rectElem;
705
- }, "drawRect");
706
- var drawFace = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(element, faceData) {
707
- const radius = 15;
708
- const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible");
709
- const face = element.append("g");
710
- face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
711
- face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
712
- function smile(face2) {
713
- const arc = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .arc */ .JLW)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
714
- face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
715
- }
716
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(smile, "smile");
717
- function sad(face2) {
718
- const arc = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .arc */ .JLW)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
719
- face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
720
- }
721
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(sad, "sad");
722
- function ambivalent(face2) {
723
- face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
724
- }
725
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(ambivalent, "ambivalent");
726
- if (faceData.score > 3) {
727
- smile(face);
728
- } else if (faceData.score < 3) {
729
- sad(face);
730
- } else {
731
- ambivalent(face);
732
- }
733
- return circleElement;
734
- }, "drawFace");
735
- var drawCircle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(element, circleData) {
736
- const circleElement = element.append("circle");
737
- circleElement.attr("cx", circleData.cx);
738
- circleElement.attr("cy", circleData.cy);
739
- circleElement.attr("class", "actor-" + circleData.pos);
740
- circleElement.attr("fill", circleData.fill);
741
- circleElement.attr("stroke", circleData.stroke);
742
- circleElement.attr("r", circleData.r);
743
- if (circleElement.class !== void 0) {
744
- circleElement.attr("class", circleElement.class);
745
- }
746
- if (circleData.title !== void 0) {
747
- circleElement.append("title").text(circleData.title);
748
- }
749
- return circleElement;
750
- }, "drawCircle");
751
- var drawText = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, textData) {
752
- const nText = textData.text.replace(/<br\s*\/?>/gi, " ");
753
- const textElem = elem.append("text");
754
- textElem.attr("x", textData.x);
755
- textElem.attr("y", textData.y);
756
- textElem.attr("class", "legend");
757
- textElem.style("text-anchor", textData.anchor);
758
- if (textData.class !== void 0) {
759
- textElem.attr("class", textData.class);
760
- }
761
- const span = textElem.append("tspan");
762
- span.attr("x", textData.x + textData.textMargin * 2);
763
- span.text(nText);
764
- return textElem;
765
- }, "drawText");
766
- var drawLabel = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, txtObject) {
767
- function genPoints(x, y, width, height, cut) {
768
- return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
769
- }
770
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(genPoints, "genPoints");
771
- const polygon = elem.append("polygon");
772
- polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
773
- polygon.attr("class", "labelBox");
774
- txtObject.y = txtObject.y + txtObject.labelMargin;
775
- txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
776
- drawText(elem, txtObject);
777
- }, "drawLabel");
778
- var drawSection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, section, conf) {
779
- const g = elem.append("g");
780
- const rect = getNoteRect();
781
- rect.x = section.x;
782
- rect.y = section.y;
783
- rect.fill = section.fill;
784
- rect.width = conf.width;
785
- rect.height = conf.height;
786
- rect.class = "journey-section section-type-" + section.num;
787
- rect.rx = 3;
788
- rect.ry = 3;
789
- drawRect(g, rect);
790
- _drawTextCandidateFunc(conf)(
791
- section.text,
792
- g,
793
- rect.x,
794
- rect.y,
795
- rect.width,
796
- rect.height,
797
- { class: "journey-section section-type-" + section.num },
798
- conf,
799
- section.colour
800
- );
801
- }, "drawSection");
802
- var taskCount = -1;
803
- var drawTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, task, conf) {
804
- const center = task.x + conf.width / 2;
805
- const g = elem.append("g");
806
- taskCount++;
807
- const maxHeight = 300 + 5 * 30;
808
- g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666");
809
- drawFace(g, {
810
- cx: center,
811
- cy: 300 + (5 - task.score) * 30,
812
- score: task.score
813
- });
814
- const rect = getNoteRect();
815
- rect.x = task.x;
816
- rect.y = task.y;
817
- rect.fill = task.fill;
818
- rect.width = conf.width;
819
- rect.height = conf.height;
820
- rect.class = "task task-type-" + task.num;
821
- rect.rx = 3;
822
- rect.ry = 3;
823
- drawRect(g, rect);
824
- _drawTextCandidateFunc(conf)(
825
- task.task,
826
- g,
827
- rect.x,
828
- rect.y,
829
- rect.width,
830
- rect.height,
831
- { class: "task" },
832
- conf,
833
- task.colour
834
- );
835
- }, "drawTask");
836
- var drawBackgroundRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, bounds) {
837
- const rectElem = drawRect(elem, {
838
- x: bounds.startx,
839
- y: bounds.starty,
840
- width: bounds.stopx - bounds.startx,
841
- height: bounds.stopy - bounds.starty,
842
- fill: bounds.fill,
843
- class: "rect"
844
- });
845
- rectElem.lower();
846
- }, "drawBackgroundRect");
847
- var getTextObj = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
848
- return {
849
- x: 0,
850
- y: 0,
851
- fill: void 0,
852
- "text-anchor": "start",
853
- width: 100,
854
- height: 100,
855
- textMargin: 0,
856
- rx: 0,
857
- ry: 0
858
- };
859
- }, "getTextObj");
860
- var getNoteRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function() {
861
- return {
862
- x: 0,
863
- y: 0,
864
- width: 100,
865
- anchor: "start",
866
- height: 100,
867
- rx: 0,
868
- ry: 0
869
- };
870
- }, "getNoteRect");
871
- var _drawTextCandidateFunc = /* @__PURE__ */ function() {
872
- function byText(content, g, x, y, width, height, textAttrs, colour) {
873
- const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content);
874
- _setTextAttrs(text, textAttrs);
875
- }
876
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(byText, "byText");
877
- function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {
878
- const { taskFontSize, taskFontFamily } = conf;
879
- const lines = content.split(/<br\s*\/?>/gi);
880
- for (let i = 0; i < lines.length; i++) {
881
- const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
882
- const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily);
883
- text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
884
- text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
885
- _setTextAttrs(text, textAttrs);
779
+ // src/diagrams/xychart/chartBuilder/components/axis/baseAxis.ts
780
+ var BAR_WIDTH_TO_TICK_WIDTH_RATIO = 0.7;
781
+ var MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL = 0.2;
782
+ var BaseAxis = class {
783
+ constructor(axisConfig, title, textDimensionCalculator, axisThemeConfig) {
784
+ this.axisConfig = axisConfig;
785
+ this.title = title;
786
+ this.textDimensionCalculator = textDimensionCalculator;
787
+ this.axisThemeConfig = axisThemeConfig;
788
+ this.boundingRect = { x: 0, y: 0, width: 0, height: 0 };
789
+ this.axisPosition = "left";
790
+ this.showTitle = false;
791
+ this.showLabel = false;
792
+ this.showTick = false;
793
+ this.showAxisLine = false;
794
+ this.outerPadding = 0;
795
+ this.titleTextHeight = 0;
796
+ this.labelTextHeight = 0;
797
+ this.range = [0, 10];
798
+ this.boundingRect = { x: 0, y: 0, width: 0, height: 0 };
799
+ this.axisPosition = "left";
800
+ }
801
+ static {
802
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BaseAxis");
803
+ }
804
+ setRange(range) {
805
+ this.range = range;
806
+ if (this.axisPosition === "left" || this.axisPosition === "right") {
807
+ this.boundingRect.height = range[1] - range[0];
808
+ } else {
809
+ this.boundingRect.width = range[1] - range[0];
810
+ }
811
+ this.recalculateScale();
812
+ }
813
+ getRange() {
814
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
815
+ }
816
+ setAxisPosition(axisPosition) {
817
+ this.axisPosition = axisPosition;
818
+ this.setRange(this.range);
819
+ }
820
+ getTickDistance() {
821
+ const range = this.getRange();
822
+ return Math.abs(range[0] - range[1]) / this.getTickValues().length;
823
+ }
824
+ getAxisOuterPadding() {
825
+ return this.outerPadding;
826
+ }
827
+ getLabelDimension() {
828
+ return this.textDimensionCalculator.getMaxDimension(
829
+ this.getTickValues().map((tick) => tick.toString()),
830
+ this.axisConfig.labelFontSize
831
+ );
832
+ }
833
+ recalculateOuterPaddingToDrawBar() {
834
+ if (BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() > this.outerPadding * 2) {
835
+ this.outerPadding = Math.floor(BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() / 2);
886
836
  }
837
+ this.recalculateScale();
887
838
  }
888
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(byTspan, "byTspan");
889
- function byFo(content, g, x, y, width, height, textAttrs, conf) {
890
- const body = g.append("switch");
891
- const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
892
- const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
893
- text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
894
- byTspan(content, body, x, y, width, height, textAttrs, conf);
895
- _setTextAttrs(text, textAttrs);
896
- }
897
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(byFo, "byFo");
898
- function _setTextAttrs(toText, fromTextAttrsDict) {
899
- for (const key in fromTextAttrsDict) {
900
- if (key in fromTextAttrsDict) {
901
- toText.attr(key, fromTextAttrsDict[key]);
839
+ calculateSpaceIfDrawnHorizontally(availableSpace) {
840
+ let availableHeight = availableSpace.height;
841
+ if (this.axisConfig.showAxisLine && availableHeight > this.axisConfig.axisLineWidth) {
842
+ availableHeight -= this.axisConfig.axisLineWidth;
843
+ this.showAxisLine = true;
844
+ }
845
+ if (this.axisConfig.showLabel) {
846
+ const spaceRequired = this.getLabelDimension();
847
+ const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.width;
848
+ this.outerPadding = Math.min(spaceRequired.width / 2, maxPadding);
849
+ const heightRequired = spaceRequired.height + this.axisConfig.labelPadding * 2;
850
+ this.labelTextHeight = spaceRequired.height;
851
+ if (heightRequired <= availableHeight) {
852
+ availableHeight -= heightRequired;
853
+ this.showLabel = true;
902
854
  }
903
855
  }
856
+ if (this.axisConfig.showTick && availableHeight >= this.axisConfig.tickLength) {
857
+ this.showTick = true;
858
+ availableHeight -= this.axisConfig.tickLength;
859
+ }
860
+ if (this.axisConfig.showTitle && this.title) {
861
+ const spaceRequired = this.textDimensionCalculator.getMaxDimension(
862
+ [this.title],
863
+ this.axisConfig.titleFontSize
864
+ );
865
+ const heightRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;
866
+ this.titleTextHeight = spaceRequired.height;
867
+ if (heightRequired <= availableHeight) {
868
+ availableHeight -= heightRequired;
869
+ this.showTitle = true;
870
+ }
871
+ }
872
+ this.boundingRect.width = availableSpace.width;
873
+ this.boundingRect.height = availableSpace.height - availableHeight;
904
874
  }
905
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(_setTextAttrs, "_setTextAttrs");
906
- return function(conf) {
907
- return conf.textPlacement === "fo" ? byFo : conf.textPlacement === "old" ? byText : byTspan;
908
- };
909
- }();
910
- var initGraphics = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(graphics) {
911
- graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
912
- }, "initGraphics");
913
- function wrap(text, width) {
914
- text.each(function() {
915
- var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(this), words = text2.text().split(/(\s+|<br>)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em");
916
- for (let j = 0; j < words.length; j++) {
917
- word = words[words.length - 1 - j];
918
- line.push(word);
919
- tspan.text(line.join(" ").trim());
920
- if (tspan.node().getComputedTextLength() > width || word === "<br>") {
921
- line.pop();
922
- tspan.text(line.join(" ").trim());
923
- if (word === "<br>") {
924
- line = [""];
925
- } else {
926
- line = [word];
927
- }
928
- tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word);
875
+ calculateSpaceIfDrawnVertical(availableSpace) {
876
+ let availableWidth = availableSpace.width;
877
+ if (this.axisConfig.showAxisLine && availableWidth > this.axisConfig.axisLineWidth) {
878
+ availableWidth -= this.axisConfig.axisLineWidth;
879
+ this.showAxisLine = true;
880
+ }
881
+ if (this.axisConfig.showLabel) {
882
+ const spaceRequired = this.getLabelDimension();
883
+ const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.height;
884
+ this.outerPadding = Math.min(spaceRequired.height / 2, maxPadding);
885
+ const widthRequired = spaceRequired.width + this.axisConfig.labelPadding * 2;
886
+ if (widthRequired <= availableWidth) {
887
+ availableWidth -= widthRequired;
888
+ this.showLabel = true;
929
889
  }
930
890
  }
931
- });
932
- }
933
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(wrap, "wrap");
934
- var drawNode = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, node, fullSection, conf) {
935
- const section = fullSection % MAX_SECTIONS - 1;
936
- const nodeElem = elem.append("g");
937
- node.section = section;
938
- nodeElem.attr(
939
- "class",
940
- (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section)
941
- );
942
- const bkgElem = nodeElem.append("g");
943
- const textElem = nodeElem.append("g");
944
- const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width);
945
- const bbox = txt.node().getBBox();
946
- const fontSize = conf.fontSize?.replace ? conf.fontSize.replace("px", "") : conf.fontSize;
947
- node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;
948
- node.height = Math.max(node.height, node.maxHeight);
949
- node.width = node.width + 2 * node.padding;
950
- textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")");
951
- defaultBkg(bkgElem, node, section, conf);
952
- return node;
953
- }, "drawNode");
954
- var getVirtualNodeHeight = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, node, conf) {
955
- const textElem = elem.append("g");
956
- const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width);
957
- const bbox = txt.node().getBBox();
958
- const fontSize = conf.fontSize?.replace ? conf.fontSize.replace("px", "") : conf.fontSize;
959
- textElem.remove();
960
- return bbox.height + fontSize * 1.1 * 0.5 + node.padding;
961
- }, "getVirtualNodeHeight");
962
- var defaultBkg = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(elem, node, section) {
963
- const rd = 5;
964
- elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr(
965
- "d",
966
- `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`
967
- );
968
- elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height);
969
- }, "defaultBkg");
970
- var svgDraw_default = {
971
- drawRect,
972
- drawCircle,
973
- drawSection,
974
- drawText,
975
- drawLabel,
976
- drawTask,
977
- drawBackgroundRect,
978
- getTextObj,
979
- getNoteRect,
980
- initGraphics,
981
- drawNode,
982
- getVirtualNodeHeight
891
+ if (this.axisConfig.showTick && availableWidth >= this.axisConfig.tickLength) {
892
+ this.showTick = true;
893
+ availableWidth -= this.axisConfig.tickLength;
894
+ }
895
+ if (this.axisConfig.showTitle && this.title) {
896
+ const spaceRequired = this.textDimensionCalculator.getMaxDimension(
897
+ [this.title],
898
+ this.axisConfig.titleFontSize
899
+ );
900
+ const widthRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;
901
+ this.titleTextHeight = spaceRequired.height;
902
+ if (widthRequired <= availableWidth) {
903
+ availableWidth -= widthRequired;
904
+ this.showTitle = true;
905
+ }
906
+ }
907
+ this.boundingRect.width = availableSpace.width - availableWidth;
908
+ this.boundingRect.height = availableSpace.height;
909
+ }
910
+ calculateSpace(availableSpace) {
911
+ if (this.axisPosition === "left" || this.axisPosition === "right") {
912
+ this.calculateSpaceIfDrawnVertical(availableSpace);
913
+ } else {
914
+ this.calculateSpaceIfDrawnHorizontally(availableSpace);
915
+ }
916
+ this.recalculateScale();
917
+ return {
918
+ width: this.boundingRect.width,
919
+ height: this.boundingRect.height
920
+ };
921
+ }
922
+ setBoundingBoxXY(point) {
923
+ this.boundingRect.x = point.x;
924
+ this.boundingRect.y = point.y;
925
+ }
926
+ getDrawableElementsForLeftAxis() {
927
+ const drawableElement = [];
928
+ if (this.showAxisLine) {
929
+ const x = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
930
+ drawableElement.push({
931
+ type: "path",
932
+ groupTexts: ["left-axis", "axisl-line"],
933
+ data: [
934
+ {
935
+ path: `M ${x},${this.boundingRect.y} L ${x},${this.boundingRect.y + this.boundingRect.height} `,
936
+ strokeFill: this.axisThemeConfig.axisLineColor,
937
+ strokeWidth: this.axisConfig.axisLineWidth
938
+ }
939
+ ]
940
+ });
941
+ }
942
+ if (this.showLabel) {
943
+ drawableElement.push({
944
+ type: "text",
945
+ groupTexts: ["left-axis", "label"],
946
+ data: this.getTickValues().map((tick) => ({
947
+ text: tick.toString(),
948
+ 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),
949
+ y: this.getScaleValue(tick),
950
+ fill: this.axisThemeConfig.labelColor,
951
+ fontSize: this.axisConfig.labelFontSize,
952
+ rotation: 0,
953
+ verticalPos: "middle",
954
+ horizontalPos: "right"
955
+ }))
956
+ });
957
+ }
958
+ if (this.showTick) {
959
+ const x = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
960
+ drawableElement.push({
961
+ type: "path",
962
+ groupTexts: ["left-axis", "ticks"],
963
+ data: this.getTickValues().map((tick) => ({
964
+ path: `M ${x},${this.getScaleValue(tick)} L ${x - this.axisConfig.tickLength},${this.getScaleValue(tick)}`,
965
+ strokeFill: this.axisThemeConfig.tickColor,
966
+ strokeWidth: this.axisConfig.tickWidth
967
+ }))
968
+ });
969
+ }
970
+ if (this.showTitle) {
971
+ drawableElement.push({
972
+ type: "text",
973
+ groupTexts: ["left-axis", "title"],
974
+ data: [
975
+ {
976
+ text: this.title,
977
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
978
+ y: this.boundingRect.y + this.boundingRect.height / 2,
979
+ fill: this.axisThemeConfig.titleColor,
980
+ fontSize: this.axisConfig.titleFontSize,
981
+ rotation: 270,
982
+ verticalPos: "top",
983
+ horizontalPos: "center"
984
+ }
985
+ ]
986
+ });
987
+ }
988
+ return drawableElement;
989
+ }
990
+ getDrawableElementsForBottomAxis() {
991
+ const drawableElement = [];
992
+ if (this.showAxisLine) {
993
+ const y = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
994
+ drawableElement.push({
995
+ type: "path",
996
+ groupTexts: ["bottom-axis", "axis-line"],
997
+ data: [
998
+ {
999
+ path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`,
1000
+ strokeFill: this.axisThemeConfig.axisLineColor,
1001
+ strokeWidth: this.axisConfig.axisLineWidth
1002
+ }
1003
+ ]
1004
+ });
1005
+ }
1006
+ if (this.showLabel) {
1007
+ drawableElement.push({
1008
+ type: "text",
1009
+ groupTexts: ["bottom-axis", "label"],
1010
+ data: this.getTickValues().map((tick) => ({
1011
+ text: tick.toString(),
1012
+ x: this.getScaleValue(tick),
1013
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),
1014
+ fill: this.axisThemeConfig.labelColor,
1015
+ fontSize: this.axisConfig.labelFontSize,
1016
+ rotation: 0,
1017
+ verticalPos: "top",
1018
+ horizontalPos: "center"
1019
+ }))
1020
+ });
1021
+ }
1022
+ if (this.showTick) {
1023
+ const y = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1024
+ drawableElement.push({
1025
+ type: "path",
1026
+ groupTexts: ["bottom-axis", "ticks"],
1027
+ data: this.getTickValues().map((tick) => ({
1028
+ path: `M ${this.getScaleValue(tick)},${y} L ${this.getScaleValue(tick)},${y + this.axisConfig.tickLength}`,
1029
+ strokeFill: this.axisThemeConfig.tickColor,
1030
+ strokeWidth: this.axisConfig.tickWidth
1031
+ }))
1032
+ });
1033
+ }
1034
+ if (this.showTitle) {
1035
+ drawableElement.push({
1036
+ type: "text",
1037
+ groupTexts: ["bottom-axis", "title"],
1038
+ data: [
1039
+ {
1040
+ text: this.title,
1041
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
1042
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
1043
+ fill: this.axisThemeConfig.titleColor,
1044
+ fontSize: this.axisConfig.titleFontSize,
1045
+ rotation: 0,
1046
+ verticalPos: "top",
1047
+ horizontalPos: "center"
1048
+ }
1049
+ ]
1050
+ });
1051
+ }
1052
+ return drawableElement;
1053
+ }
1054
+ getDrawableElementsForTopAxis() {
1055
+ const drawableElement = [];
1056
+ if (this.showAxisLine) {
1057
+ const y = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
1058
+ drawableElement.push({
1059
+ type: "path",
1060
+ groupTexts: ["top-axis", "axis-line"],
1061
+ data: [
1062
+ {
1063
+ path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`,
1064
+ strokeFill: this.axisThemeConfig.axisLineColor,
1065
+ strokeWidth: this.axisConfig.axisLineWidth
1066
+ }
1067
+ ]
1068
+ });
1069
+ }
1070
+ if (this.showLabel) {
1071
+ drawableElement.push({
1072
+ type: "text",
1073
+ groupTexts: ["top-axis", "label"],
1074
+ data: this.getTickValues().map((tick) => ({
1075
+ text: tick.toString(),
1076
+ x: this.getScaleValue(tick),
1077
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
1078
+ fill: this.axisThemeConfig.labelColor,
1079
+ fontSize: this.axisConfig.labelFontSize,
1080
+ rotation: 0,
1081
+ verticalPos: "top",
1082
+ horizontalPos: "center"
1083
+ }))
1084
+ });
1085
+ }
1086
+ if (this.showTick) {
1087
+ const y = this.boundingRect.y;
1088
+ drawableElement.push({
1089
+ type: "path",
1090
+ groupTexts: ["top-axis", "ticks"],
1091
+ data: this.getTickValues().map((tick) => ({
1092
+ 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)}`,
1093
+ strokeFill: this.axisThemeConfig.tickColor,
1094
+ strokeWidth: this.axisConfig.tickWidth
1095
+ }))
1096
+ });
1097
+ }
1098
+ if (this.showTitle) {
1099
+ drawableElement.push({
1100
+ type: "text",
1101
+ groupTexts: ["top-axis", "title"],
1102
+ data: [
1103
+ {
1104
+ text: this.title,
1105
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1106
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
1107
+ fill: this.axisThemeConfig.titleColor,
1108
+ fontSize: this.axisConfig.titleFontSize,
1109
+ rotation: 0,
1110
+ verticalPos: "top",
1111
+ horizontalPos: "center"
1112
+ }
1113
+ ]
1114
+ });
1115
+ }
1116
+ return drawableElement;
1117
+ }
1118
+ getDrawableElements() {
1119
+ if (this.axisPosition === "left") {
1120
+ return this.getDrawableElementsForLeftAxis();
1121
+ }
1122
+ if (this.axisPosition === "right") {
1123
+ throw Error("Drawing of right axis is not implemented");
1124
+ }
1125
+ if (this.axisPosition === "bottom") {
1126
+ return this.getDrawableElementsForBottomAxis();
1127
+ }
1128
+ if (this.axisPosition === "top") {
1129
+ return this.getDrawableElementsForTopAxis();
1130
+ }
1131
+ return [];
1132
+ }
983
1133
  };
984
1134
 
985
- // src/diagrams/timeline/timelineRenderer.ts
986
- var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(text, id, version, diagObj) {
987
- const conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getConfig2 */ .D7)();
988
- const LEFT_MARGIN = conf.leftMargin ?? 50;
989
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("timeline", diagObj.db);
990
- const securityLevel = conf.securityLevel;
991
- let sandboxElement;
992
- if (securityLevel === "sandbox") {
993
- sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id);
994
- }
995
- const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body");
996
- const svg = root.select("#" + id);
997
- svg.append("g");
998
- const tasks2 = diagObj.db.getTasks();
999
- const title = diagObj.db.getCommonDb().getDiagramTitle();
1000
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("task", tasks2);
1001
- svgDraw_default.initGraphics(svg);
1002
- const sections2 = diagObj.db.getSections();
1003
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("sections", sections2);
1004
- let maxSectionHeight = 0;
1005
- let maxTaskHeight = 0;
1006
- let depthY = 0;
1007
- let sectionBeginY = 0;
1008
- let masterX = 50 + LEFT_MARGIN;
1009
- let masterY = 50;
1010
- sectionBeginY = 50;
1011
- let sectionNumber = 0;
1012
- let hasSections = true;
1013
- sections2.forEach(function(section) {
1014
- const sectionNode = {
1015
- number: sectionNumber,
1016
- descr: section,
1017
- section: sectionNumber,
1018
- width: 150,
1019
- padding: 20,
1020
- maxHeight: maxSectionHeight
1021
- };
1022
- const sectionHeight = svgDraw_default.getVirtualNodeHeight(svg, sectionNode, conf);
1023
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("sectionHeight before draw", sectionHeight);
1024
- maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20);
1025
- });
1026
- let maxEventCount = 0;
1027
- let maxEventLineLength = 0;
1028
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("tasks.length", tasks2.length);
1029
- for (const [i, task] of tasks2.entries()) {
1030
- const taskNode = {
1031
- number: i,
1032
- descr: task,
1033
- section: task.section,
1034
- width: 150,
1035
- padding: 20,
1036
- maxHeight: maxTaskHeight
1037
- };
1038
- const taskHeight = svgDraw_default.getVirtualNodeHeight(svg, taskNode, conf);
1039
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("taskHeight before draw", taskHeight);
1040
- maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20);
1041
- maxEventCount = Math.max(maxEventCount, task.events.length);
1042
- let maxEventLineLengthTemp = 0;
1043
- for (const event of task.events) {
1044
- const eventNode = {
1045
- descr: event,
1046
- section: task.section,
1047
- number: task.section,
1048
- width: 150,
1049
- padding: 20,
1050
- maxHeight: 50
1051
- };
1052
- maxEventLineLengthTemp += svgDraw_default.getVirtualNodeHeight(svg, eventNode, conf);
1135
+ // src/diagrams/xychart/chartBuilder/components/axis/bandAxis.ts
1136
+ var BandAxis = class extends BaseAxis {
1137
+ static {
1138
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BandAxis");
1139
+ }
1140
+ constructor(axisConfig, axisThemeConfig, categories, title, textDimensionCalculator) {
1141
+ super(axisConfig, title, textDimensionCalculator, axisThemeConfig);
1142
+ this.categories = categories;
1143
+ this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange());
1144
+ }
1145
+ setRange(range) {
1146
+ super.setRange(range);
1147
+ }
1148
+ recalculateScale() {
1149
+ this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5);
1150
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
1151
+ }
1152
+ getTickValues() {
1153
+ return this.categories;
1154
+ }
1155
+ getScaleValue(value) {
1156
+ return this.scale(value) ?? this.getRange()[0];
1157
+ }
1158
+ };
1159
+
1160
+ // src/diagrams/xychart/chartBuilder/components/axis/linearAxis.ts
1161
+
1162
+ var LinearAxis = class extends BaseAxis {
1163
+ static {
1164
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "LinearAxis");
1165
+ }
1166
+ constructor(axisConfig, axisThemeConfig, domain, title, textDimensionCalculator) {
1167
+ super(axisConfig, title, textDimensionCalculator, axisThemeConfig);
1168
+ this.domain = domain;
1169
+ this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleLinear */ .m4Y)().domain(this.domain).range(this.getRange());
1170
+ }
1171
+ getTickValues() {
1172
+ return this.scale.ticks();
1173
+ }
1174
+ recalculateScale() {
1175
+ const domain = [...this.domain];
1176
+ if (this.axisPosition === "left") {
1177
+ domain.reverse();
1053
1178
  }
1054
- maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp);
1055
- }
1056
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("maxSectionHeight before draw", maxSectionHeight);
1057
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("maxTaskHeight before draw", maxTaskHeight);
1058
- if (sections2 && sections2.length > 0) {
1059
- sections2.forEach((section) => {
1060
- const tasksForSection = tasks2.filter((task) => task.section === section);
1061
- const sectionNode = {
1062
- number: sectionNumber,
1063
- descr: section,
1064
- section: sectionNumber,
1065
- width: 200 * Math.max(tasksForSection.length, 1) - 50,
1066
- padding: 20,
1067
- maxHeight: maxSectionHeight
1068
- };
1069
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("sectionNode", sectionNode);
1070
- const sectionNodeWrapper = svg.append("g");
1071
- const node = svgDraw_default.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf);
1072
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("sectionNode output", node);
1073
- sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`);
1074
- masterY += maxSectionHeight + 50;
1075
- if (tasksForSection.length > 0) {
1076
- drawTasks(
1077
- svg,
1078
- tasksForSection,
1079
- sectionNumber,
1080
- masterX,
1081
- masterY,
1082
- maxTaskHeight,
1083
- conf,
1084
- maxEventCount,
1085
- maxEventLineLength,
1086
- maxSectionHeight,
1087
- false
1088
- );
1089
- }
1090
- masterX += 200 * Math.max(tasksForSection.length, 1);
1091
- masterY = sectionBeginY;
1092
- sectionNumber++;
1093
- });
1094
- } else {
1095
- hasSections = false;
1096
- drawTasks(
1097
- svg,
1098
- tasks2,
1099
- sectionNumber,
1100
- masterX,
1101
- masterY,
1102
- maxTaskHeight,
1103
- conf,
1104
- maxEventCount,
1105
- maxEventLineLength,
1106
- maxSectionHeight,
1107
- true
1179
+ this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .scaleLinear */ .m4Y)().domain(domain).range(this.getRange());
1180
+ }
1181
+ getScaleValue(value) {
1182
+ return this.scale(value);
1183
+ }
1184
+ };
1185
+
1186
+ // src/diagrams/xychart/chartBuilder/components/axis/index.ts
1187
+ function getAxis(data, axisConfig, axisThemeConfig, tmpSVGGroup2) {
1188
+ const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2);
1189
+ if (isBandAxisData(data)) {
1190
+ return new BandAxis(
1191
+ axisConfig,
1192
+ axisThemeConfig,
1193
+ data.categories,
1194
+ data.title,
1195
+ textDimensionCalculator
1108
1196
  );
1109
1197
  }
1110
- const box = svg.node().getBBox();
1111
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("bounds", box);
1112
- if (title) {
1113
- svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20);
1114
- }
1115
- depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100;
1116
- const lineWrapper = svg.append("g").attr("class", "lineWrapper");
1117
- lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
1118
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .setupGraphViewbox */ .ot)(
1119
- void 0,
1120
- svg,
1121
- conf.timeline?.padding ?? 50,
1122
- conf.timeline?.useMaxWidth ?? false
1198
+ return new LinearAxis(
1199
+ axisConfig,
1200
+ axisThemeConfig,
1201
+ [data.min, data.max],
1202
+ data.title,
1203
+ textDimensionCalculator
1123
1204
  );
1124
- }, "draw");
1125
- var drawTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) {
1126
- for (const task of tasks2) {
1127
- const taskNode = {
1128
- descr: task.task,
1129
- section: sectionColor,
1130
- number: sectionColor,
1131
- width: 150,
1132
- padding: 20,
1133
- maxHeight: maxTaskHeight
1205
+ }
1206
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getAxis, "getAxis");
1207
+
1208
+ // src/diagrams/xychart/chartBuilder/components/chartTitle.ts
1209
+ var ChartTitle = class {
1210
+ constructor(textDimensionCalculator, chartConfig, chartData, chartThemeConfig) {
1211
+ this.textDimensionCalculator = textDimensionCalculator;
1212
+ this.chartConfig = chartConfig;
1213
+ this.chartData = chartData;
1214
+ this.chartThemeConfig = chartThemeConfig;
1215
+ this.boundingRect = {
1216
+ x: 0,
1217
+ y: 0,
1218
+ width: 0,
1219
+ height: 0
1134
1220
  };
1135
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("taskNode", taskNode);
1136
- const taskWrapper = diagram2.append("g").attr("class", "taskWrapper");
1137
- const node = svgDraw_default.drawNode(taskWrapper, taskNode, sectionColor, conf);
1138
- const taskHeight = node.height;
1139
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("taskHeight after draw", taskHeight);
1140
- taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`);
1141
- maxTaskHeight = Math.max(maxTaskHeight, taskHeight);
1142
- if (task.events) {
1143
- const lineWrapper = diagram2.append("g").attr("class", "lineWrapper");
1144
- let lineLength = maxTaskHeight;
1145
- masterY += 100;
1146
- lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf);
1147
- masterY -= 100;
1148
- lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr(
1149
- "y2",
1150
- masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120
1151
- ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
1221
+ this.showChartTitle = false;
1222
+ }
1223
+ static {
1224
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "ChartTitle");
1225
+ }
1226
+ setBoundingBoxXY(point) {
1227
+ this.boundingRect.x = point.x;
1228
+ this.boundingRect.y = point.y;
1229
+ }
1230
+ calculateSpace(availableSpace) {
1231
+ const titleDimension = this.textDimensionCalculator.getMaxDimension(
1232
+ [this.chartData.title],
1233
+ this.chartConfig.titleFontSize
1234
+ );
1235
+ const widthRequired = Math.max(titleDimension.width, availableSpace.width);
1236
+ const heightRequired = titleDimension.height + 2 * this.chartConfig.titlePadding;
1237
+ if (titleDimension.width <= widthRequired && titleDimension.height <= heightRequired && this.chartConfig.showTitle && this.chartData.title) {
1238
+ this.boundingRect.width = widthRequired;
1239
+ this.boundingRect.height = heightRequired;
1240
+ this.showChartTitle = true;
1152
1241
  }
1153
- masterX = masterX + 200;
1154
- if (isWithoutSections && !conf.timeline?.disableMulticolor) {
1155
- sectionColor++;
1242
+ return {
1243
+ width: this.boundingRect.width,
1244
+ height: this.boundingRect.height
1245
+ };
1246
+ }
1247
+ getDrawableElements() {
1248
+ const drawableElem = [];
1249
+ if (this.showChartTitle) {
1250
+ drawableElem.push({
1251
+ groupTexts: ["chart-title"],
1252
+ type: "text",
1253
+ data: [
1254
+ {
1255
+ fontSize: this.chartConfig.titleFontSize,
1256
+ text: this.chartData.title,
1257
+ verticalPos: "middle",
1258
+ horizontalPos: "center",
1259
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1260
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1261
+ fill: this.chartThemeConfig.titleColor,
1262
+ rotation: 0
1263
+ }
1264
+ ]
1265
+ });
1156
1266
  }
1267
+ return drawableElem;
1157
1268
  }
1158
- masterY = masterY - 10;
1159
- }, "drawTasks");
1160
- var drawEvents = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(function(diagram2, events, sectionColor, masterX, masterY, conf) {
1161
- let maxEventHeight = 0;
1162
- const eventBeginY = masterY;
1163
- masterY = masterY + 100;
1164
- for (const event of events) {
1165
- const eventNode = {
1166
- descr: event,
1167
- section: sectionColor,
1168
- number: sectionColor,
1169
- width: 150,
1170
- padding: 20,
1171
- maxHeight: 50
1172
- };
1173
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug("eventNode", eventNode);
1174
- const eventWrapper = diagram2.append("g").attr("class", "eventWrapper");
1175
- const node = svgDraw_default.drawNode(eventWrapper, eventNode, sectionColor, conf);
1176
- const eventHeight = node.height;
1177
- maxEventHeight = maxEventHeight + eventHeight;
1178
- eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`);
1179
- masterY = masterY + 10 + eventHeight;
1180
- }
1181
- masterY = eventBeginY;
1182
- return maxEventHeight;
1183
- }, "drawEvents");
1184
- var timelineRenderer_default = {
1185
- setConf: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
1186
- }, "setConf"),
1187
- draw
1188
1269
  };
1270
+ function getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) {
1271
+ const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2);
1272
+ return new ChartTitle(textDimensionCalculator, chartConfig, chartData, chartThemeConfig);
1273
+ }
1274
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartTitleComponent, "getChartTitleComponent");
1189
1275
 
1190
- // src/diagrams/timeline/styles.js
1276
+ // src/diagrams/xychart/chartBuilder/components/plot/linePlot.ts
1191
1277
 
1192
- var genSections = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((options) => {
1193
- let sections2 = "";
1194
- for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1195
- options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
1196
- if ((0,khroma__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(options["lineColor" + i])) {
1197
- options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(options["lineColor" + i], 20);
1278
+ var LinePlot = class {
1279
+ constructor(plotData, xAxis, yAxis, orientation, plotIndex2) {
1280
+ this.plotData = plotData;
1281
+ this.xAxis = xAxis;
1282
+ this.yAxis = yAxis;
1283
+ this.orientation = orientation;
1284
+ this.plotIndex = plotIndex2;
1285
+ }
1286
+ static {
1287
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "LinePlot");
1288
+ }
1289
+ getDrawableElement() {
1290
+ const finalData = this.plotData.data.map((d) => [
1291
+ this.xAxis.getScaleValue(d[0]),
1292
+ this.yAxis.getScaleValue(d[1])
1293
+ ]);
1294
+ let path;
1295
+ if (this.orientation === "horizontal") {
1296
+ path = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .line */ .n8j)().y((d) => d[0]).x((d) => d[1])(finalData);
1198
1297
  } else {
1199
- options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(options["lineColor" + i], 20);
1298
+ path = (0,d3__WEBPACK_IMPORTED_MODULE_4__/* .line */ .n8j)().x((d) => d[0]).y((d) => d[1])(finalData);
1200
1299
  }
1300
+ if (!path) {
1301
+ return [];
1302
+ }
1303
+ return [
1304
+ {
1305
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
1306
+ type: "path",
1307
+ data: [
1308
+ {
1309
+ path,
1310
+ strokeFill: this.plotData.strokeFill,
1311
+ strokeWidth: this.plotData.strokeWidth
1312
+ }
1313
+ ]
1314
+ }
1315
+ ];
1316
+ }
1317
+ };
1318
+
1319
+ // src/diagrams/xychart/chartBuilder/components/plot/barPlot.ts
1320
+ var BarPlot = class {
1321
+ constructor(barData, boundingRect, xAxis, yAxis, orientation, plotIndex2) {
1322
+ this.barData = barData;
1323
+ this.boundingRect = boundingRect;
1324
+ this.xAxis = xAxis;
1325
+ this.yAxis = yAxis;
1326
+ this.orientation = orientation;
1327
+ this.plotIndex = plotIndex2;
1328
+ }
1329
+ static {
1330
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BarPlot");
1331
+ }
1332
+ getDrawableElement() {
1333
+ const finalData = this.barData.data.map((d) => [
1334
+ this.xAxis.getScaleValue(d[0]),
1335
+ this.yAxis.getScaleValue(d[1])
1336
+ ]);
1337
+ const barPaddingPercent = 0.05;
1338
+ const barWidth = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - barPaddingPercent);
1339
+ const barWidthHalf = barWidth / 2;
1340
+ if (this.orientation === "horizontal") {
1341
+ return [
1342
+ {
1343
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1344
+ type: "rect",
1345
+ data: finalData.map((data) => ({
1346
+ x: this.boundingRect.x,
1347
+ y: data[0] - barWidthHalf,
1348
+ height: barWidth,
1349
+ width: data[1] - this.boundingRect.x,
1350
+ fill: this.barData.fill,
1351
+ strokeWidth: 0,
1352
+ strokeFill: this.barData.fill
1353
+ }))
1354
+ }
1355
+ ];
1356
+ }
1357
+ return [
1358
+ {
1359
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1360
+ type: "rect",
1361
+ data: finalData.map((data) => ({
1362
+ x: data[0] - barWidthHalf,
1363
+ y: data[1],
1364
+ width: barWidth,
1365
+ height: this.boundingRect.y + this.boundingRect.height - data[1],
1366
+ fill: this.barData.fill,
1367
+ strokeWidth: 0,
1368
+ strokeFill: this.barData.fill
1369
+ }))
1370
+ }
1371
+ ];
1372
+ }
1373
+ };
1374
+
1375
+ // src/diagrams/xychart/chartBuilder/components/plot/index.ts
1376
+ var BasePlot = class {
1377
+ constructor(chartConfig, chartData, chartThemeConfig) {
1378
+ this.chartConfig = chartConfig;
1379
+ this.chartData = chartData;
1380
+ this.chartThemeConfig = chartThemeConfig;
1381
+ this.boundingRect = {
1382
+ x: 0,
1383
+ y: 0,
1384
+ width: 0,
1385
+ height: 0
1386
+ };
1387
+ }
1388
+ static {
1389
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "BasePlot");
1390
+ }
1391
+ setAxes(xAxis, yAxis) {
1392
+ this.xAxis = xAxis;
1393
+ this.yAxis = yAxis;
1394
+ }
1395
+ setBoundingBoxXY(point) {
1396
+ this.boundingRect.x = point.x;
1397
+ this.boundingRect.y = point.y;
1398
+ }
1399
+ calculateSpace(availableSpace) {
1400
+ this.boundingRect.width = availableSpace.width;
1401
+ this.boundingRect.height = availableSpace.height;
1402
+ return {
1403
+ width: this.boundingRect.width,
1404
+ height: this.boundingRect.height
1405
+ };
1406
+ }
1407
+ getDrawableElements() {
1408
+ if (!(this.xAxis && this.yAxis)) {
1409
+ throw Error("Axes must be passed to render Plots");
1410
+ }
1411
+ const drawableElem = [];
1412
+ for (const [i, plot] of this.chartData.plots.entries()) {
1413
+ switch (plot.type) {
1414
+ case "line":
1415
+ {
1416
+ const linePlot = new LinePlot(
1417
+ plot,
1418
+ this.xAxis,
1419
+ this.yAxis,
1420
+ this.chartConfig.chartOrientation,
1421
+ i
1422
+ );
1423
+ drawableElem.push(...linePlot.getDrawableElement());
1424
+ }
1425
+ break;
1426
+ case "bar":
1427
+ {
1428
+ const barPlot = new BarPlot(
1429
+ plot,
1430
+ this.boundingRect,
1431
+ this.xAxis,
1432
+ this.yAxis,
1433
+ this.chartConfig.chartOrientation,
1434
+ i
1435
+ );
1436
+ drawableElem.push(...barPlot.getDrawableElement());
1437
+ }
1438
+ break;
1439
+ }
1440
+ }
1441
+ return drawableElem;
1442
+ }
1443
+ };
1444
+ function getPlotComponent(chartConfig, chartData, chartThemeConfig) {
1445
+ return new BasePlot(chartConfig, chartData, chartThemeConfig);
1446
+ }
1447
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getPlotComponent, "getPlotComponent");
1448
+
1449
+ // src/diagrams/xychart/chartBuilder/orchestrator.ts
1450
+ var Orchestrator = class {
1451
+ constructor(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) {
1452
+ this.chartConfig = chartConfig;
1453
+ this.chartData = chartData;
1454
+ this.componentStore = {
1455
+ title: getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2),
1456
+ plot: getPlotComponent(chartConfig, chartData, chartThemeConfig),
1457
+ xAxis: getAxis(
1458
+ chartData.xAxis,
1459
+ chartConfig.xAxis,
1460
+ {
1461
+ titleColor: chartThemeConfig.xAxisTitleColor,
1462
+ labelColor: chartThemeConfig.xAxisLabelColor,
1463
+ tickColor: chartThemeConfig.xAxisTickColor,
1464
+ axisLineColor: chartThemeConfig.xAxisLineColor
1465
+ },
1466
+ tmpSVGGroup2
1467
+ ),
1468
+ yAxis: getAxis(
1469
+ chartData.yAxis,
1470
+ chartConfig.yAxis,
1471
+ {
1472
+ titleColor: chartThemeConfig.yAxisTitleColor,
1473
+ labelColor: chartThemeConfig.yAxisLabelColor,
1474
+ tickColor: chartThemeConfig.yAxisTickColor,
1475
+ axisLineColor: chartThemeConfig.yAxisLineColor
1476
+ },
1477
+ tmpSVGGroup2
1478
+ )
1479
+ };
1480
+ }
1481
+ static {
1482
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "Orchestrator");
1201
1483
  }
1202
- for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1203
- const sw = "" + (17 - 3 * i);
1204
- sections2 += `
1205
- .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path {
1206
- fill: ${options["cScale" + i]};
1484
+ calculateVerticalSpace() {
1485
+ let availableWidth = this.chartConfig.width;
1486
+ let availableHeight = this.chartConfig.height;
1487
+ let plotX = 0;
1488
+ let plotY = 0;
1489
+ let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100);
1490
+ let chartHeight = Math.floor(
1491
+ availableHeight * this.chartConfig.plotReservedSpacePercent / 100
1492
+ );
1493
+ let spaceUsed = this.componentStore.plot.calculateSpace({
1494
+ width: chartWidth,
1495
+ height: chartHeight
1496
+ });
1497
+ availableWidth -= spaceUsed.width;
1498
+ availableHeight -= spaceUsed.height;
1499
+ spaceUsed = this.componentStore.title.calculateSpace({
1500
+ width: this.chartConfig.width,
1501
+ height: availableHeight
1502
+ });
1503
+ plotY = spaceUsed.height;
1504
+ availableHeight -= spaceUsed.height;
1505
+ this.componentStore.xAxis.setAxisPosition("bottom");
1506
+ spaceUsed = this.componentStore.xAxis.calculateSpace({
1507
+ width: availableWidth,
1508
+ height: availableHeight
1509
+ });
1510
+ availableHeight -= spaceUsed.height;
1511
+ this.componentStore.yAxis.setAxisPosition("left");
1512
+ spaceUsed = this.componentStore.yAxis.calculateSpace({
1513
+ width: availableWidth,
1514
+ height: availableHeight
1515
+ });
1516
+ plotX = spaceUsed.width;
1517
+ availableWidth -= spaceUsed.width;
1518
+ if (availableWidth > 0) {
1519
+ chartWidth += availableWidth;
1520
+ availableWidth = 0;
1207
1521
  }
1208
- .section-${i - 1} text {
1209
- fill: ${options["cScaleLabel" + i]};
1522
+ if (availableHeight > 0) {
1523
+ chartHeight += availableHeight;
1524
+ availableHeight = 0;
1210
1525
  }
1211
- .node-icon-${i - 1} {
1212
- font-size: 40px;
1213
- color: ${options["cScaleLabel" + i]};
1526
+ this.componentStore.plot.calculateSpace({
1527
+ width: chartWidth,
1528
+ height: chartHeight
1529
+ });
1530
+ this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });
1531
+ this.componentStore.xAxis.setRange([plotX, plotX + chartWidth]);
1532
+ this.componentStore.xAxis.setBoundingBoxXY({ x: plotX, y: plotY + chartHeight });
1533
+ this.componentStore.yAxis.setRange([plotY, plotY + chartHeight]);
1534
+ this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: plotY });
1535
+ if (this.chartData.plots.some((p) => isBarPlot(p))) {
1536
+ this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1214
1537
  }
1215
- .section-edge-${i - 1}{
1216
- stroke: ${options["cScale" + i]};
1538
+ }
1539
+ calculateHorizontalSpace() {
1540
+ let availableWidth = this.chartConfig.width;
1541
+ let availableHeight = this.chartConfig.height;
1542
+ let titleYEnd = 0;
1543
+ let plotX = 0;
1544
+ let plotY = 0;
1545
+ let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100);
1546
+ let chartHeight = Math.floor(
1547
+ availableHeight * this.chartConfig.plotReservedSpacePercent / 100
1548
+ );
1549
+ let spaceUsed = this.componentStore.plot.calculateSpace({
1550
+ width: chartWidth,
1551
+ height: chartHeight
1552
+ });
1553
+ availableWidth -= spaceUsed.width;
1554
+ availableHeight -= spaceUsed.height;
1555
+ spaceUsed = this.componentStore.title.calculateSpace({
1556
+ width: this.chartConfig.width,
1557
+ height: availableHeight
1558
+ });
1559
+ titleYEnd = spaceUsed.height;
1560
+ availableHeight -= spaceUsed.height;
1561
+ this.componentStore.xAxis.setAxisPosition("left");
1562
+ spaceUsed = this.componentStore.xAxis.calculateSpace({
1563
+ width: availableWidth,
1564
+ height: availableHeight
1565
+ });
1566
+ availableWidth -= spaceUsed.width;
1567
+ plotX = spaceUsed.width;
1568
+ this.componentStore.yAxis.setAxisPosition("top");
1569
+ spaceUsed = this.componentStore.yAxis.calculateSpace({
1570
+ width: availableWidth,
1571
+ height: availableHeight
1572
+ });
1573
+ availableHeight -= spaceUsed.height;
1574
+ plotY = titleYEnd + spaceUsed.height;
1575
+ if (availableWidth > 0) {
1576
+ chartWidth += availableWidth;
1577
+ availableWidth = 0;
1217
1578
  }
1218
- .edge-depth-${i - 1}{
1219
- stroke-width: ${sw};
1579
+ if (availableHeight > 0) {
1580
+ chartHeight += availableHeight;
1581
+ availableHeight = 0;
1220
1582
  }
1221
- .section-${i - 1} line {
1222
- stroke: ${options["cScaleInv" + i]} ;
1223
- stroke-width: 3;
1583
+ this.componentStore.plot.calculateSpace({
1584
+ width: chartWidth,
1585
+ height: chartHeight
1586
+ });
1587
+ this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });
1588
+ this.componentStore.yAxis.setRange([plotX, plotX + chartWidth]);
1589
+ this.componentStore.yAxis.setBoundingBoxXY({ x: plotX, y: titleYEnd });
1590
+ this.componentStore.xAxis.setRange([plotY, plotY + chartHeight]);
1591
+ this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: plotY });
1592
+ if (this.chartData.plots.some((p) => isBarPlot(p))) {
1593
+ this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1224
1594
  }
1225
-
1226
- .lineWrapper line{
1227
- stroke: ${options["cScaleLabel" + i]} ;
1595
+ }
1596
+ calculateSpace() {
1597
+ if (this.chartConfig.chartOrientation === "horizontal") {
1598
+ this.calculateHorizontalSpace();
1599
+ } else {
1600
+ this.calculateVerticalSpace();
1228
1601
  }
1229
-
1230
- .disabled, .disabled circle, .disabled text {
1231
- fill: lightgray;
1602
+ }
1603
+ getDrawableElement() {
1604
+ this.calculateSpace();
1605
+ const drawableElem = [];
1606
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1607
+ for (const component of Object.values(this.componentStore)) {
1608
+ drawableElem.push(...component.getDrawableElements());
1232
1609
  }
1233
- .disabled text {
1234
- fill: #efefef;
1610
+ return drawableElem;
1611
+ }
1612
+ };
1613
+
1614
+ // src/diagrams/xychart/chartBuilder/index.ts
1615
+ var XYChartBuilder = class {
1616
+ static {
1617
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(this, "XYChartBuilder");
1618
+ }
1619
+ static build(config, chartData, chartThemeConfig, tmpSVGGroup2) {
1620
+ const orchestrator = new Orchestrator(config, chartData, chartThemeConfig, tmpSVGGroup2);
1621
+ return orchestrator.getDrawableElement();
1622
+ }
1623
+ };
1624
+
1625
+ // src/diagrams/xychart/xychartDb.ts
1626
+ var plotIndex = 0;
1627
+ var tmpSVGGroup;
1628
+ var xyChartConfig = getChartDefaultConfig();
1629
+ var xyChartThemeConfig = getChartDefaultThemeConfig();
1630
+ var xyChartData = getChartDefaultData();
1631
+ var plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim());
1632
+ var hasSetXAxis = false;
1633
+ var hasSetYAxis = false;
1634
+ function getChartDefaultThemeConfig() {
1635
+ const defaultThemeVariables = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getThemeVariables */ .P$)();
1636
+ const config = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)();
1637
+ return (0,_chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)(defaultThemeVariables.xyChart, config.themeVariables.xyChart);
1638
+ }
1639
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartDefaultThemeConfig, "getChartDefaultThemeConfig");
1640
+ function getChartDefaultConfig() {
1641
+ const config = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)();
1642
+ return (0,_chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)(
1643
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .defaultConfig_default */ .UI.xyChart,
1644
+ config.xyChart
1645
+ );
1646
+ }
1647
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartDefaultConfig, "getChartDefaultConfig");
1648
+ function getChartDefaultData() {
1649
+ return {
1650
+ yAxis: {
1651
+ type: "linear",
1652
+ title: "",
1653
+ min: Infinity,
1654
+ max: -Infinity
1655
+ },
1656
+ xAxis: {
1657
+ type: "band",
1658
+ title: "",
1659
+ categories: []
1660
+ },
1661
+ title: "",
1662
+ plots: []
1663
+ };
1664
+ }
1665
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartDefaultData, "getChartDefaultData");
1666
+ function textSanitizer(text) {
1667
+ const config = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)();
1668
+ return (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .sanitizeText */ .jZ)(text.trim(), config);
1669
+ }
1670
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(textSanitizer, "textSanitizer");
1671
+ function setTmpSVGG(SVGG) {
1672
+ tmpSVGGroup = SVGG;
1673
+ }
1674
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setTmpSVGG, "setTmpSVGG");
1675
+ function setOrientation(orientation) {
1676
+ if (orientation === "horizontal") {
1677
+ xyChartConfig.chartOrientation = "horizontal";
1678
+ } else {
1679
+ xyChartConfig.chartOrientation = "vertical";
1680
+ }
1681
+ }
1682
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setOrientation, "setOrientation");
1683
+ function setXAxisTitle(title) {
1684
+ xyChartData.xAxis.title = textSanitizer(title.text);
1685
+ }
1686
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setXAxisTitle, "setXAxisTitle");
1687
+ function setXAxisRangeData(min, max) {
1688
+ xyChartData.xAxis = { type: "linear", title: xyChartData.xAxis.title, min, max };
1689
+ hasSetXAxis = true;
1690
+ }
1691
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setXAxisRangeData, "setXAxisRangeData");
1692
+ function setXAxisBand(categories) {
1693
+ xyChartData.xAxis = {
1694
+ type: "band",
1695
+ title: xyChartData.xAxis.title,
1696
+ categories: categories.map((c) => textSanitizer(c.text))
1697
+ };
1698
+ hasSetXAxis = true;
1699
+ }
1700
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setXAxisBand, "setXAxisBand");
1701
+ function setYAxisTitle(title) {
1702
+ xyChartData.yAxis.title = textSanitizer(title.text);
1703
+ }
1704
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setYAxisTitle, "setYAxisTitle");
1705
+ function setYAxisRangeData(min, max) {
1706
+ xyChartData.yAxis = { type: "linear", title: xyChartData.yAxis.title, min, max };
1707
+ hasSetYAxis = true;
1708
+ }
1709
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setYAxisRangeData, "setYAxisRangeData");
1710
+ function setYAxisRangeFromPlotData(data) {
1711
+ const minValue = Math.min(...data);
1712
+ const maxValue = Math.max(...data);
1713
+ const prevMinValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.min : Infinity;
1714
+ const prevMaxValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.max : -Infinity;
1715
+ xyChartData.yAxis = {
1716
+ type: "linear",
1717
+ title: xyChartData.yAxis.title,
1718
+ min: Math.min(prevMinValue, minValue),
1719
+ max: Math.max(prevMaxValue, maxValue)
1720
+ };
1721
+ }
1722
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setYAxisRangeFromPlotData, "setYAxisRangeFromPlotData");
1723
+ function transformDataWithoutCategory(data) {
1724
+ let retData = [];
1725
+ if (data.length === 0) {
1726
+ return retData;
1727
+ }
1728
+ if (!hasSetXAxis) {
1729
+ const prevMinValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.min : Infinity;
1730
+ const prevMaxValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.max : -Infinity;
1731
+ setXAxisRangeData(Math.min(prevMinValue, 1), Math.max(prevMaxValue, data.length));
1732
+ }
1733
+ if (!hasSetYAxis) {
1734
+ setYAxisRangeFromPlotData(data);
1735
+ }
1736
+ if (isBandAxisData(xyChartData.xAxis)) {
1737
+ retData = xyChartData.xAxis.categories.map((c, i) => [c, data[i]]);
1738
+ }
1739
+ if (isLinearAxisData(xyChartData.xAxis)) {
1740
+ const min = xyChartData.xAxis.min;
1741
+ const max = xyChartData.xAxis.max;
1742
+ const step = (max - min) / (data.length - 1);
1743
+ const categories = [];
1744
+ for (let i = min; i <= max; i += step) {
1745
+ categories.push(`${i}`);
1235
1746
  }
1236
- `;
1747
+ retData = categories.map((c, i) => [c, data[i]]);
1237
1748
  }
1238
- return sections2;
1239
- }, "genSections");
1240
- var getStyles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((options) => `
1241
- .edge {
1242
- stroke-width: 3;
1749
+ return retData;
1750
+ }
1751
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(transformDataWithoutCategory, "transformDataWithoutCategory");
1752
+ function getPlotColorFromPalette(plotIndex2) {
1753
+ return plotColorPalette[plotIndex2 === 0 ? 0 : plotIndex2 % plotColorPalette.length];
1754
+ }
1755
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getPlotColorFromPalette, "getPlotColorFromPalette");
1756
+ function setLineData(title, data) {
1757
+ const plotData = transformDataWithoutCategory(data);
1758
+ xyChartData.plots.push({
1759
+ type: "line",
1760
+ strokeFill: getPlotColorFromPalette(plotIndex),
1761
+ strokeWidth: 2,
1762
+ data: plotData
1763
+ });
1764
+ plotIndex++;
1765
+ }
1766
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setLineData, "setLineData");
1767
+ function setBarData(title, data) {
1768
+ const plotData = transformDataWithoutCategory(data);
1769
+ xyChartData.plots.push({
1770
+ type: "bar",
1771
+ fill: getPlotColorFromPalette(plotIndex),
1772
+ data: plotData
1773
+ });
1774
+ plotIndex++;
1775
+ }
1776
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(setBarData, "setBarData");
1777
+ function getDrawableElem() {
1778
+ if (xyChartData.plots.length === 0) {
1779
+ throw Error("No Plot to render, please provide a plot with some data");
1243
1780
  }
1244
- ${genSections(options)}
1245
- .section-root rect, .section-root path, .section-root circle {
1246
- fill: ${options.git0};
1781
+ xyChartData.title = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab)();
1782
+ return XYChartBuilder.build(xyChartConfig, xyChartData, xyChartThemeConfig, tmpSVGGroup);
1783
+ }
1784
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getDrawableElem, "getDrawableElem");
1785
+ function getChartThemeConfig() {
1786
+ return xyChartThemeConfig;
1787
+ }
1788
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartThemeConfig, "getChartThemeConfig");
1789
+ function getChartConfig() {
1790
+ return xyChartConfig;
1791
+ }
1792
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getChartConfig, "getChartConfig");
1793
+ var clear2 = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
1794
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .clear */ .IU)();
1795
+ plotIndex = 0;
1796
+ xyChartConfig = getChartDefaultConfig();
1797
+ xyChartData = getChartDefaultData();
1798
+ xyChartThemeConfig = getChartDefaultThemeConfig();
1799
+ plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim());
1800
+ hasSetXAxis = false;
1801
+ hasSetYAxis = false;
1802
+ }, "clear");
1803
+ var xychartDb_default = {
1804
+ getDrawableElem,
1805
+ clear: clear2,
1806
+ setAccTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccTitle */ .SV,
1807
+ getAccTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccTitle */ .iN,
1808
+ setDiagramTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setDiagramTitle */ .ke,
1809
+ getDiagramTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab,
1810
+ getAccDescription: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccDescription */ .m7,
1811
+ setAccDescription: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccDescription */ .EI,
1812
+ setOrientation,
1813
+ setXAxisTitle,
1814
+ setXAxisRangeData,
1815
+ setXAxisBand,
1816
+ setYAxisTitle,
1817
+ setYAxisRangeData,
1818
+ setLineData,
1819
+ setBarData,
1820
+ setTmpSVGG,
1821
+ getChartThemeConfig,
1822
+ getChartConfig
1823
+ };
1824
+
1825
+ // src/diagrams/xychart/xychartRenderer.ts
1826
+ var draw = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((txt, id, _version, diagObj) => {
1827
+ const db = diagObj.db;
1828
+ const themeConfig = db.getChartThemeConfig();
1829
+ const chartConfig = db.getChartConfig();
1830
+ function getDominantBaseLine(horizontalPos) {
1831
+ return horizontalPos === "top" ? "text-before-edge" : "middle";
1247
1832
  }
1248
- .section-root text {
1249
- fill: ${options.gitBranchLabel0};
1833
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getDominantBaseLine, "getDominantBaseLine");
1834
+ function getTextAnchor(verticalPos) {
1835
+ return verticalPos === "left" ? "start" : verticalPos === "right" ? "end" : "middle";
1250
1836
  }
1251
- .icon-container {
1252
- height:100%;
1253
- display: flex;
1254
- justify-content: center;
1255
- align-items: center;
1837
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getTextAnchor, "getTextAnchor");
1838
+ function getTextTransformation(data) {
1839
+ return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;
1256
1840
  }
1257
- .edge {
1258
- fill: none;
1841
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getTextTransformation, "getTextTransformation");
1842
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.debug("Rendering xychart chart\n" + txt);
1843
+ const svg = (0,_chunk_7B677QYD_mjs__WEBPACK_IMPORTED_MODULE_2__/* .selectSvgElement */ .D)(id);
1844
+ const group = svg.append("g").attr("class", "main");
1845
+ const background = group.append("rect").attr("width", chartConfig.width).attr("height", chartConfig.height).attr("class", "background");
1846
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .configureSvgSize */ .a$)(svg, chartConfig.height, chartConfig.width, true);
1847
+ svg.attr("viewBox", `0 0 ${chartConfig.width} ${chartConfig.height}`);
1848
+ background.attr("fill", themeConfig.backgroundColor);
1849
+ db.setTmpSVGG(svg.append("g").attr("class", "mermaid-tmp-group"));
1850
+ const shapes = db.getDrawableElem();
1851
+ const groups = {};
1852
+ function getGroup(gList) {
1853
+ let elem = group;
1854
+ let prefix = "";
1855
+ for (const [i] of gList.entries()) {
1856
+ let parent = group;
1857
+ if (i > 0 && groups[prefix]) {
1858
+ parent = groups[prefix];
1859
+ }
1860
+ prefix += gList[i];
1861
+ elem = groups[prefix];
1862
+ if (!elem) {
1863
+ elem = groups[prefix] = parent.append("g").attr("class", gList[i]);
1864
+ }
1865
+ }
1866
+ return elem;
1259
1867
  }
1260
- .eventWrapper {
1261
- filter: brightness(120%);
1868
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getGroup, "getGroup");
1869
+ for (const shape of shapes) {
1870
+ if (shape.data.length === 0) {
1871
+ continue;
1872
+ }
1873
+ const shapeGroup = getGroup(shape.groupTexts);
1874
+ switch (shape.type) {
1875
+ case "rect":
1876
+ 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);
1877
+ break;
1878
+ case "text":
1879
+ 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);
1880
+ break;
1881
+ case "path":
1882
+ 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);
1883
+ break;
1884
+ }
1262
1885
  }
1263
- `, "getStyles");
1264
- var styles_default = getStyles;
1886
+ }, "draw");
1887
+ var xychartRenderer_default = {
1888
+ draw
1889
+ };
1265
1890
 
1266
- // src/diagrams/timeline/timeline-definition.ts
1891
+ // src/diagrams/xychart/xychartDiagram.ts
1267
1892
  var diagram = {
1268
- db: timelineDb_exports,
1269
- renderer: timelineRenderer_default,
1270
- parser: timeline_default,
1271
- styles: styles_default
1893
+ parser: xychart_default,
1894
+ db: xychartDb_default,
1895
+ renderer: xychartRenderer_default
1272
1896
  };
1273
1897
 
1274
1898