js/highcharts-master/samples/highcharts/chart/events-selection-points/demo.js
/**
 * Display a temporary label on the chart
 */
Display a temporary label on the chart
Display a temporary label on the chart
function toast(chart, text) {
    chart.toast = chart.renderer.label(text, 100, 120)
        .attr({
            fill: Highcharts.getOptions().colors[0],
            padding: 10,
            r: 5,
            zIndex: 8
        })
        .css({
            color: '#FFFFFF'
        })
        .add();
    setTimeout(function () {
        chart.toast.fadeOut();
    }, 2000);
    setTimeout(function () {
        chart.toast = chart.toast.destroy();
    }, 2500);
}
function toast ( chart , text ) { chart . toast = chart . renderer . label ( text , 100 , 120 ) . attr ( { fill : Highcharts . getOptions ( ) . colors [ 0 ] , padding : 10 , r : 5 , zIndex : 8 } ) . css ( { color : '#FFFFFF' } ) . add ( ) ; setTimeout ( function ( ) { chart . toast . fadeOut ( ) ; } , 2000 ) ; setTimeout ( function ( ) { chart . toast = chart . toast . destroy ( ) ; } , 2500 ) ; }
Display a temporary label on the chart
Display a temporary label on the chart