@cardenelabs/cdl 0.38.0 → 0.40.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/CHANGELOG.md CHANGED
@@ -5,6 +5,47 @@ CDL (Chainome Diagram Language) の主要変更履歴。
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.40.0] - 2026-09-07
9
+
10
+ ### Added
11
+
12
+ - **100 個の印も段の `draw` で 1 個ずつ埋まるようにした** (#719)
13
+
14
+ `chart-waffle` は上の行から左詰めで印を配る図なので、埋まる順もそのまま読む向きになる。
15
+
16
+ **切り抜きでは表せない**。 弧の 3 種 (#715) は切り抜きで隠したが、この図に当てると
17
+ 升の途中が斜めや半分で切れる = 1 個 = 1% の印が半分だけ出て、数えられない図になる。
18
+
19
+ 代わりに **塗りだけを変える**。 印は 100 個とも最初から描き、進みまで届いていない印を
20
+ 持ち主のいない印と同じ地の色にする。 升の位置と大きさ、`data-cdl-waffle-owner` の
21
+ 持ち主の欄はどちらも進みで変わらない。
22
+
23
+ 左の一覧 (名前と印の数) は最初から全部出す。 この図は「数えて確かめられる」 ことが
24
+ 存在理由で、一覧はその答え合わせの表になる。
25
+
26
+ これで図表で動きを持たないのは 指標 (`chart-stat`) と 四象限 (`quadrant-matrix`) の
27
+ 2 つになった。 どちらも長さも順序も持たないため対象外のまま。
28
+
29
+ ## [0.39.0] - 2026-09-07
30
+
31
+ ### Added
32
+
33
+ - **弧と帯で量を表す 3 種も段の `draw` で起点から現れるようにした** (#715)
34
+
35
+ 半円ゲージ (`chart-gauge`) は 9 時から上を通って 3 時へ弧が伸び、放射 (`chart-radial`) は
36
+ 各輪が 12 時から時計回りに開き、積層帯 (`chart-stacked-bar`) は左から帯が伸びる。
37
+
38
+ どれも「量を長さで表す」 図なので、起点と伸びる向きが図の意味から決まる。 それまで
39
+ `draw` が効く種別は 9 つで、この 3 種は書いても何も起きなかった (実測で 6 秒間、
40
+ 半円ゲージの弧の `d` が一度も変わらなかった)。 見本帳に並べると動く図と動かない図が混ざる。
41
+
42
+ **切り抜くのは量を表す形だけ**。 放射の軌道 (全周の薄い輪) は「あとどれだけで一周か」 を
43
+ 示す枠なので最初から出す。 半円ゲージの合計の字は主役なので、左から半分ずつ現れると読めない。
44
+ 積層帯の区画の字だけは区画と一緒に切り抜く (字は区画の上に乗っているため)。
45
+
46
+ 形を表す属性は今までどおり触らない。 弧の `d` と区画の `width` は進みに関わらず実値で、
47
+ 見える範囲だけが変わる。 `draw` を書かない図の絵は 1 文字も変わらない。
48
+
8
49
  ## [0.38.0] - 2026-09-07
9
50
 
10
51
  ### Fixed
@@ -1740,7 +1781,9 @@ Initial OSS release.
1740
1781
  使わない = annotated tag を push しても GitHub Release は作られず、 Release を作っていない版で
1741
1782
  行き止まりになる。
1742
1783
 
1743
- [Unreleased]: https://github.com/cardene777/cdl/compare/v0.38.0...HEAD
1784
+ [Unreleased]: https://github.com/cardene777/cdl/compare/v0.40.0...HEAD
1785
+ [0.40.0]: https://github.com/cardene777/cdl/compare/v0.39.0...v0.40.0
1786
+ [0.39.0]: https://github.com/cardene777/cdl/compare/v0.38.0...v0.39.0
1744
1787
  [0.38.0]: https://github.com/cardene777/cdl/compare/v0.37.0...v0.38.0
1745
1788
  [0.37.0]: https://github.com/cardene777/cdl/compare/v0.36.0...v0.37.0
1746
1789
  [0.36.0]: https://github.com/cardene777/cdl/compare/v0.35.0...v0.36.0
package/SPEC.md CHANGED
@@ -140,11 +140,16 @@ phase でも線を引き直すことになる。
140
140
  | `chart-line` | 左端 | 線が右へ伸びる | 点と数字は線の先が届いた時 |
141
141
  | `chart-bar` | 横軸 | 棒が上へ伸びる | 数字は棒の頭に付いて動く |
142
142
  | `chart-pie` | 12 時 | 扇が時計回りに開く | 凡例はその扇が開き始めた時 |
143
+ | `chart-slope` | 左の軸 | 線が右の軸へ伸びる | 右の値は線が右の軸に着いた時 |
143
144
  | `journey-map` | 左端 | 気持ちの線が右へ伸びる | 段はその点に線の先が届いた時 |
144
145
  | `mind-map` | 中心 | 枝が段ごとに外へ伸びる | 箱はその枝が届いた時 |
145
146
  | `tree-hierarchy` | 根 | 枝が段ごとに下へ伸びる | 箱はその枝が届いた時 |
146
147
  | `gantt-timeline` | 各帯の始端 | 帯が右へ伸びる | 依存の矢印は帯が出揃った時 |
147
148
  | `funnel-stages` | 上端 | 段が上から順に積まれる | 件数と離脱率はその段が出切った時 |
149
+ | `chart-gauge` | 9 時 | 弧が上を通って 3 時へ伸びる | 合計と内訳は最初から出る |
150
+ | `chart-radial` | 12 時 | 各輪が時計回りに開く | 軌道と一覧は最初から出る |
151
+ | `chart-stacked-bar` | 左端 | 帯が右へ伸びる | 区画の字はその区画が広がった時 |
152
+ | `chart-waffle` | 左上 | 印が読む向きに 1 個ずつ埋まる | 一覧は最初から出る |
148
153
 
149
154
  対応種別の一覧は `validate.ts` の `DRAW_KINDS` が持ち、 知らせの文面もそこから組み立てる。
150
155
 
@@ -155,7 +160,8 @@ phase でも線を引き直すことになる。
155
160
 
156
161
  **枝が複数ある種別は段ごとに順に伸ばす** (`mind-map` / `tree-hierarchy`)。 深さを等分し、
157
162
  中心 / 根に近い段から順に伸ばす。 全部を同時に伸ばすと、離れた枝が宙に浮いたまま伸びる。
158
- 進みの畳み方と dash の当て方は `kinds/draw-progress.ts` が SSOT。
163
+ 進みの畳み方と dash の当て方は `kinds/draw-progress.ts` が、 弧で量を表す図の切り抜きは
164
+ `kinds/draw-arc.tsx` が SSOT。
159
165
 
160
166
  `draw` を書かない図は従来どおり全体を描き、 DOM に属性も要素も足さない。
161
167
 
package/dist/index.cjs CHANGED
@@ -20808,7 +20808,11 @@ var DRAW_KINDS = /* @__PURE__ */ new Set([
20808
20808
  "mind-map",
20809
20809
  "tree-hierarchy",
20810
20810
  "gantt-timeline",
20811
- "funnel-stages"
20811
+ "funnel-stages",
20812
+ "chart-gauge",
20813
+ "chart-radial",
20814
+ "chart-stacked-bar",
20815
+ "chart-waffle"
20812
20816
  ]);
20813
20817
  var KINDS = new Set(NODE_KINDS);
20814
20818
  var ENG_BANNED = /\b(FUNCTION|STORAGE|EVENT LOG|BALANCES MAPPING|READ|WRITE|EMIT|CALL)\b/;
@@ -24354,6 +24358,15 @@ function interpolateColor(template, stateValues, fallback) {
24354
24358
  if (!template) return fallback;
24355
24359
  return interpolate(template, stateValues);
24356
24360
  }
24361
+ function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D, \u8D77\u70B9 = -Math.PI / 2, \u5168\u5468 = Math.PI * 2) {
24362
+ if (\u958B\u304D <= 0) return null;
24363
+ if (\u958B\u304D >= 1 && \u5168\u5468 >= Math.PI * 2) return /* @__PURE__ */ jsxRuntime.jsx("circle", { cx, cy, r });
24364
+ const a0 = \u8D77\u70B9;
24365
+ const a1 = a0 + Math.min(1, \u958B\u304D) * \u5168\u5468;
24366
+ const large = a1 - a0 > Math.PI ? 1 : 0;
24367
+ const d = `M ${cx} ${cy} L ${cx + r * Math.cos(a0)} ${cy + r * Math.sin(a0)} A ${r} ${r} 0 ${large} 1 ${cx + r * Math.cos(a1)} ${cy + r * Math.sin(a1)} Z`;
24368
+ return /* @__PURE__ */ jsxRuntime.jsx("path", { d });
24369
+ }
24357
24370
 
24358
24371
  // src/kinds/chart-number.ts
24359
24372
  function \u5B9F\u5024\u8868\u8A18(v) {
@@ -24801,15 +24814,6 @@ function \u8F2A\u306E\u9053(cx, cy, R, r, a0, a1) {
24801
24814
  const large = a1 - a0 > Math.PI ? 1 : 0;
24802
24815
  return `M ${cx + R * Math.cos(a0)} ${cy + R * Math.sin(a0)} A ${R} ${R} 0 ${large} 1 ${cx + R * Math.cos(a1)} ${cy + R * Math.sin(a1)} L ${cx + r * Math.cos(a1)} ${cy + r * Math.sin(a1)} A ${r} ${r} 0 ${large} 0 ${cx + r * Math.cos(a0)} ${cy + r * Math.sin(a0)} Z`;
24803
24816
  }
24804
- function \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, r, \u958B\u304D) {
24805
- if (\u958B\u304D <= 0) return null;
24806
- if (\u958B\u304D >= 1) return /* @__PURE__ */ jsxRuntime.jsx("circle", { cx, cy, r });
24807
- const a0 = -Math.PI / 2;
24808
- const a1 = a0 + \u958B\u304D * Math.PI * 2;
24809
- const large = \u958B\u304D > 0.5 ? 1 : 0;
24810
- const d = `M ${cx} ${cy} L ${cx + r * Math.cos(a0)} ${cy + r * Math.sin(a0)} A ${r} ${r} 0 ${large} 1 ${cx + r * Math.cos(a1)} ${cy + r * Math.sin(a1)} Z`;
24811
- return /* @__PURE__ */ jsxRuntime.jsx("path", { d });
24812
- }
24813
24817
  function sliceColor(tone, idx) {
24814
24818
  if (tone) return TONE[tone];
24815
24819
  return chartSeriesColor(idx);
@@ -24817,7 +24821,9 @@ function sliceColor(tone, idx) {
24817
24821
  function ChartGaugeNode({
24818
24822
  node,
24819
24823
  active,
24820
- stateValues = {}
24824
+ stateValues = {},
24825
+ drawing = false,
24826
+ progress = 1
24821
24827
  }) {
24822
24828
  const x0 = node.cx - node.w / 2;
24823
24829
  const y0 = node.cy - node.h / 2;
@@ -24862,6 +24868,21 @@ function ChartGaugeNode({
24862
24868
  const \u898B\u51FA\u3057\u306E\u7D1A = Math.max(9, Math.round(\u5408\u8A08\u306E\u7D1A * 0.38));
24863
24869
  const \u5185\u8A33\u306E\u5E45 = \u4F7F\u3048\u308B\u5E452 / Math.max(data.length, 1);
24864
24870
  const \u5185\u8A33\u306Ey = cy + \u5F27\u3068\u5185\u8A33\u306E\u9593;
24871
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
24872
+ const \u5207\u308A\u629C\u304Did = `cdl-gauge-draw-${react.useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
24873
+ const \u5F27\u305F\u3061 = slices.map((s, idx) => /* @__PURE__ */ jsxRuntime.jsx(
24874
+ "path",
24875
+ {
24876
+ "data-cdl-role": "chart-gauge-arc",
24877
+ "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
24878
+ d: s.path,
24879
+ fill: arcColor(s.d.tone, idx),
24880
+ stroke: "var(--cdl-node-fill, #ffffff)",
24881
+ strokeWidth: 3,
24882
+ strokeLinejoin: "round"
24883
+ },
24884
+ `arc-${idx}`
24885
+ ));
24865
24886
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
24866
24887
  /* @__PURE__ */ jsxRuntime.jsx(
24867
24888
  "rect",
@@ -24877,19 +24898,8 @@ function ChartGaugeNode({
24877
24898
  strokeWidth: active ? 3 : 1.25
24878
24899
  }
24879
24900
  ),
24880
- slices.map((s, idx) => /* @__PURE__ */ jsxRuntime.jsx(
24881
- "path",
24882
- {
24883
- "data-cdl-role": "chart-gauge-arc",
24884
- "data-cdl-unresolved": s.d.unresolved ? "true" : void 0,
24885
- d: s.path,
24886
- fill: arcColor(s.d.tone, idx),
24887
- stroke: "var(--cdl-node-fill, #ffffff)",
24888
- strokeWidth: 3,
24889
- strokeLinejoin: "round"
24890
- },
24891
- `arc-${idx}`
24892
- )),
24901
+ drawing && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(cx, cy, radius + 2, \u4F38\u3073, Math.PI, Math.PI) }) }),
24902
+ drawing ? /* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u5F27\u305F\u3061 }) : \u5F27\u305F\u3061,
24893
24903
  /* @__PURE__ */ jsxRuntime.jsx(
24894
24904
  "text",
24895
24905
  {
@@ -24954,7 +24964,9 @@ function arcColor(tone, idx) {
24954
24964
  function ChartRadialNode({
24955
24965
  node,
24956
24966
  active,
24957
- stateValues = {}
24967
+ stateValues = {},
24968
+ drawing = false,
24969
+ progress = 1
24958
24970
  }) {
24959
24971
  const x0 = node.cx - node.w / 2;
24960
24972
  const y0 = node.cy - node.h / 2;
@@ -24993,6 +25005,20 @@ function ChartRadialNode({
24993
25005
  };
24994
25006
  });
24995
25007
  const \u4E00\u89A7\u306E\u59CB\u307E\u308A = PAD + (\u4F7F\u3048\u308B\u9AD8\u3055 - \u884C\u306E\u9AD8\u3055 * data.length) / 2 + \u884C\u306E\u9AD8\u3055 / 2;
25008
+ const \u958B\u304D = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
25009
+ const \u5207\u308A\u629C\u304Did = `cdl-radial-draw-${react.useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
25010
+ const \u53D6\u308A\u5206\u305F\u3061 = rings.map(
25011
+ (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsxRuntime.jsx(
25012
+ "path",
25013
+ {
25014
+ "data-cdl-role": "chart-radial-arc",
25015
+ "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
25016
+ d: r.\u53D6\u308A\u5206,
25017
+ fill: arcColor2(r.d.tone, idx)
25018
+ },
25019
+ `arc-${idx}`
25020
+ )
25021
+ );
24996
25022
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
24997
25023
  /* @__PURE__ */ jsxRuntime.jsx(
24998
25024
  "rect",
@@ -25018,18 +25044,8 @@ function ChartRadialNode({
25018
25044
  },
25019
25045
  `track-${idx}`
25020
25046
  )),
25021
- rings.map(
25022
- (r, idx) => r.\u53D6\u308A\u5206 === null ? null : /* @__PURE__ */ jsxRuntime.jsx(
25023
- "path",
25024
- {
25025
- "data-cdl-role": "chart-radial-arc",
25026
- "data-cdl-unresolved": r.d.unresolved ? "true" : void 0,
25027
- d: r.\u53D6\u308A\u5206,
25028
- fill: arcColor2(r.d.tone, idx)
25029
- },
25030
- `arc-${idx}`
25031
- )
25032
- ),
25047
+ drawing && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: \u6247\u5F62\u306E\u5207\u308A\u629C\u304D(\u5F27\u306Ecx, cy, \u5916\u534A\u5F84 + \u5E2F\u306E\u5E45, \u958B\u304D) }) }),
25048
+ drawing ? /* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u53D6\u308A\u5206\u305F\u3061 }) : \u53D6\u308A\u5206\u305F\u3061,
25033
25049
  data.map((d, idx) => {
25034
25050
  const y = \u4E00\u89A7\u306E\u59CB\u307E\u308A + \u884C\u306E\u9AD8\u3055 * idx;
25035
25051
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { "data-cdl-role": "chart-radial-item", children: [
@@ -25247,7 +25263,9 @@ function \u5370\u306E\u5272\u4ED8(\u5024) {
25247
25263
  function ChartWaffleNode({
25248
25264
  node,
25249
25265
  active,
25250
- stateValues = {}
25266
+ stateValues = {},
25267
+ drawing = false,
25268
+ progress = 1
25251
25269
  }) {
25252
25270
  const x0 = node.cx - node.w / 2;
25253
25271
  const y0 = node.cy - node.h / 2;
@@ -25276,6 +25294,7 @@ function ChartWaffleNode({
25276
25294
  \u914D\u5206.forEach((n, idx) => {
25277
25295
  for (let k = 0; k < n; k++) \u6301\u3061\u4E3B.push(idx);
25278
25296
  });
25297
+ const \u57CB\u307E\u3063\u305F = Math.round(\u9032\u307F\u3092\u7573\u3080(drawing, progress) * WAFFLE_TOTAL);
25279
25298
  const \u4E00\u89A7\u306E\u59CB\u307E\u308A = PAD + (\u4F7F\u3048\u308B\u9AD8\u3055 - \u884C\u306E\u9AD8\u3055 * data.length) / 2 + \u884C\u306E\u9AD8\u3055 / 2;
25280
25299
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
25281
25300
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -25296,6 +25315,7 @@ function ChartWaffleNode({
25296
25315
  const \u884C = Math.floor(k / WAFFLE_COLS);
25297
25316
  const \u5217 = k % WAFFLE_COLS;
25298
25317
  const owner = \u6301\u3061\u4E3B[k];
25318
+ const \u57CB\u307E\u3063\u3066\u3044\u308B = owner !== void 0 && k < \u57CB\u307E\u3063\u305F;
25299
25319
  return /* @__PURE__ */ jsxRuntime.jsx(
25300
25320
  "rect",
25301
25321
  {
@@ -25306,8 +25326,8 @@ function ChartWaffleNode({
25306
25326
  width: \u5370,
25307
25327
  height: \u5370,
25308
25328
  rx: 2,
25309
- fill: owner === void 0 ? "var(--cdl-divider, #d4d4d8)" : \u5370\u306E\u82722(data[owner].tone, owner),
25310
- fillOpacity: owner === void 0 ? 0.35 : 1
25329
+ fill: \u57CB\u307E\u3063\u3066\u3044\u308B ? \u5370\u306E\u82722(data[owner].tone, owner) : "var(--cdl-divider, #d4d4d8)",
25330
+ fillOpacity: \u57CB\u307E\u3063\u3066\u3044\u308B ? 1 : 0.35
25311
25331
  },
25312
25332
  `cell-${k}`
25313
25333
  );
@@ -25352,7 +25372,9 @@ var SLICE_MIN_W_FOR_VALUE = 84;
25352
25372
  function ChartStackedBarNode({
25353
25373
  node,
25354
25374
  active,
25355
- stateValues = {}
25375
+ stateValues = {},
25376
+ drawing = false,
25377
+ progress = 1
25356
25378
  }) {
25357
25379
  const x0 = node.cx - node.w / 2;
25358
25380
  const y0 = node.cy - node.h / 2;
@@ -25370,6 +25392,8 @@ function ChartStackedBarNode({
25370
25392
  const \u4E00\u89A7\u306E\u9AD8\u3055 = 26;
25371
25393
  const \u5168\u4F53\u306E\u9AD8\u3055 = \u5E2F\u305F\u3061.length * \u5E2F\u306E\u9AD8\u3055 + (\u5E2F\u305F\u3061.length - 1) * \u5E2F\u306E\u9593 + 16 + \u4E00\u89A7\u306E\u9AD8\u3055;
25372
25394
  const \u4E0A\u7AEF = Math.max(PAD, (node.h - \u5168\u4F53\u306E\u9AD8\u3055) / 2);
25395
+ const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
25396
+ const \u5207\u308A\u629C\u304Did = `cdl-stacked-bar-draw-${react.useId().replace(/[^A-Za-z0-9_-]/g, "")}`;
25373
25397
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
25374
25398
  /* @__PURE__ */ jsxRuntime.jsx(
25375
25399
  "rect",
@@ -25385,6 +25409,7 @@ function ChartStackedBarNode({
25385
25409
  strokeWidth: active ? 3 : 1.25
25386
25410
  }
25387
25411
  ),
25412
+ drawing && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: \u5207\u308A\u629C\u304Did, children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: 0, y: 0, width: \u5E2F\u306E\u5DE6 + \u5E2F\u306E\u5E45 * \u4F38\u3073, height: node.h }) }) }),
25388
25413
  \u5E2F\u305F\u3061.map((\u5E2F, \u6BB5) => {
25389
25414
  const y = \u4E0A\u7AEF + \u6BB5 * (\u5E2F\u306E\u9AD8\u3055 + \u5E2F\u306E\u9593);
25390
25415
  let \u5DE6 = \u5E2F\u306E\u5DE6;
@@ -25401,68 +25426,62 @@ function ChartStackedBarNode({
25401
25426
  children: \u5E2F.\u540D\u524D
25402
25427
  }
25403
25428
  ),
25404
- \u5E2F.\u533A\u753B.map((s, idx) => {
25405
- const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
25406
- const x = \u5DE6;
25407
- \u5DE6 += w;
25408
- const \u8272 = \u5370\u306E\u82723(s.tone, idx);
25409
- return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
25410
- /* @__PURE__ */ jsxRuntime.jsx(
25411
- "rect",
25412
- {
25413
- "data-cdl-role": "chart-stacked-bar-slice",
25414
- "data-cdl-unresolved": s.unresolved ? "true" : void 0,
25415
- x,
25416
- y,
25417
- width: Math.max(0, w),
25418
- height: \u5E2F\u306E\u9AD8\u3055,
25419
- fill: \u8272
25420
- }
25421
- ),
25422
- w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsxRuntime.jsx(
25423
- "text",
25424
- {
25425
- "data-cdl-role": "chart-stacked-bar-slice-text",
25426
- x: x + w / 2,
25427
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
25428
- fontSize: \u533A\u753B\u306E\u7D1A,
25429
- fontWeight: 700,
25430
- textAnchor: "middle",
25431
- fill: "#ffffff",
25432
- children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
25433
- }
25434
- ),
25435
- w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsxRuntime.jsx(
25436
- "text",
25437
- {
25438
- "data-cdl-role": "chart-stacked-bar-slice-value",
25439
- x: x + w / 2,
25440
- y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
25441
- fontSize: \u533A\u753B\u306E\u7D1A - 1,
25442
- textAnchor: "middle",
25443
- fill: "#ffffff",
25444
- fillOpacity: 0.85,
25445
- children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
25446
- }
25447
- )
25448
- ] }, `slice-${idx}`);
25449
- })
25429
+ (() => {
25430
+ const \u533A\u753B\u305F\u3061 = \u5E2F.\u533A\u753B.map((s, idx) => {
25431
+ const w = \u5E2F\u306E\u5E45 * s.\u5272\u5408;
25432
+ const x = \u5DE6;
25433
+ \u5DE6 += w;
25434
+ const \u8272 = \u5370\u306E\u82723(s.tone, idx);
25435
+ return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
25436
+ /* @__PURE__ */ jsxRuntime.jsx(
25437
+ "rect",
25438
+ {
25439
+ "data-cdl-role": "chart-stacked-bar-slice",
25440
+ "data-cdl-unresolved": s.unresolved ? "true" : void 0,
25441
+ x,
25442
+ y,
25443
+ width: Math.max(0, w),
25444
+ height: \u5E2F\u306E\u9AD8\u3055,
25445
+ fill: \u8272
25446
+ }
25447
+ ),
25448
+ w >= SLICE_MIN_W_FOR_TEXT && /* @__PURE__ */ jsxRuntime.jsx(
25449
+ "text",
25450
+ {
25451
+ "data-cdl-role": "chart-stacked-bar-slice-text",
25452
+ x: x + w / 2,
25453
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + (w >= SLICE_MIN_W_FOR_VALUE ? -2 : 4),
25454
+ fontSize: \u533A\u753B\u306E\u7D1A,
25455
+ fontWeight: 700,
25456
+ textAnchor: "middle",
25457
+ fill: "#ffffff",
25458
+ children: \u5272\u5408\u8868\u8A18(s.\u5272\u5408)
25459
+ }
25460
+ ),
25461
+ w >= SLICE_MIN_W_FOR_VALUE && /* @__PURE__ */ jsxRuntime.jsx(
25462
+ "text",
25463
+ {
25464
+ "data-cdl-role": "chart-stacked-bar-slice-value",
25465
+ x: x + w / 2,
25466
+ y: y + \u5E2F\u306E\u9AD8\u3055 / 2 + 13,
25467
+ fontSize: \u533A\u753B\u306E\u7D1A - 1,
25468
+ textAnchor: "middle",
25469
+ fill: "#ffffff",
25470
+ fillOpacity: 0.85,
25471
+ children: \u5B9F\u5024\u8868\u8A18(s.\u5B9F\u5024)
25472
+ }
25473
+ )
25474
+ ] }, `slice-${idx}`);
25475
+ });
25476
+ return drawing ? /* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: `url(#${\u5207\u308A\u629C\u304Did})`, children: \u533A\u753B\u305F\u3061 }) : \u533A\u753B\u305F\u3061;
25477
+ })()
25450
25478
  ] }, `bar-${\u6BB5}`);
25451
25479
  }),
25452
25480
  \u4E00\u89A7\u306E\u4E26\u3073(data, \u5E2F\u306E\u5DE6, node.w - PAD, \u540D\u524D\u306E\u7D1A).map(({ d, idx, x, \u884C }) => {
25453
25481
  const y = \u4E0A\u7AEF + \u5E2F\u305F\u3061.length * (\u5E2F\u306E\u9AD8\u3055 + \u5E2F\u306E\u9593) - \u5E2F\u306E\u9593 + 16 + \u4E00\u89A7\u306E\u9AD8\u3055 / 2 + \u884C * \u4E00\u89A7\u306E\u9AD8\u3055;
25454
25482
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { "data-cdl-role": "chart-stacked-bar-legend", children: [
25455
25483
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x, y: y - 5, width: 10, height: 10, rx: 2, fill: \u5370\u306E\u82723(d.tone, idx) }),
25456
- /* @__PURE__ */ jsxRuntime.jsx(
25457
- "text",
25458
- {
25459
- x: x + 16,
25460
- y: y + 4,
25461
- fontSize: \u540D\u524D\u306E\u7D1A,
25462
- fill: "var(--cdl-text, #1a1f2a)",
25463
- children: d.label
25464
- }
25465
- )
25484
+ /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 16, y: y + 4, fontSize: \u540D\u524D\u306E\u7D1A, fill: "var(--cdl-text, #1a1f2a)", children: d.label })
25466
25485
  ] }, `legend-${idx}`);
