@forter/chart
Advanced tools
Comparing version 5.42.4 to 5.42.5
@@ -6,2 +6,14 @@ # Change Log | ||
## [5.42.5](https://github.com/forter/web-components/compare/@forter/chart@5.42.4...@forter/chart@5.42.5) (2024-07-11) | ||
### Bug Fixes | ||
* **chart:** fix the nan values ([e913b4b](https://github.com/forter/web-components/commit/e913b4b)) | ||
* **chart:** fix_nan_values_tooltip ([b485b4f](https://github.com/forter/web-components/commit/b485b4f)) | ||
## [5.42.4](https://github.com/forter/web-components/compare/@forter/chart@5.42.3...@forter/chart@5.42.4) (2024-07-11) | ||
@@ -8,0 +20,0 @@ |
@@ -113,3 +113,3 @@ import { html } from 'lit-element'; | ||
const dataArr = chartJSContext.chart.data.datasets[0].data; | ||
const sum = dataArr.reduce((accu, current) => accu += current === null || current === void 0 ? void 0 : current.value, 0); | ||
const sum = dataArr.reduce((accu, current) => accu += (current === null || current === void 0 ? void 0 : current.value) || 0, 0); | ||
const ratio = (dataPoint.raw.value / sum * 100).toFixed(2); | ||
@@ -116,0 +116,0 @@ return { |
{ | ||
"name": "@forter/chart", | ||
"version": "5.42.4", | ||
"version": "5.42.5", | ||
"description": "chart from Forter Components", | ||
@@ -61,3 +61,3 @@ "author": "Forter Developers", | ||
}, | ||
"gitHead": "7bd39cb31b2135870eb1197546bc09f337db21ad" | ||
"gitHead": "f881d11393d7f97394453a188ae3ceda02697678" | ||
} |
@@ -80,3 +80,3 @@ import { get, merge } from 'lodash-es'; | ||
const dataArr = chartJSContext.chart.data.datasets[0].data; | ||
const sum = dataArr.reduce((accu, current) => accu += current?.value, 0); | ||
const sum = dataArr.reduce((accu, current) => accu += current?.value || 0, 0); | ||
const ratio = ((dataPoint.raw.value / sum) * 100).toFixed(2); | ||
@@ -83,0 +83,0 @@ return { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
414640