Can you please elaborate on what you mean. I'm using a PHP generator to generate these webpages based on a database so I don't have access to JS code to modify it. I have to use PHP using a mehtod called OnPrepareChart($chart) to insert these options, most of the options work except setting titles to the axes. Here's a picture of the chart.
<https://lh3.googleusercontent.com/-oSE6fTddIJ0/Vz37prn83lI/AAAAAAAAG1U/9UD0hs87-xslsvVd24tSKWD-xoQAd-Y6wCLcB/s1600/chart.PNG> No matter what I do, it displays it on both axes. It seems that hAxis has precedence over the vAxis in the sense that if I only specify a vAxis title, it will display that on both axes but if I specify both, it will pick the hAxis to display. Thank you for your reply On Thursday, May 19, 2016 at 1:34:09 PM UTC-4, Daniel LaLiberte wrote: > > I suspect you are not actually getting the options structure in the > browser that you believe you are based on your server side code. Can you > point us to a web page that shows the chart you are drawing? > > On Thu, May 19, 2016 at 10:55 AM, Yousef El-Khalili < > [email protected] <javascript:>> wrote: > >> This is the code I'm using to set the titles: >> >> >> if ($chart->getId() === 'Stats_2016') { >> >> $chart->setOptions(array( >> >> 'vAxis' => array('title' => "Stats"), >> 'hAxis' => array('title' => "Division"), >> >> )); >> >> } >> >> >> >> On Thursday, May 19, 2016 at 10:44:16 AM UTC-4, Yousef El-Khalili wrote: >>> >>> I'm generating a google column chart and I have this as my options array >>> (taken from the page source after the chart is generated) >>> >>> options: {"title":"Overall >>> Stats","height":350,"vAxis":{"title":"Stats"},"hAxis":{"title":"Division"}}, >>> >>> However, this sets "Division" to both the horizontal and vertical axes >>> for some reason. >>> >>> Does anyone know why? >>> >> -- >> 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] >> <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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/ba870895-5dba-4763-bc9c-d3229b941606%40googlegroups.com >> >> <https://groups.google.com/d/msgid/google-visualization-api/ba870895-5dba-4763-bc9c-d3229b941606%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> > [email protected] <javascript:> 5CC, Cambridge 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 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/1246e034-fbd2-48b9-be11-0b365446e007%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
