src/charts/mini-tooltip.js
function updatePositionAndSize(mousePosition, parentChartSize) {
            let [tooltipX, tooltipY] = getTooltipPosition(mousePosition, parentChartSize);

            svg.transition()
                .duration(mouseChaseDuration)
                .ease(ease)
                .attr('height', chartHeight + margin.top + margin.bottom)
                .attr('width', chartWidth + margin.left + margin.right)
                .attr('transform', `translate(${tooltipX},${tooltipY})`);

            tooltipBackground
                .attr('height', chartHeight + margin.top + margin.bottom)
                .attr('width', chartWidth + margin.left + margin.right);
        }
function updatePositionAndSize(mousePosition, parentChartSize) {
            let [tooltipX, tooltipY] = getTooltipPosition(mousePosition, parentChartSize);

            svg.transition()
                .duration(mouseChaseDuration)
                .ease(ease)
                .attr('height', chartHeight + margin.top + margin.bottom)
                .attr('width', chartWidth + margin.left + margin.right)
                .attr('transform', `translate(${tooltipX},${tooltipY})`);

            tooltipBackground
                .attr('height', chartHeight + margin.top + margin.bottom)
                .attr('width', chartWidth + margin.left + margin.right);
        }
function updatePositionAndSize ( mousePosition , parentChartSize ) { let [ tooltipX , tooltipY ] = getTooltipPosition ( mousePosition , parentChartSize ) ; svg . transition ( ) . duration ( mouseChaseDuration ) . ease ( ease ) . attr ( 'height' , chartHeight + margin . top + margin . bottom ) . attr ( 'width' , chartWidth + margin . left + margin . right ) . attr ( 'transform' , ` ${ tooltipX } ${ tooltipY } ` ) ; tooltipBackground . attr ( 'height' , chartHeight + margin . top + margin . bottom ) . attr ( 'width' , chartWidth + margin . left + margin . right ) ; }
Updates size and position of tooltip depending on the side of the chart we are in
@param  {Object} dataPoint DataPoint of the tooltip
@return void
Updates size and position of tooltip depending on the side of the chart we are in