@wavemaker/app-ng-runtime 11.5.3-next.26266 → 11.5.3-next.26269

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.
@@ -469,10 +469,13 @@ const getDateFormatedData = (dateFormat, d) => {
469
469
  return d3.timeFormat(dateFormat)(new Date(moment(moment(d).format()).valueOf()));
470
470
  };
471
471
  const removeTrailingZeros = value => {
472
+ if (!value) {
473
+ return value;
474
+ }
472
475
  // Convert value to a string if it's a number
473
476
  const stringValue = typeof value === 'number' ? value.toString() : value;
474
477
  // Remove trailing zeros
475
- return stringValue.replace(/\.*0+$/, "").replace(/\.0+%$/, "%");
478
+ return stringValue.replace(/\.0+$/, "").replace(/\.0+%$/, "%");
476
479
  };
477
480
  // Formats the given value according to number format
478
481
  const getNumberFormatedData = (numberFormat, d) => {
@@ -773,6 +776,7 @@ const initChart = (widgetContext, xDomainValues, yDomainValues, propertyValueMap
773
776
  }
774
777
  return chart;
775
778
  };
779
+ // @ts-ignore
776
780
  const postPlotChartProcess = (widgetContext, isPreview) => {
777
781
  const id = isPreview ? null : widgetContext.$id;
778
782
  // If user sets to highlight the data points and increase the thickness of the line
@@ -785,6 +789,7 @@ const postPlotChartProcess = (widgetContext, isPreview) => {
785
789
  // modifyLegendPosition(widgetContext, widgetContext.showlegend, id);
786
790
  // }
787
791
  };
792
+ // @ts-ignore
788
793
  const getDateList = () => dateList;
789
794
 
790
795
  const _c0 = ["wmChart", ""];