@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 +19 -20
- package/dist/index.js.map +1 -1
- package/dist/src/components/line-chart/line-chart.stories.d.ts +136 -111
- package/package.json +1 -1
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
|
-
|
|
24603
|
-
|
|
24604
|
-
|
|
24605
|
-
|
|
24606
|
-
|
|
24607
|
-
|
|
24608
|
-
|
|
24609
|
-
|
|
24610
|
-
|
|
24611
|
-
|
|
24612
|
-
|
|
24613
|
-
|
|
24614
|
-
|
|
24615
|
-
|
|
24616
|
-
|
|
24617
|
-
|
|
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) => {
|