1 thought on “[FEATURE] Add link to point or label

  1. @zeckart see http://www.chartjs.org/docs/latest/general/interactions/events.html#events and http://www.chartjs.org/docs/latest/developers/api.html#getelementsatevente

    code example:

    var cv = document.getElementById('chartJSContainer')
    var ctx = cv.getContext('2d');
    var chart = new Chart(ctx, options);
    cv.onclick = function(evt){
        var activePoint = chart.getElementAtEvent(evt);
        console.log('activePoint', activePoint)
        // var url = ... make link with data from activePoint
        window.location = 'https://www.google.by/search?q=chart+js+events&oq=chart+js+events'
    };

Comments are closed.