ZingChart: How do I add tooltips outside of a chart?

To add tooltips outside of ZingChart you will need to utilize our API to grab the value and plain vanilla JS, or a library, to update the DOM with the value. My suggestion to mimics tooltips functionality would be registering the node_mouseover and node_mouseout events to do this. It would look something like this.

// first parameter can be null for all charts or
// 'demo-chart' to bind just to this chart
zingchart.bind(null, 'node_mouseover', function(p) {
    document.getElementById('output').innerHTML = p.value;
});
zingchart.bind(null, 'node_mouseout', function(p) {
    document.getElementById('output').innerHTML = '';
});

Documentation

API events
zingchart object

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us