@cardenelabs/cdl 0.35.0 → 0.36.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/dist/react.cjs CHANGED
@@ -13028,8 +13028,15 @@ function ChartSlopeNode({
13028
13028
  const \u4E0A\u7AEF = PAD + (\u524D\u3042\u308A ? \u6642\u70B9\u306E\u7D1A + 12 : 0) + 6;
13029
13029
  const \u4E0B\u7AEF = Math.max(\u4E0A\u7AEF + 10, node.h - PAD - 6);
13030
13030
  const y\u3092\u53D6\u308B = (v) => \u5C3A\u306E\u5E45 > 0 ? \u4E0B\u7AEF - (v - \u6700\u5C0F) / \u5C3A\u306E\u5E45 * (\u4E0B\u7AEF - \u4E0A\u7AEF) : (\u4E0A\u7AEF + \u4E0B\u7AEF) / 2;
13031
+ const \u5F62 = \u524D\u3042\u308A && node.chartSlopeForm === "delta" ? "delta" : "values";
13032
+ const \u5897\u6E1B\u8868\u8A18 = (\u524D, \u4ECA) => {
13033
+ const \u5DEE = \u4ECA - \u524D;
13034
+ return \u5DEE > 0 ? `+${\u5B9F\u5024\u8868\u8A18(\u5DEE)}` : \u5B9F\u5024\u8868\u8A18(\u5DEE);
13035
+ };
13031
13036
  const \u5DE6\u306E\u5B57 = \u7CFB\u5217\u305F\u3061.map((s) => \u5B9F\u5024\u8868\u8A18(s.\u524D));
13032
- const \u53F3\u306E\u5B57 = \u7CFB\u5217\u305F\u3061.map((s) => \u5B9F\u5024\u8868\u8A18(s.\u4ECA));
13037
+ const \u53F3\u306E\u5B57 = \u7CFB\u5217\u305F\u3061.map(
13038
+ (s) => \u5F62 === "delta" ? \u5897\u6E1B\u8868\u8A18(s.\u524D, s.\u4ECA) : \u5B9F\u5024\u8868\u8A18(s.\u4ECA)
13039
+ );
13033
13040
  const \u5DE6\u5024\u5E45 = Math.max(0, ...\u5DE6\u306E\u5B57.map((t) => textWidth(t, \u5024\u306E\u7D1A)));
13034
13041
  const \u53F3\u5024\u5E45 = Math.max(0, ...\u53F3\u306E\u5B57.map((t) => textWidth(t, \u5024\u306E\u7D1A)));
13035
13042
  const \u540D\u524D\u306B\u4F7F\u3048\u308B = Math.max(
@@ -13185,7 +13192,7 @@ function ChartSlopeNode({
13185
13192
  /* @__PURE__ */ jsxRuntime.jsx(
13186
13193
  "text",
13187
13194
  {
13188
- "data-cdl-role": "chart-slope-value",
13195
+ "data-cdl-role": \u5F62 === "delta" ? "chart-slope-delta" : "chart-slope-value",
13189
13196
  x: \u53F3\u8EF8x + \u8EF8\u304B\u3089\u5024\u307E\u3067,
13190
13197
  y: \u53F3y + 5,
13191
13198
  fontSize: \u5024\u306E\u7D1A,