@oliasoft-open-source/charts-library 4.3.4-beta-1 → 4.3.4

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
@@ -25399,7 +25399,7 @@ const handlePointLeave = (element, chart2, annotation2) => {
25399
25399
  };
25400
25400
  const generateAnnotations = (annotationsData) => {
25401
25401
  return annotationsData == null ? void 0 : annotationsData.map((ann, idx) => {
25402
- var _a2, _b2, _c2, _d2, _e2;
25402
+ var _a2, _b2, _c2, _d2, _e2, _f2;
25403
25403
  const scaleID = (ann == null ? void 0 : ann.annotationAxis) ?? void 0;
25404
25404
  const color2 = (ann == null ? void 0 : ann.color) ?? COLORS[idx];
25405
25405
  const type = (ann == null ? void 0 : ann.type) || AnnotationType.LINE;
@@ -25426,14 +25426,14 @@ const generateAnnotations = (annotationsData) => {
25426
25426
  [AnnotationType.POINT]: {
25427
25427
  backgroundColor: ((_a2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _a2.backgroundColor) ?? TRANSPARENT,
25428
25428
  content: ann == null ? void 0 : ann.label,
25429
- display: !!(ann == null ? void 0 : ann.label),
25430
- position: ((_b2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _b2.position) ?? Position.Bottom,
25431
- color: ((_c2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _c2.color) ?? DEFAULT_COLOR,
25432
- font: ((_d2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _d2.font) ?? `12px ${DEFAULT_FONT_FAMILY}`,
25429
+ display: ((_b2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _b2.display) ?? !!(ann == null ? void 0 : ann.label),
25430
+ position: ((_c2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _c2.position) ?? Position.Bottom,
25431
+ color: ((_d2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _d2.color) ?? DEFAULT_COLOR,
25432
+ font: ((_e2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _e2.font) ?? `12px ${DEFAULT_FONT_FAMILY}`,
25433
25433
  borderWidth: BORDER_WIDTH.INITIAL,
25434
25434
  padding: 5,
25435
25435
  borderRadius: 3,
25436
- borderColor: ((_e2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _e2.borderColor) ?? TRANSPARENT
25436
+ borderColor: ((_f2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _f2.borderColor) ?? TRANSPARENT
25437
25437
  },
25438
25438
  [AnnotationType.BOX]: defLabel,
25439
25439
  [AnnotationType.ELLIPSE]: defLabel
@@ -25477,6 +25477,7 @@ const generateAnnotations = (annotationsData) => {
25477
25477
  const onDragEnd = () => (cord, annotation2) => (ann == null ? void 0 : ann.onDragEnd) ? ann == null ? void 0 : ann.onDragEnd(cord, annotation2) : void 0;
25478
25478
  return {
25479
25479
  ...ann,
25480
+ drawTime: "afterDraw",
25480
25481
  display: ann == null ? void 0 : ann.display,
25481
25482
  annotationIndex: idx,
25482
25483
  id: `${ann == null ? void 0 : ann.label}-${ann == null ? void 0 : ann.value}-${idx}`,
@@ -26254,7 +26255,7 @@ const annotationDraggerPlugin = {
26254
26255
  };
26255
26256
  }
26256
26257
  },
26257
- afterDraw(chart2) {
26258
+ afterUpdate(chart2) {
26258
26259
  var _a2, _b2, _c2, _d2;
26259
26260
  const { canvas: canvas2, scales, hoveredAnnotationId } = chart2;
26260
26261
  const pluginOptions = ((_b2 = (_a2 = chart2 == null ? void 0 : chart2.options) == null ? void 0 : _a2.plugins) == null ? void 0 : _b2.annotationDraggerPlugin) || {