@oliasoft-open-source/charts-library 3.4.10 → 3.4.11

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.
package/dist/index.js CHANGED
@@ -24642,7 +24642,6 @@ const DEFAULT_POINT_RADIUS = 2;
24642
24642
  const DEFAULT_HOVER_RADIUS = 5;
24643
24643
  const DEFAULT_BORDER_WIDTH = 1;
24644
24644
  const BORDER_JOIN_STYLE = "round";
24645
- const DEFAULT_LINE_POINT_RADIUS = 0;
24646
24645
  const DEFAULT_BACKGROUND_COLOR = "transparent";
24647
24646
  const ZOOM_BOX_BACKGROUND_COLOR = "rgba(0, 0, 0, 0.1)";
24648
24647
  const DOUBLE_CLICK = "dblclick";
@@ -24687,7 +24686,7 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
24687
24686
  const {
24688
24687
  formation,
24689
24688
  data = [],
24690
- pointRadius,
24689
+ pointRadius: pointRadiusProp,
24691
24690
  pointHoverRadius,
24692
24691
  borderWidth,
24693
24692
  borderColor,
@@ -24709,7 +24708,9 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
24709
24708
  }
24710
24709
  }
24711
24710
  const filteredData = data.filter(Boolean) || [];
24712
- const linePointRadius = parseFloat(pointRadius) || DEFAULT_POINT_RADIUS;
24711
+ const isSinglePoint = (filteredData == null ? void 0 : filteredData.length) === 1;
24712
+ const linePointRadius = parseFloat(pointRadiusProp) || DEFAULT_POINT_RADIUS;
24713
+ const pointRadius = pointsEnabled || isSinglePoint ? linePointRadius : 0;
24713
24714
  const hoverRadius = parseFloat(pointHoverRadius) || DEFAULT_HOVER_RADIUS;
24714
24715
  const indexedColor = COLORS[i2];
24715
24716
  return {
@@ -24725,7 +24726,7 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
24725
24726
  borderColor: borderColor ?? indexedColor ?? generateRandomColor(COLORS),
24726
24727
  backgroundColor: backgroundColor ?? DEFAULT_BACKGROUND_COLOR,
24727
24728
  pointBackgroundColor: pointBackgroundColor ?? indexedColor ?? generateRandomColor(COLORS),
24728
- pointRadius: pointsEnabled ? linePointRadius : DEFAULT_LINE_POINT_RADIUS,
24729
+ pointRadius,
24729
24730
  pointHoverRadius: hoverRadius,
24730
24731
  pointHitRadius: line.pointHitRadius ?? hoverRadius
24731
24732
  };