@opendata-ai/openchart-engine 6.5.0 → 6.5.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
@@ -393,12 +393,6 @@ function nudgeAnnotationFromObstacles(annotation, originalAnnotation, scales, ch
393
393
  const labelCenterY = candidateBounds.y + candidateBounds.height / 2;
394
394
  const inBounds = labelCenterX >= chartArea.x && labelCenterX <= chartArea.x + chartArea.width + 10 && labelCenterY >= chartArea.y - fontSize && labelCenterY <= chartArea.y + chartArea.height + fontSize * 3;
395
395
  if (inBounds) {
396
- if (candidateLabel.connector && dx === 0 && dy !== 0) {
397
- candidateLabel.connector = {
398
- ...candidateLabel.connector,
399
- style: "caret"
400
- };
401
- }
402
396
  annotation.label = candidateLabel;
403
397
  return true;
404
398
  }
@@ -7486,7 +7480,7 @@ function computeDimensions(spec, options, legendLayout, theme, strategy) {
7486
7480
  }
7487
7481
  }
7488
7482
  }
7489
- if (spec.annotations.length > 0 && encoding.x) {
7483
+ if (strategy?.annotationPosition !== "tooltip-only" && spec.annotations.length > 0 && encoding.x) {
7490
7484
  const xField = encoding.x.field;
7491
7485
  let maxX;
7492
7486
  for (const row of spec.data) {