google chart y-axis labels not shown

Viewed 73

I am using google chart but there was one issue I don't know what's going wrong with it. When I use the chart in normal mode yaxis labels are shown but when i put the chart in modal the labels are not shown can you please tell Why?. please check the code added below

Thanx in advance for helping me

my chart code:-

google.charts.load('current', {
    'packages': ['corechart']
});
google.charts.setOnLoadCallback(drawChart);

function drawChart() {
    var data = google.visualization.arrayToDataTable([
        ['Year', 'Sales'],
        ['<?php echo $chart_year_arr[5] ?>', <?php echo $filterd_chart_arr[0] ?>],
        ['<?php echo $chart_year_arr[4] ?>', <?php echo $filterd_chart_arr[1] ?>],
        ['<?php echo $chart_year_arr[3] ?>', <?php echo $filterd_chart_arr[2] ?>],
        ['<?php echo $chart_year_arr[2] ?>', <?php echo $filterd_chart_arr[3] ?>],
        ['<?php echo $chart_year_arr[1] ?>', <?php echo $filterd_chart_arr[4] ?>],
        ['<?php echo $chart_year_arr[0] ?>', <?php echo $filterd_chart_arr[5] ?>]
    ]);


    var options = {
        title: '',
        curveType: 'function',

        legend: {
            position: 'bottom'
        },
        height: 500,
        width: 500,
        vAxis: {
            ticks: [
                {v: 0, f: '0',},
                {v: 10, f: '10'},
                {v: 20, f: '20'},
                {v: 30, f: '30'},
                {v: 40, f: '40'},
                {v: 50, f: '50'},
                {v: 60, f: '60'},
                {v: 70, f: '70'},
                {v: 80, f: '80'},
                {v: 90, f: '90'},
                {v: 100, f: '100'}
            ]

        }


    };

    var chart = new google.visualization.LineChart(document.getElementById('<?php echo $chart_container ?>'));

    chart.draw(data, options);
}

enter image description here

enter image description here

0 Answers
Related