Q : i want to show every day of month on h-axis but currently it showing 2 
, 6 , 9 so on till 30. Please check the code. 



 <!--Load the AJAX API-->
    <script type="text/javascript" 
src="https://www.google.com/jsapi";></script>
    <script type="text/javascript">
     var data;
     var chart;

      // Load the Visualization API and the piechart package.
      google.load('visualization', '1', {'packages':['corechart']});

      // Set a callback to run when the Google Visualization API is loaded.
      google.setOnLoadCallback(drawChart);

      // Callback that creates and populates a data table,
      // instantiates the pie chart, passes in the data and
      // draws it.
      function drawChart() {

       //  Create our data table.
        data = new google.visualization.DataTable();
        data.addColumn('number', 'Date');
        data.addColumn('number', 'Income');
        // console.log(Math.random(10000));

        for(var a = 1 ; a <= 30 ; a++)
        {
           data.addRow([a,Math.floor((Math.random()*50000))]);
        }

        
        // Set chart options
       var options = {
          title: 'Income Of This Month',
          hAxis: {title: 'Days' },
          vAxis: {title: 'Income'},
         
        };


        // Instantiate and draw our chart, passing in some options.
        chart = new 
google.visualization.AreaChart(document.getElementById('chart_div'));
        // google.visualization.events.addListener(chart, 'select', 
selectHandler);
        chart.draw(data, options);
      }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

<<attachment: Capture.PNG>>

Reply via email to