function showGraph() {
        if ($('.about-graph').length !== 0) {
            var aboutGraph = new Graph('.about-graph', 'supersonic/js/graph-data', {
                clickActiveElements: []
            });

            $('#aboutGraph').on('click', function() {
                if (!$(this).hasClass('active')) {
                    aboutGraph.update('supersonic/js/graph-data', {
                        removeElements: [],
                        clickActiveElements: []
                    });

                    $('.about-graph-buttons a').each(function() {
                        if ($(this).hasClass('active')) {
                            $(this).removeClass('active');
                        }

                        if ($(this).hasClass('skills')) {
                            $(this).addClass('active');
                        }
                    });
                }

                $(this).toggleClass('active');
                $('.about-toggle-button').toggleClass('active');

                $('.hideaway-content').slideToggle('middle');

                $('.showing-content').slideToggle('middle');
            });

            $('.about-graph-buttons a.skills').on('click', function () {
                aboutGraph.update('supersonic/js/graph-data', {
                    removeElements: [],
                    clickActiveElements: []
                });
            });

            $('.about-graph-buttons a.education').on('click', function () {
                aboutGraph.update('supersonic/js/second-graph-data', {
                    removeElements: [
                        'xAxis',
                        'pathArea',
                        'yAxis',
                        'tooltips'
                    ],
                    extendedTooltip: true
                });
            });

            $('.about-graph-buttons a').on('click', function() {
                $('.about-graph-buttons a').removeClass('active');
                $(this).addClass('active');
            });


            addWidth();

            $window.resize(function () {
                addWidth();
            });
        }
        /**
         * Function to add width to graph parent container when window width less than 767px.
         */
        function addWidth() {
            if (window.innerWidth <= 767) {
                $('.about-graph').width(window.innerWidth - 100);
            } else {
                $('.about-graph').removeAttr('style');
            }
        }
    }
// Function to show/hide graph on button click.
Function to show/hide graph on button click.
Function to show / hide graph on button click .
function showGraph() {
        if ($('.about-graph').length !== 0) {
            var aboutGraph = new Graph('.about-graph', 'supersonic/js/graph-data', {
                clickActiveElements: []
            });
            $('#aboutGraph').on('click', function() {
                if (!$(this).hasClass('active')) {
                    aboutGraph.update('supersonic/js/graph-data', {
                        removeElements: [],
                        clickActiveElements: []
                    });
                    $('.about-graph-buttons a').each(function() {
                        if ($(this).hasClass('active')) {
                            $(this).removeClass('active');
                        }
                        if ($(this).hasClass('skills')) {
                            $(this).addClass('active');
                        }
                    });
                }
                $(this).toggleClass('active');
                $('.about-toggle-button').toggleClass('active');
                $('.hideaway-content').slideToggle('middle');
                $('.showing-content').slideToggle('middle');
            });
            $('.about-graph-buttons a.skills').on('click', function () {
                aboutGraph.update('supersonic/js/graph-data', {
                    removeElements: [],
                    clickActiveElements: []
                });
            });
            $('.about-graph-buttons a.education').on('click', function () {
                aboutGraph.update('supersonic/js/second-graph-data', {
                    removeElements: [
                        'xAxis',
                        'pathArea',
                        'yAxis',
                        'tooltips'
                    ],
                    extendedTooltip: true
                });
            });
            $('.about-graph-buttons a').on('click', function() {
                $('.about-graph-buttons a').removeClass('active');
                $(this).addClass('active');
            });
            addWidth();
            $window.resize(function () {
                addWidth();
            });
        }
        function addWidth() {
            if (window.innerWidth <= 767) {
                $('.about-graph').width(window.innerWidth - 100);
            } else {
                $('.about-graph').removeAttr('style');
            }
        }
    }
function showGraph ( ) { if ( $ ( '.about-graph' ) . length !== 0 ) { var aboutGraph = new Graph ( '.about-graph' , 'supersonic/js/graph-data' , { clickActiveElements : [ ] } ) ; $ ( '#aboutGraph' ) . on ( 'click' , function ( ) { if ( ! $ ( this ) . hasClass ( 'active' ) ) { aboutGraph . update ( 'supersonic/js/graph-data' , { removeElements : [ ] , clickActiveElements : [ ] } ) ; $ ( '.about-graph-buttons a' ) . each ( function ( ) { if ( $ ( this ) . hasClass ( 'active' ) ) { $ ( this ) . removeClass ( 'active' ) ; } if ( $ ( this ) . hasClass ( 'skills' ) ) { $ ( this ) . addClass ( 'active' ) ; } } ) ; } $ ( this ) . toggleClass ( 'active' ) ; $ ( '.about-toggle-button' ) . toggleClass ( 'active' ) ; $ ( '.hideaway-content' ) . slideToggle ( 'middle' ) ; $ ( '.showing-content' ) . slideToggle ( 'middle' ) ; } ) ; $ ( '.about-graph-buttons a.skills' ) . on ( 'click' , function ( ) { aboutGraph . update ( 'supersonic/js/graph-data' , { removeElements : [ ] , clickActiveElements : [ ] } ) ; } ) ; $ ( '.about-graph-buttons a.education' ) . on ( 'click' , function ( ) { aboutGraph . update ( 'supersonic/js/second-graph-data' , { removeElements : [ 'xAxis' , 'pathArea' , 'yAxis' , 'tooltips' ] , extendedTooltip : true } ) ; } ) ; $ ( '.about-graph-buttons a' ) . on ( 'click' , function ( ) { $ ( '.about-graph-buttons a' ) . removeClass ( 'active' ) ; $ ( this ) . addClass ( 'active' ) ; } ) ; addWidth ( ) ; $window . resize ( function ( ) { addWidth ( ) ; } ) ; } function addWidth ( ) { if ( window . innerWidth <= 767 ) { $ ( '.about-graph' ) . width ( window . innerWidth - 100 ) ; } else { $ ( '.about-graph' ) . removeAttr ( 'style' ) ; } } }
Function to show/hide graph on button click.
Function to show / hide graph on button click .
/**
         * Function to add width to graph parent container when window width less than 767px.
         */