@oliasoft-open-source/charts-library 4.1.10 → 4.1.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
@@ -24598,26 +24598,25 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
24598
24598
  annotationsData = []
24599
24599
  } = annotations ?? {};
24600
24600
  if (controlAnnotation && showAnnotations) {
24601
- const annotationDatasets = annotationsData.map(
24602
- (annotation2, index2) => {
24603
- const color2 = annotation2.color ?? COLORS[index2];
24604
- const borderDash = ANNOTATION_DASH;
24605
- const borderWidth = BORDER_WIDTH.INITIAL;
24606
- return {
24607
- ...annotation2,
24608
- isAnnotation: true,
24609
- annotationType: annotation2.type,
24610
- label: annotation2.label,
24611
- annotationIndex: index2,
24612
- backgroundColor: color2,
24613
- pointBackgroundColor: color2,
24614
- borderColor: color2,
24615
- borderDash,
24616
- borderWidth,
24617
- data: [{}]
24618
- };
24619
- }
24620
- );
24601
+ const annotationDatasets = annotationsData.map((ann, index2) => {
24602
+ const { type, ...annotation2 } = ann;
24603
+ const color2 = annotation2.color ?? COLORS[index2];
24604
+ const borderDash = ANNOTATION_DASH;
24605
+ const borderWidth = BORDER_WIDTH.INITIAL;
24606
+ return {
24607
+ ...annotation2,
24608
+ isAnnotation: true,
24609
+ annotationType: type,
24610
+ label: annotation2.label,
24611
+ annotationIndex: index2,
24612
+ backgroundColor: color2,
24613
+ pointBackgroundColor: color2,
24614
+ borderColor: color2,
24615
+ borderDash,
24616
+ borderWidth,
24617
+ data: [{}]
24618
+ };
24619
+ });
24621
24620
  copyDataset.push(...annotationDatasets);
24622
24621
  }
24623
24622
  return copyDataset == null ? void 0 : copyDataset.map((line, i2) => {