Hello,
I am using your example:
https://www.scichart.com/documentation/js/current/CursorModifier_CustomisingContainer.html
new CursorModifier({
showYLine: false,
axisLabelFill: "#484848",
tooltipLegendOffsetX: 10, - doesn't work
crosshairStrokeDashArray: [5, 5],
crosshairStrokeThickness: 1,
crosshairStroke: _theme.crosshairStrokeSupplyDemand,
showTooltip: true,
tooltipSvgTemplate: getTooltipSvgTemplate
})
Is it possible to offset the tooltip from the X-axis? If it is on the right side of the axis, the spacing is maintained, unfortunately, if it is on the left side, it is ‘stuck’ to the line.
Thanks in advance.
Best regards,
Kamil
- Kamil Macura asked 2 weeks ago
- last edited 1 week ago
-
also showLabel doesn’t work in LineAnnotation
-
If I’m not mistaken, currently showLabel is supposed to work only in Vertical and Horizonatal Annotations. Please create a separate question if you need a further assitance with the label.
- You must login to post comments
The offset is applied with adjustTooltipPosition function.
So you can customize it as needed, for example:
const adjustTooltipPosition = (
width: number,
height: number,
svgAnnotation: CursorTooltipSvgAnnotation
) => {
const { seriesViewRect } = svgAnnotation.parentSurface;
const xCoord = svgAnnotation.x1;
const yCoord = svgAnnotation.y1;
const xCoordShift =
// +- 5 is an adjustment offset value
translateToNotScaled(seriesViewRect.width) - xCoord < width ? -width - 5 : 5;
const yCoordShift =
translateToNotScaled(seriesViewRect.height) - yCoord < height ? -height : 5;
svgAnnotation.xCoordShift = xCoordShift;
svgAnnotation.yCoordShift = yCoordShift;
};
- Jim Risen answered 1 week ago
- You must login to post comments
Please login first to submit.