@oliasoft-open-source/charts-library 4.1.6-beta-1 → 4.1.7

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
@@ -24683,7 +24683,7 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
24683
24683
  pointBackgroundColor: pointBackgroundColor ?? indexedColor ?? generateRandomColor(COLORS),
24684
24684
  pointRadius: pointState ? linePointRadius : 0,
24685
24685
  pointHoverRadius: hoverRadius,
24686
- pointHitRadius: line.pointHitRadius ?? hoverRadius,
24686
+ pointHitRadius: (line == null ? void 0 : line.pointHitRadius) ?? hoverRadius,
24687
24687
  ...hasCustomOpt ? { hasCustomOpt } : {}
24688
24688
  };
24689
24689
  });
@@ -24979,8 +24979,8 @@ const getLineChartDataLabels = (options) => {
24979
24979
  } : { display: false };
24980
24980
  };
24981
24981
  const getUnitsFromLabel = (label) => {
24982
- const matches = label.match(/\[(.*)\]/g);
24983
- const units = matches && matches.length > 0 ? matches[0] : "";
24982
+ const matches = label == null ? void 0 : label.match(/\[(.*)\]/g);
24983
+ const units = matches && (matches == null ? void 0 : matches.length) > 0 ? matches == null ? void 0 : matches[0] : "";
24984
24984
  return units;
24985
24985
  };
24986
24986
  const customFormatNumber = (labelNumber, scientificNotation) => {
@@ -25083,7 +25083,7 @@ const getDraggableData = (options) => {
25083
25083
  }
25084
25084
  } : {};
25085
25085
  };
25086
- const TOGGLE_DS_VISIBILITY = "TOGGLE_DS_VISIBILITY";
25086
+ const TOGGLE_DATA_VISIBILITY = "TOGGLE_DATA_VISIBILITY";
25087
25087
  const RESET_STATE = "RESET_STATE";
25088
25088
  const legendInitialState = {
25089
25089
  annotation: []
@@ -25094,7 +25094,7 @@ const legendReducer = (state, action) => {
25094
25094
  case RESET_STATE: {
25095
25095
  return action.payload;
25096
25096
  }
25097
- case TOGGLE_DS_VISIBILITY: {
25097
+ case TOGGLE_DATA_VISIBILITY: {
25098
25098
  const { chartInstance, dsConfig, annotationConfig } = action.payload;
25099
25099
  const { datasetIndex, datasets, dataset } = dsConfig;
25100
25100
  const { annotationIndex } = annotationConfig;
@@ -25282,7 +25282,7 @@ const useLegendState = ({ chartRef, options }) => {
25282
25282
  onLegendClick(legendItem2 == null ? void 0 : legendItem2.text, legendState);
25283
25283
  }
25284
25284
  dispatch({
25285
- type: TOGGLE_DS_VISIBILITY,
25285
+ type: TOGGLE_DATA_VISIBILITY,
25286
25286
  payload: {
25287
25287
  chartInstance,
25288
25288
  dsConfig: {