FVANCOP / ChartNew.js

MIT License
420 stars 143 forks source link

Annotations remain on new screen #489

Open ScottEKelley opened 7 years ago

ScottEKelley commented 7 years ago

Hi,

When annotateDisplay is true and the response from a clicking, say, a section of a pie chart sends the user to a new view, the annotations remain.

This is an SPA angular app so that is understandable. But is there any way to disable the annotations before navigating to a new view?

I have tried the following without success:

chartopts.annotateDisplay = false updateChart(document.getElementById('canvas').getContext('2d'), [], chartopts, false, false)

Thank you!

ScottEKelley commented 7 years ago

A workaround when navigating to a new view might be:

var divCursor = document.getElementById('divCursor') if (divCursor) { divCursor.style.display = "none" }

NevillePerkins commented 6 years ago

I've seen the same behaviour in AngularJS SPA.

BTW, how did you create your AngularJS directive for ChartNew.js?