I am using date as hAxis with specific date format. However, when i include 
'explorer' option to enable user to be able to zoom, the hAxis date format 
is lost. Please help to resolve.

My code is as below:

<html>
<head>
 <script src='jquery-1.11.2.min.js'></script> 
 <link rel="stylesheet" type="text/css" href="jquery-ui.min">
</head>
<body>
<div id='curve_chart'>


</div>
<script type="text/javascript" src=
"https://www.gstatic.com/charts/loader.js";></script>
    <script type="text/javascript">
      google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawChart);


      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('date', 'Date');
        data.addColumn('number', 'Kepler-22b mission');
 data.addColumn({type:'number',role:'annotation'});
 data.addRows([
          [new Date(2014, 2, 15), 12400,12400],
          [new Date(2014, 2, 16), 24045,24045],
          [new Date(2014, 2, 17), 35022,35022],
          [new Date(2014, 2, 18), 12284,12284],
          [new Date(2014, 2, 19), 8476,8476],
          [new Date(2014, 2, 20), 0,0]
        ]);
 
        var chart = new google.visualization.LineChart(document.
getElementById('curve_chart'));


        var options = {
          displayAnnotations: true,
  hAxis: {
            format: 'dd-MMM-yy'
          },
  explorer: { actions: ['dragToZoom', 'rightClickToReset'],keepInBounds:true 
} 
        };


        chart.draw(data, options);
      }
    </script>

</body>


</html>



-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/a9dcb26b-f81b-4bbc-80bf-400bfdc691c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to