@forter/chart
Advanced tools
Comparing version 5.34.0 to 5.35.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [5.35.0](https://github.com/forter/web-components/compare/@forter/chart@5.34.0...@forter/chart@5.35.0) (2023-06-20) | ||
### Features | ||
* **chart:** legend double line ellipsis ([f6a95af](https://github.com/forter/web-components/commit/f6a95af)) | ||
* **chart:** lint ([675b9ec](https://github.com/forter/web-components/commit/675b9ec)) | ||
# [5.34.0](https://github.com/forter/web-components/compare/@forter/chart@5.33.2...@forter/chart@5.34.0) (2023-06-20) | ||
@@ -8,0 +20,0 @@ |
@@ -119,17 +119,19 @@ import { merge, get } from 'lodash-es'; | ||
Object.entries(rawDatasets).forEach(([key, value], index) => { | ||
newDataset.labels.push(key); | ||
newDataset.datasets[0].data.push({ | ||
value: value.value, | ||
formattedValue: value.formattedValue | ||
}); | ||
if (value.value !== 0) { | ||
newDataset.labels.push(key); | ||
newDataset.datasets[0].data.push({ | ||
value: value.value, | ||
formattedValue: value.formattedValue | ||
}); | ||
if (value.style) { | ||
// eslint-disable-next-line no-loops/no-loops | ||
for (const styleName in value.style) { | ||
if (Object.prototype.hasOwnProperty.call(value.style, styleName)) { | ||
if (!newDataset.datasets[0][styleName]) { | ||
newDataset.datasets[0][styleName] = []; | ||
if (value.style) { | ||
// eslint-disable-next-line no-loops/no-loops | ||
for (const styleName in value.style) { | ||
if (Object.prototype.hasOwnProperty.call(value.style, styleName)) { | ||
if (!newDataset.datasets[0][styleName]) { | ||
newDataset.datasets[0][styleName] = []; | ||
} | ||
newDataset.datasets[0][styleName][index] = value.style[styleName]; | ||
} | ||
newDataset.datasets[0][styleName][index] = value.style[styleName]; | ||
} | ||
@@ -136,0 +138,0 @@ } |
@@ -203,3 +203,3 @@ import { css } from 'lit-element'; | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; | ||
-webkit-line-clamp: 1; | ||
-webkit-box-orient: vertical; | ||
@@ -376,2 +376,6 @@ } | ||
#legend-container[open] .legend-label { | ||
-webkit-line-clamp: 2; | ||
} | ||
:host #skeleton-legend-container .legend-color-box { | ||
@@ -378,0 +382,0 @@ --legend-color: var(--fc-gray-200) !important; |
@@ -84,3 +84,3 @@ import { defineProperty as _defineProperty } from './_virtual/_rollupPluginBabelHelpers.js'; | ||
type: Boolean, | ||
value: false | ||
value: true | ||
} | ||
@@ -109,23 +109,2 @@ }; | ||
get legendContainer() { | ||
return this.shadowRoot.getElementById('real-legend-container'); | ||
} | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
this.resizeObserver = new ResizeObserver(() => { | ||
this.isLegendExpandIndicatorVisible = this.legendContainer.scrollHeight < this.minExpandHeight; | ||
}); | ||
this.resizeObserver.observe(this); | ||
} | ||
disconnectedCallback() { | ||
super.disconnectedCallback(); | ||
if (this.resizeObserver) { | ||
this.resizeObserver.disconnect(); | ||
this.resizeObserver = null; | ||
} | ||
} | ||
firstUpdated() { | ||
@@ -160,3 +139,2 @@ this.context = this.canvas.getContext('2d'); | ||
super.updated(_changedProperties); | ||
this.isLegendExpandIndicatorVisible = this.legendContainer.scrollHeight < this.minExpandHeight; | ||
const { | ||
@@ -163,0 +141,0 @@ config |
{ | ||
"name": "@forter/chart", | ||
"version": "5.34.0", | ||
"version": "5.35.0", | ||
"description": "chart from Forter Components", | ||
@@ -61,3 +61,3 @@ "author": "Forter Developers", | ||
}, | ||
"gitHead": "468b5b596499d1feee086faa7221b3036a0aa675" | ||
"gitHead": "8cfca62822745afbf778e20e94437589cce976cc" | ||
} |
@@ -28,3 +28,3 @@ # fc-chart | ||
| `isLegendBoxOpen` | `isLegendBoxOpen` | `boolean` | true | | ||
| `isLegendExpandIndicatorVisible` | `isLegendExpandIndicatorVisible` | `boolean` | false | | ||
| `isLegendExpandIndicatorVisible` | `isLegendExpandIndicatorVisible` | `boolean` | true | | ||
| `loading` | `loading` | `boolean` | false | | ||
@@ -31,0 +31,0 @@ | `previewMode` | `preview-mode` | `boolean` | false | |
@@ -109,12 +109,16 @@ import { merge, get } from 'lodash-es'; | ||
Object.entries(rawDatasets).forEach(([key, value], index) => { | ||
newDataset.labels.push(key); | ||
newDataset.datasets[0].data.push({ value: value.value, formattedValue: value.formattedValue }); | ||
if (value.style) { | ||
// eslint-disable-next-line no-loops/no-loops | ||
for (const styleName in value.style) { | ||
if (Object.prototype.hasOwnProperty.call(value.style, styleName)) { | ||
if (!newDataset.datasets[0][styleName]) { | ||
newDataset.datasets[0][styleName] = []; | ||
if (value.value !== 0) { | ||
newDataset.labels.push(key); | ||
newDataset.datasets[0].data.push({ | ||
value: value.value, formattedValue: value.formattedValue | ||
}); | ||
if (value.style) { | ||
// eslint-disable-next-line no-loops/no-loops | ||
for (const styleName in value.style) { | ||
if (Object.prototype.hasOwnProperty.call(value.style, styleName)) { | ||
if (!newDataset.datasets[0][styleName]) { | ||
newDataset.datasets[0][styleName] = []; | ||
} | ||
newDataset.datasets[0][styleName][index] = value.style[styleName]; | ||
} | ||
newDataset.datasets[0][styleName][index] = value.style[styleName]; | ||
} | ||
@@ -121,0 +125,0 @@ } |
@@ -60,3 +60,3 @@ /* eslint-disable max-len */ | ||
isLegendBoxOpen: { type: Boolean, value: true }, | ||
isLegendExpandIndicatorVisible: { type: Boolean, value: false } | ||
isLegendExpandIndicatorVisible: { type: Boolean, value: true } | ||
}; | ||
@@ -88,22 +88,2 @@ } | ||
get legendContainer() { | ||
return this.shadowRoot.getElementById('real-legend-container'); | ||
} | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
this.resizeObserver = new ResizeObserver(() => { | ||
this.isLegendExpandIndicatorVisible = this.legendContainer.scrollHeight < this.minExpandHeight; | ||
}); | ||
this.resizeObserver.observe(this); | ||
} | ||
disconnectedCallback() { | ||
super.disconnectedCallback(); | ||
if (this.resizeObserver) { | ||
this.resizeObserver.disconnect(); | ||
this.resizeObserver = null; | ||
} | ||
} | ||
firstUpdated() { | ||
@@ -133,3 +113,2 @@ this.context = this.canvas.getContext('2d'); | ||
super.updated(_changedProperties); | ||
this.isLegendExpandIndicatorVisible = this.legendContainer.scrollHeight < this.minExpandHeight; | ||
const { config } = this; | ||
@@ -136,0 +115,0 @@ if (!this.hasConfigChanged(config)) { |
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
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
347475
5604