@oliasoft-open-source/charts-library 4.5.1 → 4.5.3
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
|
@@ -25495,7 +25495,6 @@ const generateAnnotations = (annotationsData) => {
|
|
|
25495
25495
|
const onDragEnd = () => (cord, annotation2) => (ann == null ? void 0 : ann.onDragEnd) ? ann == null ? void 0 : ann.onDragEnd(cord, annotation2) : void 0;
|
|
25496
25496
|
return {
|
|
25497
25497
|
...ann,
|
|
25498
|
-
drawTime: "afterDraw",
|
|
25499
25498
|
display: ann == null ? void 0 : ann.display,
|
|
25500
25499
|
annotationIndex: idx,
|
|
25501
25500
|
id: `${ann == null ? void 0 : ann.label}-${ann == null ? void 0 : ann.value}-${idx}`,
|
|
@@ -39706,8 +39705,8 @@ const useBarChartConfig = (chartRef, chart2) => {
|
|
|
39706
39705
|
const barDatasetsCopy = [...datasets, ...annotationsDatasets];
|
|
39707
39706
|
const generatedDatasets2 = barDatasetsCopy.map((barDataset, index2) => {
|
|
39708
39707
|
const colorSchema = COLORS;
|
|
39709
|
-
const colors2 = barDataset.data.map((_2
|
|
39710
|
-
const colorSelectionIndex = datasets.length > 1 ? index2 :
|
|
39708
|
+
const colors2 = barDataset.data.map((_2) => {
|
|
39709
|
+
const colorSelectionIndex = datasets.length > 1 ? index2 : 0;
|
|
39711
39710
|
return colorSchema[colorSelectionIndex] || generateRandomColor(COLORS);
|
|
39712
39711
|
});
|
|
39713
39712
|
const backgroundColors = barDataset.backgroundColor || colors2.map((color2) => color2 + ALPHA_CHANEL);
|