Onclick refresh bar chart with new data javascript (morris chart)
问题 I've set up bar chart. Data for default/when page loads I get via php. This part it is ok and works (I've followed some example that was on the web.) function init_morris_charts() { if( typeof (Morris) === 'undefined'){ return; } console.log('init_morris_charts'); if ($('#graph_bar').length){ morbar = Morris.Bar({ element: 'graph_bar', data: [ <?php echo $tocke; ?> ], xkey: 'date', ykeys: ['marketcap'], labels: ['Market cap value USD'], barRatio: 0.4, barColors: ['#aa8400'], xLabelAngle: 0,