Calculates the x-coordinate of the upper left-hand side of the tooltip rectangle (obviously without "rounded corners"). Adjusts the x-coordinate so that tooltip is visible on the edges of the plot.
The current x-coordinate of the mouse
The width of the tooltip text
The dimensions of the plot
The tooltip style information
The plot margin
The x-coordinate of the lower left-hand side of the tooltip rectangle
Calculates the x-coordinate of the upper left-hand side of the tooltip rectangle (obviously without "rounded corners"). Adjusts the x-coordinate so that tooltip is visible on the edges of the plot.