With discrete string values in your first column, no gridlines or baslines
will be displayed at all, at least currently.

But there is a couple of hacks you can do if you really want gridlines.
You'll have to convert your strings to a sequence of integers, and for each
value, give its formatted representation.  Like this:

        var data = google.visualization.arrayToDataTable
            ([['X', 'Yearly Revenue',{ role: "annotation" },{ role:
"tooltip" }],
              [{v:0, f:'HO + ISM'}, 1, '1', 'Yearly Revenue: 1'],
              [{v:1, f:'MAXXAM'}, 100, '100', 'Yearly Revenue: 100'],
    ...

If you don't want to display the hAxis tick labels, then you are done, but
if you do, then you'll need to specify the 'ticks' option, with the same
values and formatted values.

var options = {
  hAxis: {
    ticks: [{v: 0, f: 'HO + ISM'}, {v:1, f: 'MAXXAM'}, ... ]
  }
}

On Thu, Jul 23, 2015 at 4:30 PM, Pamela Whittaker <
[email protected]> wrote:

>
>
> 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
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA

-- 
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