@lightdash/visualization 3.78.0 → 3.78.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -769,8 +769,10 @@ const getPivotSeries = ({ series, pivotReference, itemsMap, xFieldHash, yFieldHa
769
769
  };
770
770
  const applyReadableColorsToMarkLine = (markLine, baseColor, backgroundColor) => {
771
771
  const baseStyle = (0, common_1.getReferenceLineStyle)(baseColor, backgroundColor);
772
- // Apply readable color adjustment to each reference line
773
- const adjustedData = markLine.data?.map((item) => {
772
+ // ECharts throws on a mark line with no value and no type, so drop them.
773
+ const adjustedData = markLine.data
774
+ ?.filter((item) => item.type != null || item.xAxis != null || item.yAxis != null)
775
+ .map((item) => {
774
776
  if (!item.lineStyle?.color || !backgroundColor) {
775
777
  return item;
776
778
  }
@@ -753,8 +753,10 @@ const getPivotSeries = ({ series, pivotReference, itemsMap, xFieldHash, yFieldHa
753
753
  };
754
754
  const applyReadableColorsToMarkLine = (markLine, baseColor, backgroundColor) => {
755
755
  const baseStyle = getReferenceLineStyle(baseColor, backgroundColor);
756
- // Apply readable color adjustment to each reference line
757
- const adjustedData = markLine.data?.map((item) => {
756
+ // ECharts throws on a mark line with no value and no type, so drop them.
757
+ const adjustedData = markLine.data
758
+ ?.filter((item) => item.type != null || item.xAxis != null || item.yAxis != null)
759
+ .map((item) => {
758
760
  if (!item.lineStyle?.color || !backgroundColor) {
759
761
  return item;
760
762
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/visualization",
3
- "version": "3.78.0",
3
+ "version": "3.78.2",
4
4
  "description": "Headless Lightdash chart engine: turns a saved chart's config and query results into ECharts options, table and big number models",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -60,7 +60,7 @@
60
60
  "./package.json": "./package.json"
61
61
  },
62
62
  "dependencies": {
63
- "@lightdash/common": "3.78.0",
63
+ "@lightdash/common": "3.78.2",
64
64
  "dayjs": "1.11.10",
65
65
  "lodash": "4.18.1",
66
66
  "tslib": "2.8.1"