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.24.3 to 5.24.4

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

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [5.24.4](https://github.com/forter/web-components/compare/@forter/chart@5.24.3...@forter/chart@5.24.4) (2022-10-02)
**Note:** Version bump only for package @forter/chart
## [5.24.3](https://github.com/forter/web-components/compare/@forter/chart@5.24.2...@forter/chart@5.24.3) (2022-09-14)

@@ -8,0 +16,0 @@

1

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

@@ -14,2 +14,3 @@ import { cloneDeep, merge } from 'lodash-es';

const DEFAULT_OPTIONS = {
font,
maintainAspectRatio: false,

@@ -16,0 +17,0 @@ responsive: true,

2

chart-config-builders/html-legend-builder.js

@@ -123,3 +123,3 @@ import { merge } from 'lodash-es';

if ((chartJSConfig === null || chartJSConfig === void 0 ? void 0 : (_chartJSConfig$data = chartJSConfig.data) === null || _chartJSConfig$data === void 0 ? void 0 : _chartJSConfig$data.datasets[0].type) === CHART_TYPES.TREEMAP) {
if ((chartJSConfig === null || chartJSConfig === void 0 ? void 0 : (_chartJSConfig$data = chartJSConfig.data) === null || _chartJSConfig$data === void 0 ? void 0 : _chartJSConfig$data.datasets[0].type) === CHART_TYPES.TREEMAP || (chartJSConfig === null || chartJSConfig === void 0 ? void 0 : chartJSConfig.type) === CHART_TYPES.SANKEY) {
context.shadowRoot.getElementById('legend-container').style.display = 'none';

@@ -126,0 +126,0 @@ }

@@ -5,3 +5,4 @@ const CHART_TYPES = {

TREEMAP: 'treemap',
DOUGHNUT: 'doughnut'
DOUGHNUT: 'doughnut',
SANKEY: 'sankey'
};

@@ -8,0 +9,0 @@ const X_AXIS_TYPE = {

@@ -9,2 +9,3 @@ import { defineProperty as _defineProperty } from './_virtual/_rollupPluginBabelHelpers.js';

import generateBasicChartJSConfig from './chart-config-builders/basic-config-builder.js';
import generateSankeyConfig from './chart-config-builders/sankey-config-builder.js';
import generateTooltipConfig from './chart-config-builders/tooltip-config-builder.js';

@@ -22,2 +23,3 @@ import insertYAxisTicks from './chart-config-builders/y-axis-symbol-config-builder.js';

import { TreemapController, TreemapElement } from 'chartjs-chart-treemap';
import { SankeyController, Flow } from 'fds-sankey';

@@ -102,2 +104,3 @@ /**

Chart.register(TreemapController, TreemapElement);
Chart.register(SankeyController, Flow);
Chart.register(...registerables); // Update label formatters after chart animations finish (animation duration: 1s)

@@ -157,3 +160,3 @@

getConfigBuilders() {
return [generateBasicChartJSConfig, insertYAxisTicks, insertTimeAxisTicks, updateColorsInDatasets, periodOverPeriodBuilder, registerSeriesClickEvent, insertXAxisTicks, htmlLegendBuilder, insertAnnotations, doughnutBuilder, generateTooltipConfig];
return [generateBasicChartJSConfig, generateSankeyConfig, insertYAxisTicks, insertTimeAxisTicks, updateColorsInDatasets, periodOverPeriodBuilder, registerSeriesClickEvent, insertXAxisTicks, htmlLegendBuilder, insertAnnotations, doughnutBuilder, generateTooltipConfig];
}

@@ -160,0 +163,0 @@

{
"name": "@forter/chart",
"version": "5.24.3",
"version": "5.24.4",
"description": "chart from Forter Components",

@@ -57,6 +57,7 @@ "author": "Forter Developers",

"chartjs-plugin-annotation": "1.4.0",
"fds-sankey": "^1.0.2",
"lodash-es": "^4.17.21",
"object-hash": "2.2.0"
},
"gitHead": "3d5caff60db37015595546550bd094184ab6a885"
"gitHead": "f0112023f54ede04a114fde4b9635a0a8802983b"
}

@@ -15,2 +15,3 @@ import { merge, cloneDeep } from 'lodash-es';

const DEFAULT_OPTIONS = {
font,
maintainAspectRatio: false,

@@ -17,0 +18,0 @@ responsive: true,

@@ -110,3 +110,3 @@ import { merge } from 'lodash-es';

// Hide legends when the chart is of type "treemap"
if (chartJSConfig?.data?.datasets[0].type === CHART_TYPES.TREEMAP) {
if (chartJSConfig?.data?.datasets[0].type === CHART_TYPES.TREEMAP || chartJSConfig?.type === CHART_TYPES.SANKEY) {
context.shadowRoot.getElementById('legend-container').style.display = 'none';

@@ -113,0 +113,0 @@ }

@@ -5,3 +5,4 @@ export const CHART_TYPES = {

TREEMAP: 'treemap',
DOUGHNUT: 'doughnut'
DOUGHNUT: 'doughnut',
SANKEY: 'sankey'
};

@@ -8,0 +9,0 @@

@@ -8,2 +8,3 @@ import { LitElement, html } from 'lit-element';

import generateBasicChartJSConfig from './chart-config-builders/basic-config-builder';
import generateSankeyConfig from './chart-config-builders/sankey-config-builder';
import generateTooltipConfig from './chart-config-builders/tooltip-config-builder';

@@ -21,2 +22,3 @@ import insertYAxisTicks from './chart-config-builders/y-axis-symbol-config-builder';

import { TreemapController, TreemapElement } from 'chartjs-chart-treemap';
import { SankeyController, Flow } from 'fds-sankey';

@@ -86,2 +88,3 @@ /**

Chart.register(TreemapController, TreemapElement);
Chart.register(SankeyController, Flow);
Chart.register(...registerables);

@@ -133,2 +136,3 @@

generateBasicChartJSConfig,
generateSankeyConfig,
insertYAxisTicks,

@@ -135,0 +139,0 @@ insertTimeAxisTicks,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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