25467
25486
  })
25468
25487
  ] });
@@ -30423,9 +30442,27 @@ function CdlNodeView({
30423
30442
  }
30424
30443
  );
30425
30444
  case "chart-gauge":
30426
- return /* @__PURE__ */ jsxRuntime.jsx(ChartGaugeNode, { node: resolvedNode, active, stateValues });
30445
+ return /* @__PURE__ */ jsxRuntime.jsx(
30446
+ ChartGaugeNode,
30447
+ {
30448
+ node: resolvedNode,
30449
+ active,
30450
+ stateValues,
30451
+ drawing,
30452
+ progress
30453
+ }
30454
+ );
30427
30455
  case "chart-stacked-bar":
30428
- return /* @__PURE__ */ jsxRuntime.jsx(ChartStackedBarNode, { node: resolvedNode, active, stateValues });
30456
+ return /* @__PURE__ */ jsxRuntime.jsx(
30457
+ ChartStackedBarNode,
30458
+ {
30459
+ node: resolvedNode,
30460
+ active,
30461
+ stateValues,
30462
+ drawing,
30463
+ progress
30464
+ }
30465
+ );
30429
30466
  case "chart-slope":
30430
30467
  return /* @__PURE__ */ jsxRuntime.jsx(
30431
30468
  ChartSlopeNode,
@@ -30438,11 +30475,29 @@ function CdlNodeView({
30438
30475
  }
30439
30476
  );
30440
30477
  case "chart-waffle":
30441
- return /* @__PURE__ */ jsxRuntime.jsx(ChartWaffleNode, { node: resolvedNode, active, stateValues });
30478
+ return /* @__PURE__ */ jsxRuntime.jsx(
30479
+ ChartWaffleNode,
30480
+ {
30481
+ node: resolvedNode,
30482
+ active,
30483
+ stateValues,
30484
+ drawing,
30485
+ progress
30486
+ }
30487
+ );
30442
30488
  case "chart-stat":
30443
30489
  return /* @__PURE__ */ jsxRuntime.jsx(ChartStatNode, { node: resolvedNode, active, stateValues });
30444
30490
  case "chart-radial":
30445
- return /* @__PURE__ */ jsxRuntime.jsx(ChartRadialNode, { node: resolvedNode, active, stateValues });
30491
+ return /* @__PURE__ */ jsxRuntime.jsx(
30492
+ ChartRadialNode,
30493
+ {
30494
+ node: resolvedNode,
30495
+ active,
30496
+ stateValues,
30497
+ drawing,
30498
+ progress
30499
+ }
30500
+ );
30446
30501
  case "chart-bar":
30447
30502
  return /* @__PURE__ */ jsxRuntime.jsx(
30448
30503
  ChartBarNode,