@oliasoft-open-source/charts-library 4.0.2-beta-5 → 4.0.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.
package/dist/index.js CHANGED
@@ -25088,13 +25088,13 @@ var CUSTOM_OPTION = /* @__PURE__ */ ((CUSTOM_OPTION2) => {
25088
25088
  return CUSTOM_OPTION2;
25089
25089
  })(CUSTOM_OPTION || {});
25090
25090
  const generateLineChartDatasets = (datasets, state, options, { label }) => {
25091
- const copyDataset = [...datasets];
25092
- const { annotations, graph } = options;
25091
+ const copyDataset = [...datasets ?? []];
25092
+ const { annotations, graph } = options ?? {};
25093
25093
  const {
25094
25094
  controlAnnotation,
25095
25095
  showAnnotations,
25096
25096
  annotationsData = []
25097
- } = annotations;
25097
+ } = annotations ?? {};
25098
25098
  if (controlAnnotation && showAnnotations) {
25099
25099
  const annotationDatasets = annotationsData.map(
25100
25100
  (annotation2, index2) => {
@@ -25117,7 +25117,7 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
25117
25117
  );
25118
25118
  copyDataset.push(...annotationDatasets);
25119
25119
  }
25120
- return copyDataset.map((line, i2) => {
25120
+ return copyDataset == null ? void 0 : copyDataset.map((line, i2) => {
25121
25121
  var _a2, _b2;
25122
25122
  const {
25123
25123
  formation,
@@ -25161,7 +25161,7 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
25161
25161
  const indexedColor = COLORS[i2];
25162
25162
  return {
25163
25163
  ...line,
25164
- label: line.label || `${label} ${i2 + 1}`,
25164
+ label: (line == null ? void 0 : line.label) ?? `${label} ${i2 + 1}`,
25165
25165
  data: filteredData,
25166
25166
  showLine: lineState,
25167
25167
  lineTension,