Highcharts on article_details page

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>

Hi @Adam_Harris_bin_Supp,

What version of OJS you are working with?

The latest version OJS 3.3.0.7

In 3.3 Submission object has a method getViews that returns the number of views associated with the submission: pkp-lib/PKPSubmission.inc.php at ca7e0ef08dd859341c3323c87895ef336e0d28ae · pkp/pkp-lib · GitHub

This object is already assigned to the article template: ojs/article.tpl at 2dcaac64d15c637e9113c146856d3371234c7506 · pkp/ojs · GitHub