@diagrammo/dgmo 0.76.0 → 0.78.0
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/README.md +17 -13
- package/dist/advanced.d.ts +150 -13
- package/dist/advanced.js +180 -131
- package/dist/block.css +1 -1
- package/dist/block.d.ts +2 -2
- package/dist/block.js +45 -41
- package/dist/{chart-meta-lP8Rl19E.d.ts → chart-meta-BKN2ORkc.d.ts} +2 -2
- package/dist/chart-meta.d.ts +3 -3
- package/dist/chart-meta.js +30 -29
- package/dist/charts-d3-KEQ7XVSM.js +31 -0
- package/dist/{chunk-7IATMZSA.js → chunk-26EVL454.js} +1 -25
- package/dist/{chunk-3H4PDNP4.js → chunk-2NLBIZEW.js} +2 -2
- package/dist/{chunk-GFXFRKUG.js → chunk-32VR65TL.js} +63 -36
- package/dist/{chunk-IHUOYDLN.js → chunk-36UQ77JV.js} +24 -24
- package/dist/chunk-3DPOIW3W.js +10 -0
- package/dist/{chunk-3SP6G4LN.js → chunk-3GLTQZKE.js} +2 -2
- package/dist/{chunk-DY7KDZUF.js → chunk-3OWIYK52.js} +2 -2
- package/dist/{chunk-UBW53CNS.js → chunk-3XFOE3DQ.js} +12 -7
- package/dist/{chunk-W7UBPARG.js → chunk-3ZLQM6XN.js} +2 -2
- package/dist/{chunk-5GM6BZO7.js → chunk-4AWLEWSD.js} +5 -2
- package/dist/{chunk-AYM472K3.js → chunk-4IGUEGD6.js} +80 -61
- package/dist/{chunk-QOVM5VRC.js → chunk-57GSSHBR.js} +2 -2
- package/dist/{chunk-5VMUVJO4.js → chunk-5G55TS3H.js} +2 -2
- package/dist/{chunk-QT5UMFPE.js → chunk-67I3HFSF.js} +9 -9
- package/dist/{chunk-WQXD3IIN.js → chunk-6B3M6LW6.js} +10 -8
- package/dist/{chunk-3EGIU5WY.js → chunk-6PHOZBW5.js} +4 -6
- package/dist/{chunk-5PFNUDXR.js → chunk-6VTLVU7D.js} +2 -2
- package/dist/{chunk-M5JT2AU7.js → chunk-6Z2NUJSX.js} +2 -2
- package/dist/{chunk-BWJLLNUX.js → chunk-7BNRHSSF.js} +2 -2
- package/dist/{chunk-JLODGGN2.js → chunk-7NNJXYXU.js} +2 -2
- package/dist/{chunk-FTTB64OJ.js → chunk-7SMVTA7I.js} +26 -26
- package/dist/{chunk-Z7KVOVE4.js → chunk-7WTFX6OA.js} +6 -3
- package/dist/{chunk-ZM27UI5O.js → chunk-A7Y32YD6.js} +2 -2
- package/dist/{chunk-FPRMP6YA.js → chunk-AHN2CVCH.js} +10 -7
- package/dist/{chunk-N6MZSBOL.js → chunk-AN7T6VP7.js} +2 -2
- package/dist/{chunk-F4X5NVKY.js → chunk-B6PVPAS5.js} +2 -2
- package/dist/{chunk-QI4Q5ZZH.js → chunk-BB2ORSTF.js} +19 -18
- package/dist/{chunk-HGFKDSKZ.js → chunk-BJB4YDJP.js} +21 -21
- package/dist/{chunk-BZQCAZZZ.js → chunk-BPM52K3Z.js} +41 -34
- package/dist/{chunk-HFCKU73Y.js → chunk-BSREARWG.js} +29 -28
- package/dist/{chunk-F4V67JXG.js → chunk-CTERZC4K.js} +2 -2
- package/dist/{chunk-FMZEU7MF.js → chunk-CYLSQO4L.js} +6 -6
- package/dist/{chunk-JLJ7SP4X.js → chunk-DCPD5SHV.js} +3 -3
- package/dist/{chunk-U7AO6FRL.js → chunk-ENDB5YSV.js} +363 -129
- package/dist/{chunk-RTTZIX34.js → chunk-EOB7XVYR.js} +2 -2
- package/dist/chunk-EPDBWATV.js +38 -0
- package/dist/{chunk-TPN7RJOM.js → chunk-FJADQOFQ.js} +3 -3
- package/dist/{chunk-MG3DE3VO.js → chunk-FLMXJMMY.js} +3 -3
- package/dist/{chunk-WGC42WJU.js → chunk-FWNJDD4U.js} +6 -2
- package/dist/{chunk-S5P5Z5Y5.js → chunk-GINNZHVN.js} +2 -2
- package/dist/{chunk-7EZ5AKBK.js → chunk-GJH7ZEPH.js} +45 -38
- package/dist/{chunk-E3BJVEMZ.js → chunk-GQEXY7XL.js} +68 -65
- package/dist/{chunk-COCMMQXW.js → chunk-HHHYVTVS.js} +16 -16
- package/dist/chunk-ICLB27PZ.js +11 -0
- package/dist/{chunk-QMFIZQTB.js → chunk-IDGQB6XD.js} +6 -4
- package/dist/{chunk-R3XI2VC7.js → chunk-IDJGV6VM.js} +2 -1
- package/dist/{chunk-4CRLM3IT.js → chunk-IE47TYZT.js} +177 -118
- package/dist/{chunk-FJ57274M.js → chunk-IIEI7VK5.js} +15 -1
- package/dist/{chunk-YDA46XHI.js → chunk-IMO46ROR.js} +38 -32
- package/dist/{chunk-4SXHMFFP.js → chunk-IZTU6WVR.js} +24 -13
- package/dist/{chunk-U74EGVOA.js → chunk-JOD2CK2M.js} +16 -14
- package/dist/{chunk-U5B3TUEW.js → chunk-JUNTVLOU.js} +16 -15
- package/dist/{chunk-RWFMOVHG.js → chunk-KAZQX2EY.js} +2 -2
- package/dist/{chunk-NHQ7HUAS.js → chunk-KGX5LIUG.js} +10 -8
- package/dist/{chunk-Q74GP3GK.js → chunk-KO6DGOOB.js} +3 -3
- package/dist/{chunk-UTTRJ6KN.js → chunk-L26M3X7K.js} +16 -13
- package/dist/{chunk-RU2HHHYA.js → chunk-LD2JSKU3.js} +12 -2
- package/dist/{chunk-32MOGTKT.js → chunk-LEBPWFVF.js} +50 -46
- package/dist/{chunk-MU3CJPJF.js → chunk-LGI735AJ.js} +2 -2
- package/dist/{chunk-OWVDD5EC.js → chunk-LMWXBFLA.js} +2 -2
- package/dist/{chunk-CLQJAGWL.js → chunk-M3LZCDB6.js} +40 -42
- package/dist/{chunk-YT5ICQ4R.js → chunk-MFK7LF66.js} +2 -2
- package/dist/{chunk-JL7BDLC6.js → chunk-MJYFPFZT.js} +110 -20
- package/dist/{chunk-2QRIMMIH.js → chunk-N56W4R66.js} +2 -2
- package/dist/{chunk-LXXVHLTH.js → chunk-NN5IDH2I.js} +2 -2
- package/dist/{chunk-46KVXDUJ.js → chunk-NS3KIRSW.js} +2 -2
- package/dist/{chunk-LM3HY3VG.js → chunk-P2DM7Q5U.js} +2 -2
- package/dist/{chunk-DJL5PO27.js → chunk-P4SQV3XD.js} +2 -2
- package/dist/{chunk-HOIAQ3P2.js → chunk-P54AX5XN.js} +9 -9
- package/dist/{chunk-JQ575OAK.js → chunk-P64NBPSK.js} +14 -14
- package/dist/{chunk-7G4XMHDB.js → chunk-PIWUZFG7.js} +33 -25
- package/dist/{chunk-SWEKCK34.js → chunk-QAPFXLAC.js} +2 -2
- package/dist/chunk-QFIXL3OK.js +68 -0
- package/dist/{chunk-KRTLS3G6.js → chunk-QVMV4KCA.js} +2 -2
- package/dist/{chunk-76LHNLGX.js → chunk-R4YGH7DJ.js} +5 -3
- package/dist/{chunk-PAW4RMH3.js → chunk-RC3FM3FE.js} +12 -13
- package/dist/{chunk-UJBP57UJ.js → chunk-RC6GGF6X.js} +2 -2
- package/dist/{chunk-S6OXNZBM.js → chunk-RHZZVIGA.js} +3 -3
- package/dist/{chunk-MS5574I7.js → chunk-RIXWLFB4.js} +2 -2
- package/dist/{chunk-BCB24FG7.js → chunk-RUNI4OXP.js} +18 -14
- package/dist/{chunk-ICVIJLBA.js → chunk-SFSJ6XWV.js} +2 -2
- package/dist/{chunk-EGXJWRO6.js → chunk-SNBEAO4Q.js} +8 -8
- package/dist/{chunk-XHROEQ23.js → chunk-SXD6VY7D.js} +16 -14
- package/dist/{chunk-GEURKGZS.js → chunk-TLM3I4XF.js} +16 -16
- package/dist/{chunk-IFC3JXCT.js → chunk-TO6TWNMF.js} +19 -15
- package/dist/{chunk-OUJG73YJ.js → chunk-U2JIFCJN.js} +18 -18
- package/dist/{chunk-CAPR5DET.js → chunk-U4ND3J6C.js} +18 -14
- package/dist/{chunk-YVDBBWEP.js → chunk-UCF6TKWV.js} +51 -48
- package/dist/{chunk-UWYZIGCB.js → chunk-UDYJVX6Y.js} +9 -9
- package/dist/{chunk-OBYZU23V.js → chunk-UQY2VLUK.js} +25 -23
- package/dist/{chunk-CQKD6GOC.js → chunk-VAA7QSZ7.js} +53 -32
- package/dist/{chunk-Q6BAFS7I.js → chunk-VQGQF7O7.js} +12 -10
- package/dist/{chunk-DEW62ON3.js → chunk-VSPNH7LC.js} +2 -2
- package/dist/{chunk-4YER7UCV.js → chunk-VUJQ6RU6.js} +2 -2
- package/dist/{chunk-C576CU77.js → chunk-VZD3ZV4Y.js} +26 -22
- package/dist/{chunk-NCT22MOD.js → chunk-WMIKC5XO.js} +2 -2
- package/dist/{chunk-C2WH3BMS.js → chunk-X326N4GN.js} +10 -7
- package/dist/chunk-XBJJP2HN.js +37 -0
- package/dist/{chunk-7NSNE52V.js → chunk-XCR3PDFF.js} +2 -2
- package/dist/{chunk-TF76LCZS.js → chunk-XDPJMLOH.js} +30 -27
- package/dist/{chunk-3LJNQ6LR.js → chunk-YKDZ3ZRI.js} +27 -25
- package/dist/{chunk-GLREDNBA.js → chunk-YVLTNNME.js} +12 -2
- package/dist/{chunk-76IBFEYW.js → chunk-ZGOBAMQ2.js} +15 -13
- package/dist/{chunk-AFR6GWXD.js → chunk-ZMCFUGKO.js} +49 -42
- package/dist/clock.js +11 -5
- package/dist/completion-registry.js +2 -2
- package/dist/countdown.js +26 -20
- package/dist/{d3--y67plmW.d.ts → d3-CQT5bwpb.d.ts} +1 -1
- package/dist/{dgmo-router-CY5j16Pl.d.ts → dgmo-router-C9CsswPZ.d.ts} +1 -1
- package/dist/{dgmo-router-A3LIHT6H.js → dgmo-router-XZNCLYTV.js} +30 -29
- package/dist/{dimensions-7NYBSZRJ.js → dimensions-SIZMZ4DC.js} +8 -8
- package/dist/{flowchart-renderer-QYGQ64BM.js → flowchart-renderer-FDJ4QQXE.js} +15 -14
- package/dist/index.d.ts +7 -7
- package/dist/index.js +58 -43
- package/dist/{layout-LAS67TK3.js → layout-5DZ2LI2R.js} +2 -2
- package/dist/{layout-ZAGUFT2G.js → layout-6I6LSBUR.js} +6 -5
- package/dist/{layout-2OJ25STS.js → layout-C2SCZV5M.js} +6 -5
- package/dist/{layout-6SKHNQYO.js → layout-CHWKNE3O.js} +3 -3
- package/dist/{layout-EM4DLMAX.js → layout-K4KML2DL.js} +3 -3
- package/dist/{layout-KQUSB45X.js → layout-S53FSD6R.js} +7 -6
- package/dist/{layout-ROORJQ4X.js → layout-TCFXB5XH.js} +7 -6
- package/dist/{layout-5ILNODTP.js → layout-XK6ZD7BU.js} +6 -5
- package/dist/{layout-B5GQVXXY.js → layout-YVY72CIG.js} +7 -6
- package/dist/{layout-VUZ3MLOI.js → layout-YY6VH5XH.js} +6 -5
- package/dist/{layout-RV2T2YTT.js → layout-ZDN252GR.js} +4 -3
- package/dist/{layout-search-UOKEMER5.js → layout-search-TSV4FURP.js} +7 -6
- package/dist/{legend-constants-PLN2YHGM.js → legend-constants-SB4PLHV5.js} +3 -3
- package/dist/{palettes-54YSI3IX.js → palettes-YIPSRYXP.js} +5 -3
- package/dist/{parser-GCVSRQPY.js → parser-2BX2EJUB.js} +3 -3
- package/dist/{parser-WVE6SKB7.js → parser-3UNIPVNY.js} +3 -3
- package/dist/{parser-5XFGK5C5.js → parser-4IHIVDJD.js} +5 -5
- package/dist/{parser-ZT3PU2HT.js → parser-62VNEQRT.js} +3 -3
- package/dist/{parser-PR3OR3LO.js → parser-6JNJHQAG.js} +3 -3
- package/dist/{parser-ZXQZZK6W.js → parser-6ZFQLLVE.js} +3 -2
- package/dist/{parser-WMJEPZDC.js → parser-BOPXE6RP.js} +3 -3
- package/dist/{parser-WWRRG2DV.js → parser-DFBQ2RID.js} +3 -3
- package/dist/{parser-2GMHFSTS.js → parser-EPKXJ2RL.js} +3 -3
- package/dist/{parser-ML3LVNDV.js → parser-G7E2BURB.js} +3 -3
- package/dist/{parser-QOIZGW7I.js → parser-GFGU5ZLQ.js} +3 -3
- package/dist/{parser-L7T7FY3H.js → parser-GKZWI5SZ.js} +3 -3
- package/dist/{parser-QYAIFXLP.js → parser-HSPODF4H.js} +3 -3
- package/dist/{parser-EQ4I3TSH.js → parser-IK3FXZ7D.js} +3 -3
- package/dist/{parser-LV7PQBUG.js → parser-LJWPKRDM.js} +3 -3
- package/dist/{parser-RDBXEVI4.js → parser-OYWUBQV4.js} +3 -3
- package/dist/{parser-6FUESG4N.js → parser-PD4TP6NM.js} +3 -3
- package/dist/{parser-E3OHNNTH.js → parser-R2JHC7LQ.js} +3 -3
- package/dist/{parser-CJNP7RKR.js → parser-RMZ6YI7H.js} +3 -3
- package/dist/{parser-TA5TYZNL.js → parser-RUJNN5PK.js} +3 -3
- package/dist/{parser-UTR5WE4O.js → parser-YWE7GHW6.js} +3 -3
- package/dist/{parser-3AOMUX5D.js → parser-Z5UK6ADF.js} +3 -3
- package/dist/{parser-YWQCC33R.js → parser-ZO5YT5SV.js} +3 -3
- package/dist/renderer-5TPUPMZ7.js +26 -0
- package/dist/{renderer-4EWGZLJ6.js → renderer-AIVALEQR.js} +7 -7
- package/dist/renderer-AMELXBNW.js +23 -0
- package/dist/renderer-BF7FYXG3.js +25 -0
- package/dist/renderer-CRRW7LTW.js +17 -0
- package/dist/renderer-CXU2MGSC.js +27 -0
- package/dist/renderer-DI66RLAG.js +30 -0
- package/dist/renderer-E2JTYQY5.js +39 -0
- package/dist/{renderer-ZAJ5353N.js → renderer-FA4BTAOL.js} +7 -7
- package/dist/{renderer-GF6S5ZX6.js → renderer-FFGFTIT4.js} +15 -14
- package/dist/renderer-IVAM7Z3Y.js +27 -0
- package/dist/renderer-J6HK2KOW.js +23 -0
- package/dist/renderer-J7J3OVLQ.js +39 -0
- package/dist/{renderer-QAMOXOZ2.js → renderer-JC7MK7SD.js} +6 -5
- package/dist/{renderer-CGOPX4HW.js → renderer-JHQC5RGJ.js} +14 -14
- package/dist/renderer-JRITSZY3.js +28 -0
- package/dist/{renderer-E6NHTVN6.js → renderer-KD5X4RIS.js} +14 -13
- package/dist/{renderer-OTHBTGBN.js → renderer-KWNNWCGD.js} +6 -5
- package/dist/{renderer-EP4GRCDX.js → renderer-LGMIAG6N.js} +7 -6
- package/dist/{renderer-IH45QV6Z.js → renderer-LQN3FXAP.js} +33 -32
- package/dist/renderer-LRL4SU43.js +29 -0
- package/dist/{renderer-D7N7PPB7.js → renderer-MBL64AJI.js} +6 -6
- package/dist/renderer-NA3DTAWF.js +39 -0
- package/dist/renderer-OR5QHR7X.js +31 -0
- package/dist/renderer-SBVWHQVW.js +30 -0
- package/dist/{renderer-KMOGGMM7.js → renderer-TLOSBJKW.js} +13 -13
- package/dist/{renderer-LE3ZKHNS.js → renderer-UDWJRRIC.js} +11 -11
- package/dist/renderer-VHK6UAW2.js +20 -0
- package/dist/{renderer-FUJNSC5X.js → renderer-W5UG2HWT.js} +5 -5
- package/dist/renderer-WOOKJOBQ.js +25 -0
- package/dist/renderer-WYNLGZRF.js +25 -0
- package/dist/{renderer-BUEFD2IF.js → renderer-Y74Y54C3.js} +8 -8
- package/dist/renderer-ZUAXGHFC.js +28 -0
- package/dist/renderer-radial-YVUDGR7C.js +21 -0
- package/dist/{state-parser-TPA67IXM.js → state-parser-CT5HQQ7E.js} +3 -3
- package/dist/state-renderer-7O3QGNJ5.js +41 -0
- package/dist/{tag-groups-DrHT2tEc.d.ts → tag-groups-BoJg3lFV.d.ts} +23 -1
- package/dist/{themes-GWhsabnx.d.ts → themes-CXYnNA4e.d.ts} +2 -2
- package/docs/architecture-report.md +3 -3
- package/docs/language-reference.md +122 -30
- package/docs/migration-sequence-color-to-tags.md +16 -8
- package/gallery/fixtures/sketch.dgmo +1 -1
- package/package.json +7 -6
- package/dist/charts-d3-SQEVMIAM.js +0 -29
- package/dist/chunk-LP7EC4MI.js +0 -16
- package/dist/chunk-UTCPNJND.js +0 -7
- package/dist/chunk-VV6HZQ5K.js +0 -40
- package/dist/renderer-3FB56573.js +0 -22
- package/dist/renderer-4PNVGHVA.js +0 -16
- package/dist/renderer-5W3HWIUL.js +0 -24
- package/dist/renderer-CO5O5VR5.js +0 -20
- package/dist/renderer-DKW273R7.js +0 -26
- package/dist/renderer-F24V3RD3.js +0 -26
- package/dist/renderer-F6WSR7UM.js +0 -39
- package/dist/renderer-FGGDZZFQ.js +0 -31
- package/dist/renderer-GJDVPXI3.js +0 -30
- package/dist/renderer-JMJ7Q5OC.js +0 -28
- package/dist/renderer-LBNVKVO3.js +0 -39
- package/dist/renderer-MUW4G2N6.js +0 -38
- package/dist/renderer-PIEPRK6M.js +0 -23
- package/dist/renderer-PKRKLOYR.js +0 -25
- package/dist/renderer-PR3KLNST.js +0 -28
- package/dist/renderer-RUHC6D3B.js +0 -25
- package/dist/renderer-UUP6OX6F.js +0 -27
- package/dist/renderer-UYZSP7MF.js +0 -25
- package/dist/renderer-XBL6CLN2.js +0 -30
- package/dist/renderer-radial-MZP3SVTZ.js +0 -21
- package/dist/state-renderer-UIE3AQM6.js +0 -40
|
@@ -5,18 +5,23 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
ScaleContext
|
|
7
7
|
} from "./chunk-24YPR5EH.js";
|
|
8
|
+
import {
|
|
9
|
+
EDGE_DASH,
|
|
10
|
+
GRID_DASH,
|
|
11
|
+
scaleDash
|
|
12
|
+
} from "./chunk-IIEI7VK5.js";
|
|
8
13
|
import {
|
|
9
14
|
createTooltip,
|
|
10
15
|
hideTooltip,
|
|
11
16
|
renderChartTitle,
|
|
12
17
|
showTooltip
|
|
13
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3XFOE3DQ.js";
|
|
14
19
|
import {
|
|
15
20
|
renderIntegratedLegend
|
|
16
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-67I3HFSF.js";
|
|
17
22
|
import {
|
|
18
23
|
FONT_FAMILY
|
|
19
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ICLB27PZ.js";
|
|
20
25
|
import {
|
|
21
26
|
LEGEND_CAPSULE_PAD,
|
|
22
27
|
LEGEND_DOT_R,
|
|
@@ -29,35 +34,33 @@ import {
|
|
|
29
34
|
legendChromeColors,
|
|
30
35
|
measureLegendText,
|
|
31
36
|
truncateLegendText
|
|
32
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MFK7LF66.js";
|
|
33
38
|
import {
|
|
34
39
|
parseTimelineDate
|
|
35
40
|
} from "./chunk-UCZBRGJN.js";
|
|
36
41
|
import {
|
|
37
42
|
resolveTagColor,
|
|
38
43
|
tagAttrKey
|
|
39
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-R4YGH7DJ.js";
|
|
45
|
+
import {
|
|
46
|
+
DEFAULT_PALETTE_ID,
|
|
47
|
+
getPalette
|
|
48
|
+
} from "./chunk-IDJGV6VM.js";
|
|
40
49
|
import {
|
|
50
|
+
getEraColors,
|
|
41
51
|
getSeriesColors,
|
|
42
52
|
mix,
|
|
43
53
|
shapeFill,
|
|
44
54
|
themeBaseBg
|
|
45
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-YVLTNNME.js";
|
|
46
56
|
|
|
47
57
|
// src/timeline/renderer.ts
|
|
48
58
|
import * as d3Scale from "d3-scale";
|
|
49
59
|
import * as d3Selection from "d3-selection";
|
|
50
|
-
function getEraColors(palette) {
|
|
51
|
-
return [
|
|
52
|
-
palette.colors.blue,
|
|
53
|
-
palette.colors.green,
|
|
54
|
-
palette.colors.yellow,
|
|
55
|
-
palette.colors.orange,
|
|
56
|
-
palette.colors.purple
|
|
57
|
-
];
|
|
58
|
-
}
|
|
59
60
|
function renderEras(g, eras, scale, isVertical, innerWidth, innerHeight, onEnter, onLeave, hasScale = false, _tooltip = null, palette, reservedLabelY, fillMode, outlineBg) {
|
|
60
|
-
const eraColors =
|
|
61
|
+
const eraColors = getEraColors(
|
|
62
|
+
palette ?? getPalette(DEFAULT_PALETTE_ID).light
|
|
63
|
+
);
|
|
61
64
|
eras.forEach((era, i) => {
|
|
62
65
|
const startVal = parseTimelineDate(era.startDate);
|
|
63
66
|
const endVal = parseTimelineDate(era.endDate);
|
|
@@ -84,7 +87,7 @@ function renderEras(g, eras, scale, isVertical, innerWidth, innerHeight, onEnter
|
|
|
84
87
|
applyEraFill(
|
|
85
88
|
eraG.append("rect").attr("x", 0).attr("y", y).attr("width", innerWidth).attr("height", h)
|
|
86
89
|
);
|
|
87
|
-
labelEl = eraG.append("text").attr("x", 6).attr("y", y + 18).attr("text-anchor", "start").attr("fill", color).attr("font-size",
|
|
90
|
+
labelEl = eraG.append("text").attr("x", 6).attr("y", y + 18).attr("text-anchor", "start").attr("fill", color).attr("font-size", 13).attr("font-weight", "bold").attr("opacity", 0.8).text(displayLabel);
|
|
88
91
|
} else {
|
|
89
92
|
const x = Math.min(start, end);
|
|
90
93
|
const w = Math.abs(end - start);
|
|
@@ -99,7 +102,7 @@ function renderEras(g, eras, scale, isVertical, innerWidth, innerHeight, onEnter
|
|
|
99
102
|
displayLabel = truncateLegendText(era.label, 13, maxW, { bold: true });
|
|
100
103
|
truncated = displayLabel !== era.label;
|
|
101
104
|
}
|
|
102
|
-
labelEl = eraG.append("text").attr("x", x + w / 2).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size",
|
|
105
|
+
labelEl = eraG.append("text").attr("x", x + w / 2).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size", 13).attr("font-weight", "bold").attr("opacity", 0.8).text(displayLabel);
|
|
103
106
|
}
|
|
104
107
|
eraG.on("mouseenter", function() {
|
|
105
108
|
onEnter(startVal, endVal);
|
|
@@ -135,8 +138,8 @@ function renderMarkers(g, markers, scale, isVertical, innerWidth, innerHeight, o
|
|
|
135
138
|
};
|
|
136
139
|
const markerG = g.append("g").attr("class", "tl-marker").attr("data-marker-date", String(dateVal)).attr("data-line-number", String(marker.lineNumber)).style("cursor", "pointer");
|
|
137
140
|
if (isVertical) {
|
|
138
|
-
markerG.append("line").attr("x1", 0).attr("y1", pos).attr("x2", innerWidth).attr("y2", pos).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
139
|
-
markerG.append("text").attr("x", -diamondSize - 8).attr("y", pos - diamondSize - 4).attr("text-anchor", "middle").attr("fill", color).attr("font-size",
|
|
141
|
+
markerG.append("line").attr("x1", 0).attr("y1", pos).attr("x2", innerWidth).attr("y2", pos).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray", EDGE_DASH).attr("opacity", lineOpacity);
|
|
142
|
+
markerG.append("text").attr("x", -diamondSize - 8).attr("y", pos - diamondSize - 4).attr("text-anchor", "middle").attr("fill", color).attr("font-size", 11).attr("font-weight", "bold").text(marker.label);
|
|
140
143
|
applyDiamondFill(
|
|
141
144
|
markerG.append("path").attr(
|
|
142
145
|
"d",
|
|
@@ -169,14 +172,14 @@ function renderMarkers(g, markers, scale, isVertical, innerWidth, innerHeight, o
|
|
|
169
172
|
});
|
|
170
173
|
truncated = displayLabel !== marker.label;
|
|
171
174
|
}
|
|
172
|
-
const labelEl = markerG.append("text").attr("x", pos).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size",
|
|
175
|
+
const labelEl = markerG.append("text").attr("x", pos).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size", 11).attr("font-weight", "bold").text(displayLabel);
|
|
173
176
|
applyDiamondFill(
|
|
174
177
|
markerG.append("path").attr(
|
|
175
178
|
"d",
|
|
176
179
|
`M${pos},${diamondY - diamondSize} l${diamondSize},${diamondSize} l-${diamondSize},${diamondSize} l-${diamondSize},-${diamondSize} Z`
|
|
177
180
|
)
|
|
178
181
|
);
|
|
179
|
-
markerG.append("line").attr("x1", pos).attr("y1", lineTop).attr("x2", pos).attr("y2", innerHeight).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
182
|
+
markerG.append("line").attr("x1", pos).attr("y1", lineTop).attr("x2", pos).attr("y2", innerHeight).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray", EDGE_DASH).attr("opacity", lineOpacity);
|
|
180
183
|
markerG.on("mouseenter", function() {
|
|
181
184
|
onEnter(dateVal);
|
|
182
185
|
if (truncated) labelEl.text(marker.label);
|
|
@@ -238,17 +241,17 @@ function renderTimeScale(g, scale, isVertical, innerWidth, innerHeight, textColo
|
|
|
238
241
|
const guideOpacity = 0.15;
|
|
239
242
|
for (const tick of ticks) {
|
|
240
243
|
if (isVertical) {
|
|
241
|
-
g.append("line").attr("x1", 0).attr("y1", tick.pos).attr("x2", innerWidth).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray",
|
|
244
|
+
g.append("line").attr("x1", 0).attr("y1", tick.pos).attr("x2", innerWidth).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray", GRID_DASH).attr("opacity", guideOpacity);
|
|
242
245
|
g.append("line").attr("x1", -tickLen).attr("y1", tick.pos).attr("x2", 0).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
243
|
-
g.append("text").attr("x", -tickLen - 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", textColor).attr("font-size",
|
|
246
|
+
g.append("text").attr("x", -tickLen - 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
244
247
|
g.append("line").attr("x1", innerWidth).attr("y1", tick.pos).attr("x2", innerWidth + tickLen).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
245
|
-
g.append("text").attr("x", innerWidth + tickLen + 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size",
|
|
248
|
+
g.append("text").attr("x", innerWidth + tickLen + 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
246
249
|
} else {
|
|
247
|
-
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", 0).attr("x2", tick.pos).attr("y2", innerHeight).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray",
|
|
250
|
+
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", 0).attr("x2", tick.pos).attr("y2", innerHeight).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray", GRID_DASH).attr("opacity", guideOpacity);
|
|
248
251
|
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", innerHeight).attr("x2", tick.pos).attr("y2", innerHeight + tickLen).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
249
|
-
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size",
|
|
252
|
+
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
250
253
|
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", -tickLen).attr("x2", tick.pos).attr("y2", 0).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
251
|
-
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size",
|
|
254
|
+
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
252
255
|
}
|
|
253
256
|
}
|
|
254
257
|
}
|
|
@@ -257,15 +260,15 @@ function showEventDatesOnScale(g, scale, startDate, endDate, innerHeight, accent
|
|
|
257
260
|
const tickLen = 6;
|
|
258
261
|
const startPos = scale(parseTimelineDate(startDate));
|
|
259
262
|
const startLabel = formatDateLabel(startDate);
|
|
260
|
-
g.append("line").attr("class", "tl-event-date").attr("x1", startPos).attr("y1", -tickLen).attr("x2", startPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
261
|
-
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
262
|
-
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
263
|
+
g.append("line").attr("class", "tl-event-date").attr("x1", startPos).attr("y1", -tickLen).attr("x2", startPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray", GRID_DASH).attr("opacity", 0.6);
|
|
264
|
+
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(startLabel);
|
|
265
|
+
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(startLabel);
|
|
263
266
|
if (endDate) {
|
|
264
267
|
const endPos = scale(parseTimelineDate(endDate));
|
|
265
268
|
const endLabel = formatDateLabel(endDate);
|
|
266
|
-
g.append("line").attr("class", "tl-event-date").attr("x1", endPos).attr("y1", -tickLen).attr("x2", endPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
267
|
-
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
268
|
-
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
269
|
+
g.append("line").attr("class", "tl-event-date").attr("x1", endPos).attr("y1", -tickLen).attr("x2", endPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray", GRID_DASH).attr("opacity", 0.6);
|
|
270
|
+
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(endLabel);
|
|
271
|
+
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(endLabel);
|
|
269
272
|
}
|
|
270
273
|
}
|
|
271
274
|
function hideEventDatesOnScale(g) {
|
|
@@ -296,7 +299,7 @@ function renderTimelineGroupLegend(g, groups, groupColorMap, textColor, palette,
|
|
|
296
299
|
const itemG = g.append("g").attr("class", "tl-legend-item").attr("data-group", grp.name).style("cursor", "pointer").on("mouseenter", () => onHover(grp.name)).on("mouseleave", () => onLeave());
|
|
297
300
|
itemG.append("rect").attr("x", legendX).attr("y", legendY - PILL_H / 2).attr("width", pillW).attr("height", PILL_H).attr("rx", PILL_H / 2).attr("fill", pillBg);
|
|
298
301
|
itemG.append("circle").attr("cx", legendX + PAD_X + DOT_R).attr("cy", legendY).attr("r", DOT_R).attr("fill", color);
|
|
299
|
-
itemG.append("text").attr("x", legendX + PAD_X + DOT_R * 2 + DOT_GAP).attr("y", legendY).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
302
|
+
itemG.append("text").attr("x", legendX + PAD_X + DOT_R * 2 + DOT_GAP).attr("y", legendY).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", FONT_SIZE).attr("font-family", FONT_FAMILY).text(grp.name);
|
|
300
303
|
legendX += pillW + GAP;
|
|
301
304
|
}
|
|
302
305
|
}
|
|
@@ -933,13 +936,13 @@ function renderTimelineHorizontalTimeSort(container, parsed, palette, isDark, se
|
|
|
933
936
|
}
|
|
934
937
|
evG.append("rect").attr("x", x).attr("y", y - sBarH / 2).attr("width", rectW).attr("height", sBarH).attr("rx", sBarRx).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", sBarStroke);
|
|
935
938
|
if (labelFitsInside) {
|
|
936
|
-
evG.append("text").attr("x", x + ctx.aesthetic(8)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size",
|
|
939
|
+
evG.append("text").attr("x", x + ctx.aesthetic(8)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
937
940
|
} else {
|
|
938
941
|
const sLabelGap = ctx.aesthetic(6);
|
|
939
942
|
const wouldFlipLeft = x + rectW > innerWidth * 0.6;
|
|
940
943
|
const labelFitsLeft = x - sLabelGap - estLabelWidth > 0;
|
|
941
944
|
const flipLeft = wouldFlipLeft && labelFitsLeft;
|
|
942
|
-
evG.append("text").attr("x", flipLeft ? x - sLabelGap : x + rectW + sLabelGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size",
|
|
945
|
+
evG.append("text").attr("x", flipLeft ? x - sLabelGap : x + rectW + sLabelGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
943
946
|
}
|
|
944
947
|
} else {
|
|
945
948
|
const estLabelWidth = ev.label.length * sCharW;
|
|
@@ -948,7 +951,7 @@ function renderTimelineHorizontalTimeSort(container, parsed, palette, isDark, se
|
|
|
948
951
|
const labelFitsLeft = x - sPointGap - estLabelWidth > 0;
|
|
949
952
|
const flipLeft = wouldFlipLeft && labelFitsLeft;
|
|
950
953
|
evG.append("circle").attr("cx", x).attr("cy", y).attr("r", sPointR).attr("fill", shapeFill(palette, color, isDark, { mode: fillMode })).attr("stroke", color).attr("stroke-width", sPointStroke);
|
|
951
|
-
evG.append("text").attr("x", flipLeft ? x - sPointGap : x + sPointGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size",
|
|
954
|
+
evG.append("text").attr("x", flipLeft ? x - sPointGap : x + sPointGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size", sEventFontSm).text(ev.label);
|
|
952
955
|
}
|
|
953
956
|
});
|
|
954
957
|
}
|
|
@@ -1118,7 +1121,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
1118
1121
|
g.append("rect").attr("class", "tl-group-header-bg").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", bandW).attr("height", bandH).attr("rx", sBandRx).attr("fill", shapeFill(palette, laneColor, isDark, { mode: fillMode })).style("pointer-events", "none");
|
|
1119
1122
|
g.append("rect").attr("class", "tl-group-header-accent").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", sBandAccentW).attr("height", bandH).attr("fill", laneColor).attr("clip-path", `url(#${clipId})`).style("pointer-events", "none");
|
|
1120
1123
|
const headerG = g.append("g").attr("class", "tl-group-header").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
1121
|
-
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size",
|
|
1124
|
+
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", sLaneHeaderFont).attr("font-weight", "bold").text(`${toggleIcon} ${lane.name}`);
|
|
1122
1125
|
if (lane.events.length > 0) {
|
|
1123
1126
|
const evDates = lane.events.map((ev) => parseTimelineDate(ev.date));
|
|
1124
1127
|
const evEndDates = lane.events.filter((ev) => ev.endDate).map((ev) => parseTimelineDate(ev.endDate));
|
|
@@ -1172,7 +1175,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
1172
1175
|
const evColor = eventColor(ev);
|
|
1173
1176
|
const isPoint = !ev.endDate;
|
|
1174
1177
|
const icon = isPoint ? "\u25C6" : "\u25CF";
|
|
1175
|
-
const labelEl = evG.append("text").attr("class", "tl-event-label").attr("x", -margin.left + ctx.aesthetic(20)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("font-size",
|
|
1178
|
+
const labelEl = evG.append("text").attr("class", "tl-event-label").attr("x", -margin.left + ctx.aesthetic(20)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("font-size", sEventFont).attr("fill", textColor);
|
|
1176
1179
|
labelEl.append("tspan").attr("fill", evColor).text(icon);
|
|
1177
1180
|
labelEl.append("tspan").attr("fill", textColor).text(" " + ev.label);
|
|
1178
1181
|
if (ev.endDate) {
|
|
@@ -1252,7 +1255,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1252
1255
|
const sEventFontSm = ctx.text(11);
|
|
1253
1256
|
const sDateFont = ctx.text(10);
|
|
1254
1257
|
const sLaneHeaderFont = ctx.text(12);
|
|
1255
|
-
const sDash =
|
|
1258
|
+
const sDash = scaleDash(GRID_DASH, (n) => ctx.structural(n));
|
|
1256
1259
|
const useGroupedVertical = tagLanes != null || timelineSort === "group" && timelineGroups.length > 0;
|
|
1257
1260
|
if (useGroupedVertical) {
|
|
1258
1261
|
let laneNames;
|
|
@@ -1356,7 +1359,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1356
1359
|
const laneColor = groupColorMap.get(laneName) ?? textColor;
|
|
1357
1360
|
const laneCenter = laneX + laneWidth / 2;
|
|
1358
1361
|
const headerG = g.append("g").attr("class", "tl-lane-header").attr("data-group", laneName).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, laneName)).on("mouseleave", () => fadeReset(g));
|
|
1359
|
-
headerG.append("text").attr("x", laneCenter).attr("y", -ctx.structural(15)).attr("text-anchor", "middle").attr("fill", laneColor).attr("font-size",
|
|
1362
|
+
headerG.append("text").attr("x", laneCenter).attr("y", -ctx.structural(15)).attr("text-anchor", "middle").attr("fill", laneColor).attr("font-size", sLaneHeaderFont).attr("font-weight", "bold").text(laneName);
|
|
1360
1363
|
g.append("line").attr("x1", laneCenter).attr("y1", 0).attr("x2", laneCenter).attr("y2", innerHeight).attr("stroke", mutedColor).attr("stroke-width", 1).attr("stroke-dasharray", sDash);
|
|
1361
1364
|
const laneEvents = laneEventsByName.get(laneName) ?? [];
|
|
1362
1365
|
for (const ev of laneEvents) {
|
|
@@ -1406,13 +1409,13 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1406
1409
|
stroke = `url(#${strokeGradientId})`;
|
|
1407
1410
|
}
|
|
1408
1411
|
evG.append("rect").attr("x", laneCenter - sBarW / 2).attr("y", y).attr("width", sBarW).attr("height", rectH).attr("rx", sBarRx).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", sBarStroke);
|
|
1409
|
-
evG.append("text").attr("x", laneCenter + sBarW + ctx.aesthetic(2)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1412
|
+
evG.append("text").attr("x", laneCenter + sBarW + ctx.aesthetic(2)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
1410
1413
|
} else {
|
|
1411
1414
|
evG.append("circle").attr("cx", laneCenter).attr("cy", y).attr("r", sPointR).attr(
|
|
1412
1415
|
"fill",
|
|
1413
1416
|
shapeFill(palette, evColor, isDark, { mode: fillMode })
|
|
1414
1417
|
).attr("stroke", evColor).attr("stroke-width", sPointStroke);
|
|
1415
|
-
evG.append("text").attr("x", laneCenter + ctx.aesthetic(10)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1418
|
+
evG.append("text").attr("x", laneCenter + ctx.aesthetic(10)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
1416
1419
|
}
|
|
1417
1420
|
}
|
|
1418
1421
|
});
|
|
@@ -1547,10 +1550,10 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1547
1550
|
stroke = `url(#${strokeGradientId})`;
|
|
1548
1551
|
}
|
|
1549
1552
|
evG.append("rect").attr("x", axisX - sBarW / 2).attr("y", y).attr("width", sBarW).attr("height", rectH).attr("rx", sBarRx).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", sBarStroke);
|
|
1550
|
-
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1553
|
+
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFontSm).text(ev.label);
|
|
1551
1554
|
} else {
|
|
1552
1555
|
evG.append("circle").attr("cx", axisX).attr("cy", y).attr("r", sPointR).attr("fill", shapeFill(palette, color, isDark, { mode: fillMode })).attr("stroke", color).attr("stroke-width", sPointStroke);
|
|
1553
|
-
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1556
|
+
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFontSm).text(ev.label);
|
|
1554
1557
|
}
|
|
1555
1558
|
evG.append("text").attr("x", axisX - ctx.aesthetic(14)).attr(
|
|
1556
1559
|
"y",
|
|
@@ -1558,7 +1561,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1558
1561
|
yScale(parseTimelineDate(ev.endDate)) - yScale(parseTimelineDate(ev.date)),
|
|
1559
1562
|
4
|
|
1560
1563
|
) / 2 : y
|
|
1561
|
-
).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", mutedColor).attr("font-size",
|
|
1564
|
+
).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", mutedColor).attr("font-size", sDateFont).text(ev.date + (ev.endDate ? `\u2192${ev.endDate}` : ""));
|
|
1562
1565
|
}
|
|
1563
1566
|
}
|
|
1564
1567
|
}
|
|
@@ -1672,4 +1675,4 @@ export {
|
|
|
1672
1675
|
formatDateLabel,
|
|
1673
1676
|
renderTimeline
|
|
1674
1677
|
};
|
|
1675
|
-
//# sourceMappingURL=chunk-
|
|
1678
|
+
//# sourceMappingURL=chunk-UCF6TKWV.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
wrapDescriptionLines
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WMIKC5XO.js";
|
|
4
4
|
import {
|
|
5
5
|
renderInlineText
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWNJDD4U.js";
|
|
7
7
|
import {
|
|
8
8
|
ScaleContext
|
|
9
9
|
} from "./chunk-24YPR5EH.js";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
TITLE_FONT_SIZE,
|
|
12
12
|
TITLE_FONT_WEIGHT,
|
|
13
13
|
TITLE_Y
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VSPNH7LC.js";
|
|
15
15
|
import {
|
|
16
16
|
FONT_FAMILY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ICLB27PZ.js";
|
|
18
18
|
import {
|
|
19
19
|
CHAR_WIDTH_RATIO,
|
|
20
20
|
measureText
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
contrastText,
|
|
27
27
|
getSeriesColors,
|
|
28
28
|
shapeFill
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YVLTNNME.js";
|
|
30
30
|
import {
|
|
31
31
|
resolveColor
|
|
32
32
|
} from "./chunk-XOGQY4EC.js";
|
|
@@ -144,7 +144,7 @@ function renderPyramid(container, parsed, palette, isDark, onClickItem, exportDi
|
|
|
144
144
|
);
|
|
145
145
|
const labelFitsInside = Math.min(topHalf, botHalf) * 2 > measureText(layer.label, layout.labelFont, { bold: true });
|
|
146
146
|
const haloColor = textColor === palette.textOnFillLight ? palette.textOnFillDark : palette.textOnFillLight;
|
|
147
|
-
const labelText = layerG.append("text").attr("x", layout.pyramidCx).attr("y", midY).attr("dy", "0.35em").attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", layout.labelFont).attr("font-weight",
|
|
147
|
+
const labelText = layerG.append("text").attr("x", layout.pyramidCx).attr("y", midY).attr("dy", "0.35em").attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", layout.labelFont).attr("font-weight", "bold");
|
|
148
148
|
if (!labelFitsInside) {
|
|
149
149
|
labelText.attr("paint-order", "stroke fill").attr("stroke", haloColor).attr("stroke-width", 3).attr("stroke-linejoin", "round").attr("stroke-opacity", 0.6);
|
|
150
150
|
}
|
|
@@ -406,9 +406,9 @@ function renderDescriptionVariant(args) {
|
|
|
406
406
|
const y = startY + j * descLineHeight;
|
|
407
407
|
const isBullet = line.kind === "bullet-first" || line.kind === "bullet-cont";
|
|
408
408
|
if (line.kind === "bullet-first") {
|
|
409
|
-
descG.append("text").attr("x", bulletColLeftX).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", descFont).attr("font-weight",
|
|
409
|
+
descG.append("text").attr("x", bulletColLeftX).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", descFont).attr("font-weight", "normal").text("\u2022");
|
|
410
410
|
}
|
|
411
|
-
const t = descG.append("text").attr("x", isBullet ? bulletColLeftX + BULLET_BODY_INDENT : textX).attr("y", y).attr("dy", "0.35em").attr("text-anchor", isBullet ? "start" : textAnchor).attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", descFont).attr("font-weight",
|
|
411
|
+
const t = descG.append("text").attr("x", isBullet ? bulletColLeftX + BULLET_BODY_INDENT : textX).attr("y", y).attr("dy", "0.35em").attr("text-anchor", isBullet ? "start" : textAnchor).attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", descFont).attr("font-weight", "normal");
|
|
412
412
|
renderInlineText(t, line.text, palette);
|
|
413
413
|
}
|
|
414
414
|
}
|
|
@@ -428,4 +428,4 @@ export {
|
|
|
428
428
|
renderPyramid,
|
|
429
429
|
renderPyramidForExport
|
|
430
430
|
};
|
|
431
|
-
//# sourceMappingURL=chunk-
|
|
431
|
+
//# sourceMappingURL=chunk-UDYJVX6Y.js.map
|
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
import {
|
|
2
|
-
edgeSplinePath
|
|
3
|
-
|
|
4
|
-
} from "./chunk-7IATMZSA.js";
|
|
2
|
+
edgeSplinePath
|
|
3
|
+
} from "./chunk-26EVL454.js";
|
|
5
4
|
import {
|
|
6
5
|
layoutGraph
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
appendArrowheadMarkers
|
|
10
|
-
} from "./chunk-LP7EC4MI.js";
|
|
6
|
+
} from "./chunk-AN7T6VP7.js";
|
|
11
7
|
import {
|
|
12
8
|
NOTE_BADGE_RADIUS,
|
|
13
9
|
noteConnectorPoints,
|
|
14
10
|
renderNoteBadge,
|
|
15
11
|
renderNoteBox,
|
|
16
12
|
renderNoteConnector
|
|
17
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KO6DGOOB.js";
|
|
18
14
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
appendArrowheadMarkers
|
|
16
|
+
} from "./chunk-XBJJP2HN.js";
|
|
17
|
+
import {
|
|
18
|
+
fitDiagramToCanvas
|
|
19
|
+
} from "./chunk-EPDBWATV.js";
|
|
23
20
|
import {
|
|
24
21
|
ScaleContext
|
|
25
22
|
} from "./chunk-24YPR5EH.js";
|
|
23
|
+
import {
|
|
24
|
+
ARROWHEAD_HEIGHT,
|
|
25
|
+
ARROWHEAD_WIDTH,
|
|
26
|
+
EDGE_LABEL_KNOCKOUT_OPACITY,
|
|
27
|
+
EDGE_STROKE_WIDTH,
|
|
28
|
+
NODE_STROKE_WIDTH
|
|
29
|
+
} from "./chunk-IIEI7VK5.js";
|
|
26
30
|
import {
|
|
27
31
|
serializeSvg
|
|
28
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-LD2JSKU3.js";
|
|
29
33
|
import {
|
|
30
34
|
TITLE_FONT_SIZE,
|
|
31
35
|
TITLE_FONT_WEIGHT,
|
|
32
36
|
TITLE_Y
|
|
33
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-VSPNH7LC.js";
|
|
34
38
|
import {
|
|
35
39
|
FONT_FAMILY
|
|
36
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-ICLB27PZ.js";
|
|
37
41
|
import {
|
|
38
42
|
measureText
|
|
39
43
|
} from "./chunk-MTGGOCND.js";
|
|
@@ -46,7 +50,7 @@ import {
|
|
|
46
50
|
import {
|
|
47
51
|
contrastText,
|
|
48
52
|
shapeFill
|
|
49
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-YVLTNNME.js";
|
|
50
54
|
|
|
51
55
|
// src/graph/flowchart-renderer.ts
|
|
52
56
|
import * as d3Selection from "d3-selection";
|
|
@@ -54,8 +58,6 @@ var DIAGRAM_PADDING = 20;
|
|
|
54
58
|
var MAX_SCALE = 3;
|
|
55
59
|
var NODE_FONT_SIZE = 13;
|
|
56
60
|
var EDGE_LABEL_FONT_SIZE = 11;
|
|
57
|
-
var ARROWHEAD_W = 10;
|
|
58
|
-
var ARROWHEAD_H = 7;
|
|
59
61
|
var IO_SKEW = 15;
|
|
60
62
|
var SUBROUTINE_INSET = 8;
|
|
61
63
|
var DOC_WAVE_HEIGHT = 10;
|
|
@@ -318,8 +320,8 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
318
320
|
const sEdgeLabelFontSize = ctx.text(EDGE_LABEL_FONT_SIZE);
|
|
319
321
|
const sEdgeStrokeWidth = ctx.structural(EDGE_STROKE_WIDTH);
|
|
320
322
|
const sNodeStrokeWidth = ctx.structural(NODE_STROKE_WIDTH);
|
|
321
|
-
const sArrowheadW = ctx.structural(
|
|
322
|
-
const sArrowheadH = ctx.structural(
|
|
323
|
+
const sArrowheadW = ctx.structural(ARROWHEAD_WIDTH);
|
|
324
|
+
const sArrowheadH = ctx.structural(ARROWHEAD_HEIGHT);
|
|
323
325
|
const sIoSkew = ctx.structural(IO_SKEW);
|
|
324
326
|
const sSubroutineInset = ctx.structural(SUBROUTINE_INSET);
|
|
325
327
|
const sDocWaveHeight = ctx.structural(DOC_WAVE_HEIGHT);
|
|
@@ -327,7 +329,7 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
327
329
|
const titleHeight = showTitle ? 40 : 0;
|
|
328
330
|
const diagramW = layout.width;
|
|
329
331
|
const diagramH = layout.height;
|
|
330
|
-
const { scale, offsetX, offsetY, canvasHeight } = fitDiagramToCanvas({
|
|
332
|
+
const { scale, offsetX, offsetY, canvasHeight, canvasWidth } = fitDiagramToCanvas({
|
|
331
333
|
width,
|
|
332
334
|
height,
|
|
333
335
|
diagramW,
|
|
@@ -337,7 +339,7 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
337
339
|
maxScale: MAX_SCALE,
|
|
338
340
|
exportMode: !!exportDims
|
|
339
341
|
});
|
|
340
|
-
const svg = d3Selection.select(container).append("svg").attr("width",
|
|
342
|
+
const svg = d3Selection.select(container).append("svg").attr("width", canvasWidth).attr("height", canvasHeight).attr("viewBox", `0 0 ${canvasWidth} ${canvasHeight}`).attr("preserveAspectRatio", "xMidYMin meet").style("font-family", FONT_FAMILY);
|
|
341
343
|
if (ctx.isBelowFloor) {
|
|
342
344
|
svg.attr("width", "100%");
|
|
343
345
|
}
|
|
@@ -586,4 +588,4 @@ export {
|
|
|
586
588
|
renderFlowchart,
|
|
587
589
|
renderFlowchartForExport
|
|
588
590
|
};
|
|
589
|
-
//# sourceMappingURL=chunk-
|
|
591
|
+
//# sourceMappingURL=chunk-UQY2VLUK.js.map
|