static/main.js
// This function calculates the cumulative sum over the years
This function calculates the cumulative sum over the years
This function calculates the cumulative sum over the years
function timelineDrawer(yearsCount, years, cumulativeData) {
        Highcharts.chart('timelineSamples', {
            chart: {
                type: 'area'
            },
            title: {
                text: 'Samples received by years'
            },
            credits: {
                enabled: false
            },
            xAxis: {
                categories: years,
                tickmarkPlacement: 'on',
                title: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                labels: {
                    formatter: function() {
                        return this.value;
                    }
                }
            },
            tooltip: {
                split: true,
                valueSuffix: ''
            },
            plotOptions: {
                area: {
                    stacking: 'normal',
                    lineColor: '#666666',
                    lineWidth: 1,
                    marker: {
                        lineWidth: 1,
                        lineColor: '#666666'
                    }
                }
            },
            series: [{
                type: 'column',
                name: 'new sample',
                data: yearsCount
            }, {
                type: 'line',
                name: 'Cumulative samples',
                data: cumulativeData
            }]
        });
    }
function timelineDrawer ( yearsCount , years , cumulativeData ) { Highcharts . chart ( 'timelineSamples' , { chart : { type : 'area' } , title : { text : 'Samples received by years' } , credits : { enabled : false } , xAxis : { categories : years , tickmarkPlacement : 'on' , title : { enabled : false } } , yAxis : { title : { text : '' } , labels : { formatter : function ( ) { return this . value ; } } } , tooltip : { split : true , valueSuffix : '' } , plotOptions : { area : { stacking : 'normal' , lineColor : '#666666' , lineWidth : 1 , marker : { lineWidth : 1 , lineColor : '#666666' } } } , series : [ { type : 'column' , name : 'new sample' , data : yearsCount } , { type : 'line' , name : 'Cumulative samples' , data : cumulativeData } ] } ) ; }
This function calculates the cumulative sum over the years
This function calculates the cumulative sum over the years