@funnest/charts-ui 0.11.16 → 0.11.18

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 (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -4867,7 +4867,7 @@ function Legend({ ctx }) {
4867
4867
  if (bar && (ctx.legendValues === "always" || hover)) {
4868
4868
  const cls = dirClass(bar.close - bar.open);
4869
4869
  const change = prev ? bar.close - prev.close : 0;
4870
- const pct = prev && prev.close ? change / prev.close * 100 : 0;
4870
+ const pct = prev && prev.close ? change / Math.abs(prev.close) * 100 : 0;
4871
4871
  const sign = change > 0 ? "+" : "";
4872
4872
  values = /* @__PURE__ */ a3("div", { class: ctx.legendValues === "crosshair" ? "fnc-legend-values fnc-legend-values-float" : "fnc-legend-values", children: [
4873
4873
  /* @__PURE__ */ a3("span", { children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-ui",
3
- "version": "0.11.16",
3
+ "version": "0.11.18",
4
4
  "description": "Pro trading UI (toolbar, drawing tools, sheets) for Funnest Charts. Framework-agnostic.",
5
5
  "keywords": [
6
6
  "chart",
@@ -42,7 +42,7 @@
42
42
  "NOTICE"
43
43
  ],
44
44
  "dependencies": {
45
- "@funnest/charts": "0.11.16"
45
+ "@funnest/charts": "0.11.18"
46
46
  },
47
47
  "devDependencies": {
48
48
  "preact": "^11.2.0"