@forter/chart
Advanced tools
Comparing version 5.8.6 to 5.9.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [5.9.0](https://github.com/forter/web-components/compare/@forter/chart@5.8.6...@forter/chart@5.9.0) (2021-11-09) | ||
### Features | ||
* **chart:** added constant annotations to the chart ([697868d](https://github.com/forter/web-components/commit/697868d)) | ||
## [5.8.6](https://github.com/forter/web-components/compare/@forter/chart@5.8.5...@forter/chart@5.8.6) (2021-11-08) | ||
@@ -8,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { get, merge } from 'lodash-es'; | ||
import { get, merge, cloneDeep } from 'lodash-es'; | ||
import { translateColor } from './dataset-color-config-builder.js'; | ||
@@ -26,3 +26,3 @@ | ||
} = config; | ||
const annotationSeries = allSeries.filter(series => ['KPI'].includes(series.seriesType)); | ||
const annotationSeries = allSeries.filter(series => ['KPI', 'CONST'].includes(series.seriesType)); | ||
const annotations = annotationSeries.reduce((annotations, annotation, index) => { | ||
@@ -41,3 +41,3 @@ const data = get(annotation, 'aggregation.data[0]'); | ||
}; | ||
annotations[index] = translateAnnotationColors(merge(ANNOTATION_TEMPLATE, dataObject, style), context); | ||
annotations[index] = translateAnnotationColors(merge(cloneDeep(ANNOTATION_TEMPLATE), dataObject, style), context); | ||
return annotations; | ||
@@ -44,0 +44,0 @@ }, {}); |
@@ -10,5 +10,3 @@ import { merge } from 'lodash-es'; | ||
y: { | ||
ticks: { | ||
format: config.yAxisFormattingOptions | ||
} | ||
ticks: config.yAxisFormattingOptions | ||
} | ||
@@ -15,0 +13,0 @@ } |
{ | ||
"name": "@forter/chart", | ||
"version": "5.8.6", | ||
"version": "5.9.0", | ||
"description": "chart from Forter Components", | ||
@@ -59,3 +59,3 @@ "author": "Forter Developers", | ||
}, | ||
"gitHead": "ed841a9926e9407442aa27cbe55bee55d4bf5f3b" | ||
"gitHead": "c285e774ed1d398db277bc49f7630277c5d6fb90" | ||
} |
@@ -1,3 +0,2 @@ | ||
import { merge } from 'lodash-es'; | ||
import { get } from 'lodash-es'; | ||
import { get, cloneDeep, merge } from 'lodash-es'; | ||
import { translateColor } from './dataset-color-config-builder'; | ||
@@ -26,3 +25,3 @@ | ||
const { series: allSeries = [] } = config; | ||
const annotationSeries = allSeries.filter(series => ['KPI'].includes(series.seriesType)); | ||
const annotationSeries = allSeries.filter(series => ['KPI', 'CONST'].includes(series.seriesType)); | ||
@@ -44,3 +43,3 @@ const annotations = annotationSeries.reduce((annotations, annotation, index) => { | ||
annotations[index] = translateAnnotationColors( | ||
merge(ANNOTATION_TEMPLATE, dataObject, style), context); | ||
merge(cloneDeep(ANNOTATION_TEMPLATE), dataObject, style), context); | ||
@@ -47,0 +46,0 @@ return annotations; |
@@ -6,3 +6,3 @@ import { merge } from 'lodash-es'; | ||
/* eslint-disable */ | ||
const formatObject = { options: { scales: { y: { ticks: { format: config.yAxisFormattingOptions } } } } }; | ||
const formatObject = { options: { scales: { y: { ticks: config.yAxisFormattingOptions } } } }; | ||
chartJSConfig = merge(chartJSConfig, formatObject); | ||
@@ -9,0 +9,0 @@ } |
Sorry, the diff of this file is not supported yet
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
173342
3078