Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@forter/chart

Package Overview
Dependencies
Maintainers
3
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forter/chart - npm Package Compare versions

Comparing version 5.27.0 to 5.27.1

8

CHANGELOG.md

@@ -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 @@

7

chart-config-builders/sankey-config-builder.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc