@forter/chart
Advanced tools
Comparing version 5.27.0 to 5.27.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [5.27.1](https://github.com/forter/web-components/compare/@forter/chart@5.27.0...@forter/chart@5.27.1) (2022-11-01) | ||
**Note:** Version bump only for package @forter/chart | ||
# [5.27.0](https://github.com/forter/web-components/compare/@forter/chart@5.26.0...@forter/chart@5.27.0) (2022-10-19) | ||
@@ -8,0 +16,0 @@ |
@@ -20,2 +20,3 @@ import { merge } from 'lodash-es'; | ||
'Transactions': '#00D894', | ||
'All Transactions': '#00D894', | ||
'Frictionless': '#20E8D3', | ||
@@ -46,2 +47,5 @@ 'Abandoned': '#F6BA27', | ||
}) => { | ||
const minVisualNodeVolume = Math.max(...data.map(({ | ||
value | ||
}) => value)) * 0.1; | ||
const dataPoints = data.reduce((result, dataPoint) => { | ||
@@ -56,3 +60,3 @@ const { | ||
to: label, | ||
flow: value | ||
flow: Math.max(value, minVisualNodeVolume) | ||
}]; | ||
@@ -67,3 +71,2 @@ }, []); | ||
const rawLabels = data.reduce((result, dataPoint) => { | ||
if (Object.keys(nodes).includes(dataPoint.label)) return result; | ||
return { ...result, | ||
@@ -70,0 +73,0 @@ [dataPoint.label]: dataPoint.value |
{ | ||
"name": "@forter/chart", | ||
"version": "5.27.0", | ||
"version": "5.27.1", | ||
"description": "chart from Forter Components", | ||
@@ -57,7 +57,7 @@ "author": "Forter Developers", | ||
"chartjs-plugin-annotation": "1.4.0", | ||
"fds-sankey": "^1.0.2", | ||
"fds-sankey": "^1.0.6", | ||
"lodash-es": "^4.17.21", | ||
"object-hash": "2.2.0" | ||
}, | ||
"gitHead": "c297cc11b68609e25242318f32ecf6a21ccee946" | ||
"gitHead": "e5c7f38d956448fc956ad935c8cc6ba47ea7c031" | ||
} |
@@ -16,2 +16,3 @@ import { merge } from 'lodash-es'; | ||
'Transactions': '#00D894', | ||
'All Transactions': '#00D894', | ||
'Frictionless': '#20E8D3', | ||
@@ -38,5 +39,7 @@ 'Abandoned': '#F6BA27', | ||
const sankeyFlow = series.reduce((accumulator, { aggregation: { data } }) => { | ||
const minVisualNodeVolume = Math.max(...data.map(({ value }) => value)) * 0.1; | ||
const dataPoints = data.reduce((result, dataPoint) => { | ||
const { parent, label, value } = dataPoint; | ||
return [...result, { from: parent, to: label, flow: value }]; | ||
return [...result, { from: parent, to: label, flow: Math.max(value, minVisualNodeVolume) }]; | ||
}, []); | ||
@@ -50,3 +53,2 @@ | ||
const rawLabels = data.reduce((result, dataPoint) => { | ||
if (Object.keys(nodes).includes(dataPoint.label)) return result; | ||
return { ...result, [dataPoint.label]: dataPoint.value }; | ||
@@ -53,0 +55,0 @@ }, nodes); |
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
274509
4472
Updatedfds-sankey@^1.0.6