I would like to implement Highchats on the article_details.tpl page. I have place the below code in outputFrontend.tpl and the chart showing with the demo json data. How do modify the below code to get the actual data number of artical views on the daily basic. Please help…
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
</div>
</div>
<script>
Highcharts.getJSON('https://cdn.jsdelivr.net/gh/highcharts/highcharts@v7.0.0/samples/data/usdeur.json', function (data) {
// Create the chart
Highcharts.stockChart('container', {
rangeSelector: {
selected: 0
},
title: {
text: 'Complete Article View Data'
},
tooltip: {
style: {
width: '200px'
},
valueDecimals: 0,
shared: true
},
yAxis: {
title: {
text: ''
}
},
series: [{
name: 'Views',
data: data,
id: 'dataseries'
// the event marker flags
}, {
type: 'flags',
data: [],
onSeries: 'dataseries',
shape: 'circlepin',
width: 16
}]
});
});
</script>