On Thursday, 23 July 2015 21:15:42 UTC+1, Daniel LaLiberte wrote:
>
> The baseline that is drawn vertically is controlled by the horizontal 
> axis, because the value associated with that baseline, which is where it 
> intersects the horizontal axis, is only relevant to the hAxis.  So that is 
> why the vertical baseline is for the hAxis.
>
> Here is an example showing how you might want to display it: 
> http://jsfiddle.net/dlaliberte/13cobanx/
>
> Regarding the annotations, by the way, the way you have your data, with 
> one value per series, is going to make it more difficult to add the 
> annotations, since each series column would have to be followed by a 
> separate annotation column.  Is there a reason you need to distribute your 
> values into separate series?
>



This is what I have now



 <script type="text/javascript">
      google.load("visualization", "1.1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable
            ([['X', 'Yearly Revenue',{ role: "annotation" },{ role: 
"tooltip" }],
              ['HO + ISM', 1, '1', 'Yearly Revenue: 1'],
              ['MAXXAM', 100, '100', 'Yearly Revenue: 100'],
              ['CPS', 200, '200', 'Yearly Revenue: 200'],
              ['CTD', 300, '300', 'Yearly Revenue: 300'],
              ['MARINE & OFFSHORE', 400, '400', 'Yearly Revenue: 400'],
              ['GSIT', 500, '500', 'Yearly Revenue: 500'],
              ['NORTH ASIA', 600.50, '600.50', 'Yearly Revenue: 600.50'],
              ['MIRA', 700.55, '700.55', 'Yearly Revenue: 700.55'],
              ['EUROPE', 800.65, '800.65', 'Yearly Revenue: 800.65'],
              ['NORTH AMERICA', 8999.99, '8,999.99', 'Yearly Revenue: 
8,999.99'],
              ['LATIN AMERICA', 111, '111', 'Yearly Revenue: 111']
        ]);
        
        var options = {
          legend: 'none',
          lineWidth: 0,
          vAxis: { minValue: 0, maxValue: 1200, gridlineColor: 
'transparent'},
          
          hAxis : {textColor: 'transparent', baselineColor: 
'transparent'},          
          colors: ['#3366CC'],
          pointSize: 20,         
        };

        var chart = new 
google.visualization.LineChart(document.getElementById('Chart_Div_Revenue'));
        chart.draw(data, options);
      }
    </script> 



 How do I get both a vertical and horizontal axes? I am just getting a 
horizontal one now. Thanks

-- 
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/d/optout.

Reply via email to