@versini/sassysaint 8.107.4 → 8.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.DeRcKN5H.js → AboutChangelog.BQtbpOat.js} +2 -2
- package/dist/chunks/{AboutEntry.6mTHwkfb.js → AboutEntry.Bb0L9eCQ.js} +7 -7
- package/dist/chunks/{App.DTjbiLAP.js → App.CSBqbQnm.js} +1147 -1146
- package/dist/chunks/{Bubble.ltolxxta.js → Bubble.Jl_vP6Bg.js} +1 -1
- package/dist/chunks/{DeleteButtonIcon.P0LgJDjE.js → ButtonIconDelete.C3bf-YVf.js} +3 -3
- package/dist/chunks/{Chart.BzOmOhOW.js → Chart.KnjXKeEm.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.lGE_8ao1.js → ChatBubbleAssistant.8hHak3Xb.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.DC661ePq.js → ChatBubbleUser.C3QnvRpy.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.BkRFWpsA.js → ChatHistoryTable.CIIrZME7.js} +4 -4
- package/dist/chunks/{HistoryEntry.uUjsDuT0.js → HistoryEntry.B0U0RQ7-.js} +6 -6
- package/dist/chunks/{LoginEntry.BGZdTDwf.js → LoginEntry.Cf03Pbyq.js} +4 -4
- package/dist/chunks/{LogoEntry.Bpddd0yA.js → LogoEntry.C_oLwnbv.js} +3 -3
- package/dist/chunks/{MemoriesEntry.BYQm9cuU.js → MemoriesEntry.CeMfI8F3.js} +5 -5
- package/dist/chunks/{ProfileEntry.BqcZXSeT.js → ProfileEntry.BasVTLyr.js} +4 -4
- package/dist/chunks/{SettingsEntry.BdC5Vyof.js → SettingsEntry.DqKtJfKG.js} +5 -5
- package/dist/chunks/{UsageEntry._O8Q6TwS.js → UsageEntry.phb8YqH1.js} +5 -5
- package/dist/chunks/_basePickBy.DiyBcH_b.js +151 -0
- package/dist/chunks/_baseUniq.B9L9wOT1.js +614 -0
- package/dist/chunks/arc.C1rfS5dQ.js +83 -0
- package/dist/chunks/architecture-U656AL7Q.Bw4J2QgD.js +36 -0
- package/dist/chunks/architectureDiagram-VXUJARFQ.DuwD3xDO.js +4653 -0
- package/dist/chunks/blockDiagram-VD42YOAC.BeIrwe07.js +2254 -0
- package/dist/chunks/browser.BQGdandl.js +260 -0
- package/dist/chunks/c4Diagram-YG6GDRKO.YzJEqJgk.js +1579 -0
- package/dist/chunks/channel.BPPTH6mh.js +5 -0
- package/dist/chunks/chunk-4BX2VUAB.BCIoHYCy.js +8 -0
- package/dist/chunks/chunk-55IACEB6.CFEkh5zE.js +8 -0
- package/dist/chunks/chunk-B4BG7PRW.CwfV87jH.js +1375 -0
- package/dist/chunks/chunk-DI55MBZ5.CcFvwYqB.js +1370 -0
- package/dist/chunks/chunk-FMBD7UC4.C9__m3G-.js +19 -0
- package/dist/chunks/chunk-QN33PNHL.EonhZUcV.js +19 -0
- package/dist/chunks/chunk-QZHKN3VN.CKR_DhAb.js +15 -0
- package/dist/chunks/chunk-TZMSLE5B.eMD178H9.js +64 -0
- package/dist/chunks/classDiagram-2ON5EDUG.DCsDc7LM.js +16 -0
- package/dist/chunks/classDiagram-v2-WZHVMYZB.DCsDc7LM.js +16 -0
- package/dist/chunks/clone.DG_v08Gm.js +8 -0
- package/dist/chunks/cose-bilkent-S5V4N54A.Bw5tPVeS.js +2600 -0
- package/dist/chunks/cytoscape.esm.DmRZGnqW.js +18700 -0
- package/dist/chunks/dagre-6UL2VRFP.CTW14kZK.js +444 -0
- package/dist/chunks/defaultLocale.CPJLP5jg.js +171 -0
- package/dist/chunks/diagram-PSM6KHXK.DDyW__Et.js +531 -0
- package/dist/chunks/diagram-QEK2KX5R.C8Y6Nyjq.js +217 -0
- package/dist/chunks/diagram-S2PKOQOG.DnnZ1m7x.js +142 -0
- package/dist/chunks/erDiagram-Q2GNP2WA.BavKd766.js +841 -0
- package/dist/chunks/flowDiagram-NV44I4VS.roMN4lsc.js +1620 -0
- package/dist/chunks/ganttDiagram-JELNMOA3.B_SkSqyi.js +2647 -0
- package/dist/chunks/gitGraph-F6HP7TQM.C7PwqG55.js +27 -0
- package/dist/chunks/gitGraphDiagram-NY62KEGX.BHfSeSWk.js +699 -0
- package/dist/chunks/graph.CsxOkYbN.js +247 -0
- package/dist/chunks/{index.D2nN0rC6.js → index.BHKlxxP5.js} +1 -1
- package/dist/chunks/{index.CYcieK1H.js → index.BUYdarBy.js} +1 -1
- package/dist/chunks/{index.BxbWxVtd.js → index.BetC5DSu.js} +1 -1
- package/dist/chunks/{index.DuxTgnco.js → index.BmLHPbgB.js} +1 -1
- package/dist/chunks/{index.C70LcKzU.js → index.Bq1fyGUB.js} +1 -1
- package/dist/chunks/{index.CaofbEIP.js → index.DQPv0lQj.js} +2 -3
- package/dist/chunks/{index.BlviGqw0.js → index.DbyaywZN.js} +3 -3
- package/dist/chunks/{index.DG-VhqKw.js → index.DjuVXA0R.js} +1 -1
- package/dist/chunks/index.DzRoQenq.js +67 -0
- package/dist/chunks/info-NVLQJR56.DZPZ5T1V.js +27 -0
- package/dist/chunks/infoDiagram-WHAUD3N6.Bi7I8DQ6.js +24 -0
- package/dist/chunks/init.DAGnb5BH.js +16 -0
- package/dist/chunks/journeyDiagram-XKPGCS4Q.D8VPEfAI.js +834 -0
- package/dist/chunks/kanban-definition-3W4ZIXB7.BWUqPfZ4.js +719 -0
- package/dist/chunks/{index.s8Izh8-Q.js → katex.D0sQThIv.js} +1638 -1943
- package/dist/chunks/layout.BVs5Fo34.js +1332 -0
- package/dist/chunks/linear.CIDfImUo.js +625 -0
- package/dist/chunks/mermaid-parser.core.ORd6OSMH.js +12724 -0
- package/dist/chunks/mindmap-definition-VGOIOE7T.B8li-u54.js +784 -0
- package/dist/chunks/ordinal.EWT-qnu7.js +61 -0
- package/dist/chunks/packet-BFZMPI3H.ucR6ljZQ.js +27 -0
- package/dist/chunks/pie-7BOR55EZ.CUpVQfSo.js +32 -0
- package/dist/chunks/pieDiagram-ADFJNKIX.GfyALym8.js +161 -0
- package/dist/chunks/quadrantDiagram-AYHSOK5B.CsUp44jt.js +1022 -0
- package/dist/chunks/radar-NHE76QYJ.Es4sfwW2.js +27 -0
- package/dist/chunks/rehype-mermaid.QzUnaHa9.js +14283 -0
- package/dist/chunks/requirementDiagram-UZGBJVZJ.DQTWxv7j.js +850 -0
- package/dist/chunks/sankeyDiagram-TZEHDZUN.DJdcOMBP.js +810 -0
- package/dist/chunks/sequenceDiagram-WL72ISMW.CIFR_pCj.js +2511 -0
- package/dist/chunks/stateDiagram-FKZM4ZOC.DgM5pVKO.js +263 -0
- package/dist/chunks/stateDiagram-v2-4FDKWEC3.BUygW1pY.js +16 -0
- package/dist/chunks/timeline-definition-IT6M3QCI.Ca0YkAdx.js +795 -0
- package/dist/chunks/treemap-KMMF4GRG.Xsds0Pr-.js +81 -0
- package/dist/chunks/{useMarkdown.DjEZz9lH.js → useMarkdown.DgNUxPe8.js} +1951 -1936
- package/dist/chunks/xychartDiagram-PRI3JC2R.DyQEBwDk.js +1340 -0
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +5 -5
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { initRange as a } from "./init.DAGnb5BH.js";
|
|
2
|
+
class o extends Map {
|
|
3
|
+
constructor(n, t = g) {
|
|
4
|
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
|
5
|
+
}
|
|
6
|
+
get(n) {
|
|
7
|
+
return super.get(c(this, n));
|
|
8
|
+
}
|
|
9
|
+
has(n) {
|
|
10
|
+
return super.has(c(this, n));
|
|
11
|
+
}
|
|
12
|
+
set(n, t) {
|
|
13
|
+
return super.set(l(this, n), t);
|
|
14
|
+
}
|
|
15
|
+
delete(n) {
|
|
16
|
+
return super.delete(p(this, n));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function c({ _intern: e, _key: n }, t) {
|
|
20
|
+
const r = n(t);
|
|
21
|
+
return e.has(r) ? e.get(r) : t;
|
|
22
|
+
}
|
|
23
|
+
function l({ _intern: e, _key: n }, t) {
|
|
24
|
+
const r = n(t);
|
|
25
|
+
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
|
26
|
+
}
|
|
27
|
+
function p({ _intern: e, _key: n }, t) {
|
|
28
|
+
const r = n(t);
|
|
29
|
+
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
|
30
|
+
}
|
|
31
|
+
function g(e) {
|
|
32
|
+
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
33
|
+
}
|
|
34
|
+
const f = /* @__PURE__ */ Symbol("implicit");
|
|
35
|
+
function h() {
|
|
36
|
+
var e = new o(), n = [], t = [], r = f;
|
|
37
|
+
function s(u) {
|
|
38
|
+
let i = e.get(u);
|
|
39
|
+
if (i === void 0) {
|
|
40
|
+
if (r !== f) return r;
|
|
41
|
+
e.set(u, i = n.push(u) - 1);
|
|
42
|
+
}
|
|
43
|
+
return t[i % t.length];
|
|
44
|
+
}
|
|
45
|
+
return s.domain = function(u) {
|
|
46
|
+
if (!arguments.length) return n.slice();
|
|
47
|
+
n = [], e = new o();
|
|
48
|
+
for (const i of u)
|
|
49
|
+
e.has(i) || e.set(i, n.push(i) - 1);
|
|
50
|
+
return s;
|
|
51
|
+
}, s.range = function(u) {
|
|
52
|
+
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
|
53
|
+
}, s.unknown = function(u) {
|
|
54
|
+
return arguments.length ? (r = u, s) : r;
|
|
55
|
+
}, s.copy = function() {
|
|
56
|
+
return h(n, t).unknown(r);
|
|
57
|
+
}, a.apply(s, arguments), s;
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
h as ordinal
|
|
61
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EmptyFileSystem as n, inject as o, MermaidGeneratedSharedModule as u, createDefaultSharedCoreModule as d, __name as r, PacketGeneratedModule as i, createDefaultCoreModule as l, CommonValueConverter as s, AbstractMermaidTokenBuilder as k } from "./mermaid-parser.core.ORd6OSMH.js";
|
|
2
|
+
var e, m = (e = class extends k {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(["packet"]);
|
|
5
|
+
}
|
|
6
|
+
}, r(e, "PacketTokenBuilder"), e), v = {
|
|
7
|
+
parser: {
|
|
8
|
+
TokenBuilder: /* @__PURE__ */ r(() => new m(), "TokenBuilder"),
|
|
9
|
+
ValueConverter: /* @__PURE__ */ r(() => new s(), "ValueConverter")
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
function M(c = n) {
|
|
13
|
+
const t = o(
|
|
14
|
+
d(c),
|
|
15
|
+
u
|
|
16
|
+
), a = o(
|
|
17
|
+
l({ shared: t }),
|
|
18
|
+
i,
|
|
19
|
+
v
|
|
20
|
+
);
|
|
21
|
+
return t.ServiceRegistry.register(a), { shared: t, Packet: a };
|
|
22
|
+
}
|
|
23
|
+
r(M, "createPacketServices");
|
|
24
|
+
export {
|
|
25
|
+
v as PacketModule,
|
|
26
|
+
M as createPacketServices
|
|
27
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EmptyFileSystem as s, inject as o, MermaidGeneratedSharedModule as u, createDefaultSharedCoreModule as d, __name as a, PieGeneratedModule as c, createDefaultCoreModule as l, AbstractMermaidValueConverter as v, AbstractMermaidTokenBuilder as m } from "./mermaid-parser.core.ORd6OSMH.js";
|
|
2
|
+
var e, C = (e = class extends m {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(["pie", "showData"]);
|
|
5
|
+
}
|
|
6
|
+
}, a(e, "PieTokenBuilder"), e), r, P = (r = class extends v {
|
|
7
|
+
runCustomConverter(t, i, S) {
|
|
8
|
+
if (t.name === "PIE_SECTION_LABEL")
|
|
9
|
+
return i.replace(/"/g, "").trim();
|
|
10
|
+
}
|
|
11
|
+
}, a(r, "PieValueConverter"), r), M = {
|
|
12
|
+
parser: {
|
|
13
|
+
TokenBuilder: /* @__PURE__ */ a(() => new C(), "TokenBuilder"),
|
|
14
|
+
ValueConverter: /* @__PURE__ */ a(() => new P(), "ValueConverter")
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
function p(n = s) {
|
|
18
|
+
const t = o(
|
|
19
|
+
d(n),
|
|
20
|
+
u
|
|
21
|
+
), i = o(
|
|
22
|
+
l({ shared: t }),
|
|
23
|
+
c,
|
|
24
|
+
M
|
|
25
|
+
);
|
|
26
|
+
return t.ServiceRegistry.register(i), { shared: t, Pie: i };
|
|
27
|
+
}
|
|
28
|
+
a(p, "createPieServices");
|
|
29
|
+
export {
|
|
30
|
+
M as PieModule,
|
|
31
|
+
p as createPieServices
|
|
32
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { constant as S, tau as z, array as j, __name as p, getAccDescription as Z, setAccDescription as q, getAccTitle as H, setAccTitle as J, getDiagramTitle as K, setDiagramTitle as Q, log as F, getConfig2 as X, cleanAndMerge as Y, selectSvgElement as ee, parseFontSize as te, configureSvgSize as re, clear as ae, defaultConfig_default as ne } from "./rehype-mermaid.QzUnaHa9.js";
|
|
2
|
+
import { populateCommonDb as ie } from "./chunk-4BX2VUAB.BCIoHYCy.js";
|
|
3
|
+
import { parse as le } from "./mermaid-parser.core.ORd6OSMH.js";
|
|
4
|
+
import { d3arc as I } from "./arc.C1rfS5dQ.js";
|
|
5
|
+
import { ordinal as oe } from "./ordinal.EWT-qnu7.js";
|
|
6
|
+
function se(e, r) {
|
|
7
|
+
return r < e ? -1 : r > e ? 1 : r >= e ? 0 : NaN;
|
|
8
|
+
}
|
|
9
|
+
function ce(e) {
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
function ue() {
|
|
13
|
+
var e = ce, r = se, f = null, x = S(0), l = S(z), s = S(0);
|
|
14
|
+
function o(t) {
|
|
15
|
+
var n, c = (t = j(t)).length, g, y, m = 0, u = new Array(c), i = new Array(c), v = +x.apply(this, arguments), w = Math.min(z, Math.max(-z, l.apply(this, arguments) - v)), h, D = Math.min(Math.abs(w) / c, s.apply(this, arguments)), $ = D * (w < 0 ? -1 : 1), d;
|
|
16
|
+
for (n = 0; n < c; ++n)
|
|
17
|
+
(d = i[u[n] = n] = +e(t[n], n, t)) > 0 && (m += d);
|
|
18
|
+
for (r != null ? u.sort(function(A, C) {
|
|
19
|
+
return r(i[A], i[C]);
|
|
20
|
+
}) : f != null && u.sort(function(A, C) {
|
|
21
|
+
return f(t[A], t[C]);
|
|
22
|
+
}), n = 0, y = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
|
|
23
|
+
g = u[n], d = i[g], h = v + (d > 0 ? d * y : 0) + $, i[g] = {
|
|
24
|
+
data: t[g],
|
|
25
|
+
index: n,
|
|
26
|
+
value: d,
|
|
27
|
+
startAngle: v,
|
|
28
|
+
endAngle: h,
|
|
29
|
+
padAngle: D
|
|
30
|
+
};
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
return o.value = function(t) {
|
|
34
|
+
return arguments.length ? (e = typeof t == "function" ? t : S(+t), o) : e;
|
|
35
|
+
}, o.sortValues = function(t) {
|
|
36
|
+
return arguments.length ? (r = t, f = null, o) : r;
|
|
37
|
+
}, o.sort = function(t) {
|
|
38
|
+
return arguments.length ? (f = t, r = null, o) : f;
|
|
39
|
+
}, o.startAngle = function(t) {
|
|
40
|
+
return arguments.length ? (x = typeof t == "function" ? t : S(+t), o) : x;
|
|
41
|
+
}, o.endAngle = function(t) {
|
|
42
|
+
return arguments.length ? (l = typeof t == "function" ? t : S(+t), o) : l;
|
|
43
|
+
}, o.padAngle = function(t) {
|
|
44
|
+
return arguments.length ? (s = typeof t == "function" ? t : S(+t), o) : s;
|
|
45
|
+
}, o;
|
|
46
|
+
}
|
|
47
|
+
var pe = ne.pie, G = {
|
|
48
|
+
sections: /* @__PURE__ */ new Map(),
|
|
49
|
+
showData: !1
|
|
50
|
+
}, T = G.sections, N = G.showData, ge = structuredClone(pe), de = /* @__PURE__ */ p(() => structuredClone(ge), "getConfig"), fe = /* @__PURE__ */ p(() => {
|
|
51
|
+
T = /* @__PURE__ */ new Map(), N = G.showData, ae();
|
|
52
|
+
}, "clear"), he = /* @__PURE__ */ p(({ label: e, value: r }) => {
|
|
53
|
+
if (r < 0)
|
|
54
|
+
throw new Error(
|
|
55
|
+
`"${e}" has invalid value: ${r}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
|
56
|
+
);
|
|
57
|
+
T.has(e) || (T.set(e, r), F.debug(`added new section: ${e}, with value: ${r}`));
|
|
58
|
+
}, "addSection"), me = /* @__PURE__ */ p(() => T, "getSections"), ve = /* @__PURE__ */ p((e) => {
|
|
59
|
+
N = e;
|
|
60
|
+
}, "setShowData"), Se = /* @__PURE__ */ p(() => N, "getShowData"), L = {
|
|
61
|
+
getConfig: de,
|
|
62
|
+
clear: fe,
|
|
63
|
+
setDiagramTitle: Q,
|
|
64
|
+
getDiagramTitle: K,
|
|
65
|
+
setAccTitle: J,
|
|
66
|
+
getAccTitle: H,
|
|
67
|
+
setAccDescription: q,
|
|
68
|
+
getAccDescription: Z,
|
|
69
|
+
addSection: he,
|
|
70
|
+
getSections: me,
|
|
71
|
+
setShowData: ve,
|
|
72
|
+
getShowData: Se
|
|
73
|
+
}, xe = /* @__PURE__ */ p((e, r) => {
|
|
74
|
+
ie(e, r), r.setShowData(e.showData), e.sections.map(r.addSection);
|
|
75
|
+
}, "populateDb"), ye = {
|
|
76
|
+
parse: /* @__PURE__ */ p(async (e) => {
|
|
77
|
+
const r = await le("pie", e);
|
|
78
|
+
F.debug(r), xe(r, L);
|
|
79
|
+
}, "parse")
|
|
80
|
+
}, we = /* @__PURE__ */ p((e) => `
|
|
81
|
+
.pieCircle{
|
|
82
|
+
stroke: ${e.pieStrokeColor};
|
|
83
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
84
|
+
opacity : ${e.pieOpacity};
|
|
85
|
+
}
|
|
86
|
+
.pieOuterCircle{
|
|
87
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
88
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
89
|
+
fill: none;
|
|
90
|
+
}
|
|
91
|
+
.pieTitleText {
|
|
92
|
+
text-anchor: middle;
|
|
93
|
+
font-size: ${e.pieTitleTextSize};
|
|
94
|
+
fill: ${e.pieTitleTextColor};
|
|
95
|
+
font-family: ${e.fontFamily};
|
|
96
|
+
}
|
|
97
|
+
.slice {
|
|
98
|
+
font-family: ${e.fontFamily};
|
|
99
|
+
fill: ${e.pieSectionTextColor};
|
|
100
|
+
font-size:${e.pieSectionTextSize};
|
|
101
|
+
// fill: white;
|
|
102
|
+
}
|
|
103
|
+
.legend text {
|
|
104
|
+
fill: ${e.pieLegendTextColor};
|
|
105
|
+
font-family: ${e.fontFamily};
|
|
106
|
+
font-size: ${e.pieLegendTextSize};
|
|
107
|
+
}
|
|
108
|
+
`, "getStyles"), Ae = we, Ce = /* @__PURE__ */ p((e) => {
|
|
109
|
+
const r = [...e.values()].reduce((l, s) => l + s, 0), f = [...e.entries()].map(([l, s]) => ({ label: l, value: s })).filter((l) => l.value / r * 100 >= 1).sort((l, s) => s.value - l.value);
|
|
110
|
+
return ue().value((l) => l.value)(f);
|
|
111
|
+
}, "createPieArcs"), De = /* @__PURE__ */ p((e, r, f, x) => {
|
|
112
|
+
F.debug(`rendering pie chart
|
|
113
|
+
` + e);
|
|
114
|
+
const l = x.db, s = X(), o = Y(l.getConfig(), s.pie), t = 40, n = 18, c = 4, g = 450, y = g, m = ee(r), u = m.append("g");
|
|
115
|
+
u.attr("transform", "translate(" + y / 2 + "," + g / 2 + ")");
|
|
116
|
+
const { themeVariables: i } = s;
|
|
117
|
+
let [v] = te(i.pieOuterStrokeWidth);
|
|
118
|
+
v ??= 2;
|
|
119
|
+
const w = o.textPosition, h = Math.min(y, g) / 2 - t, D = I().innerRadius(0).outerRadius(h), $ = I().innerRadius(h * w).outerRadius(h * w);
|
|
120
|
+
u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
|
|
121
|
+
const d = l.getSections(), A = Ce(d), C = [
|
|
122
|
+
i.pie1,
|
|
123
|
+
i.pie2,
|
|
124
|
+
i.pie3,
|
|
125
|
+
i.pie4,
|
|
126
|
+
i.pie5,
|
|
127
|
+
i.pie6,
|
|
128
|
+
i.pie7,
|
|
129
|
+
i.pie8,
|
|
130
|
+
i.pie9,
|
|
131
|
+
i.pie10,
|
|
132
|
+
i.pie11,
|
|
133
|
+
i.pie12
|
|
134
|
+
];
|
|
135
|
+
let E = 0;
|
|
136
|
+
d.forEach((a) => {
|
|
137
|
+
E += a;
|
|
138
|
+
});
|
|
139
|
+
const W = A.filter((a) => (a.data.value / E * 100).toFixed(0) !== "0"), b = oe(C);
|
|
140
|
+
u.selectAll("mySlices").data(W).enter().append("path").attr("d", D).attr("fill", (a) => b(a.data.label)).attr("class", "pieCircle"), u.selectAll("mySlices").data(W).enter().append("text").text((a) => (a.data.value / E * 100).toFixed(0) + "%").attr("transform", (a) => "translate(" + $.centroid(a) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(l.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
141
|
+
const O = [...d.entries()].map(([a, M]) => ({
|
|
142
|
+
label: a,
|
|
143
|
+
value: M
|
|
144
|
+
})), k = u.selectAll(".legend").data(O).enter().append("g").attr("class", "legend").attr("transform", (a, M) => {
|
|
145
|
+
const R = n + c, B = R * O.length / 2, V = 12 * n, U = M * R - B;
|
|
146
|
+
return "translate(" + V + "," + U + ")";
|
|
147
|
+
});
|
|
148
|
+
k.append("rect").attr("width", n).attr("height", n).style("fill", (a) => b(a.label)).style("stroke", (a) => b(a.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((a) => l.getShowData() ? `${a.label} [${a.value}]` : a.label);
|
|
149
|
+
const _ = Math.max(
|
|
150
|
+
...k.selectAll("text").nodes().map((a) => a?.getBoundingClientRect().width ?? 0)
|
|
151
|
+
), P = y + t + n + c + _;
|
|
152
|
+
m.attr("viewBox", `0 0 ${P} ${g}`), re(m, g, P, o.useMaxWidth);
|
|
153
|
+
}, "draw"), $e = { draw: De }, ze = {
|
|
154
|
+
parser: ye,
|
|
155
|
+
db: L,
|
|
156
|
+
renderer: $e,
|
|
157
|
+
styles: Ae
|
|
158
|
+
};
|
|
159
|
+
export {
|
|
160
|
+
ze as diagram
|
|
161
|
+
};
|