Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip position due to legendOffset and domainLabel #93

Closed
40in opened this issue Jun 19, 2014 · 1 comment
Closed

Tooltip position due to legendOffset and domainLabel #93

40in opened this issue Jun 19, 2014 · 1 comment

Comments

@40in
Copy link

40in commented Jun 19, 2014

I have found that tooltip doesn't consider legendPosition and domainLabel position.

You may take a look here - http://jsfiddle.net/9sfsk/result/

I assume adding some additional cases, like:

if (self.options.legendVerticalPosition === "top") {
    tooltipLegendOffset = self.options.legendMargin[0] + self.options.legendMargin[2] + self.options.legendCellSize;
}

self.tooltip.attr("style", "display: block; " + 
    "left: " + (self.positionSubDomainX(d.t) - self.tooltip[0][0].offsetWidth/2 + options.cellSize/2 + parseInt(domainNode.getAttribute("x"), 10) + self.domainHorizontalLabelWidth) + "px; " +
    "top: "  + (self.positionSubDomainY(d.t) - self.tooltip[0][0].offsetHeight - options.cellSize/2 + parseInt(domainNode.getAttribute("y"), 10) + legendOffset) + "px;");

Surely, it's just an example, considering all position cases requires more options.

@guilhermedecampo
Copy link

I'm facing this =)

I'll try your additional cases, thanks for that!

@wa0x6e wa0x6e closed this as completed in d03c19c Nov 12, 2014
wa0x6e pushed a commit that referenced this issue Nov 8, 2022
chore(deps): update dependency puppeteer to v17.1.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants