score:1

The issue seems to be when the tooltip appears at the highest point in the chart. Maybe a bug, not really sure.

But here's one way of doing it, might not be the best way:

chart.forceY([0,160]);

By looking at your chart I'm assuming that 140 is the highest value in you chart. So I'm forcing the Y axis on the chart to show values between 0-160.

Update

Earlier I suggested the use of chart.forceY([0,160]); as a work around to adding margin to the chart top so the tooltips are clearly visible with the highest points. Although this approach only makes changes to the main chart and not the focus chart.

After some further investigation, I found out that you could use the following to rescale the chart and the focus:

chart.lines.forceY([0, yMax])
chart.lines2.forceY([0, yMax])

Here's a working example of using with a NVD3 lineWithFocusChart(). I have also got the yMaxdynamically in line 15 of my code.


Related Query

More Query from same tag