Fix a problem with chart count context variable.
Add dialog show/hide effect and remove appendToBody property.

- Reverting workaround applied by commit, as it found to be break functionalities : c2a5b46f9c3b9fa4ee3b885bed5b6e51a3b522e0
- Applying dialog effects as alternative workaround.