Axis Title not appearing - ChartWrapper

57 views
Skip to first unread message

josep...@gmail.com

unread,
Feb 18, 2016, 11:49:21 PM2/18/16
to Google Visualization API
Hello,

I am new to Google Charts. I am using the following function in my code.

 programmaticChart  = new google.visualization.ChartWrapper({
        chartType: 'BubbleChart',
        containerId: 'programmatic_chart_div',
        options: {
          width: 1000,
          height: 450,
          chartArea: {left: 10, top: 15, right: 0, bottom: 0}, 
 vAxis: {
scaleType: 'log', title: 'Organizational'}, 
 hAxis: {
scaleType: 'log', title:'National'}
        }
      });

Everything works fine including the logarithmic scale of my axes. But the title of my axes and my chart is invisible in my output. Could you please help me?

Daniel LaLiberte

unread,
Feb 19, 2016, 8:49:32 AM2/19/16
to Google Visualization API
The titles for the axes and the overall chart go in the areas remaining outside the chart area.  That is, if your chartArea.left option is 10, then you are only leaving 10 pixels for the left axis title and ticks, which is probably not enough.  There are options to move the titles into the inside of the chart area, but the text would potentially overlap the chart graphics.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
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/4041e64b-14b6-44e7-8f4b-606202638bb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

josep...@gmail.com

unread,
Feb 20, 2016, 2:34:22 PM2/20/16
to Google Visualization API
Thanks a lot for your answer. I fixed it by changing chart.left


On Friday, February 19, 2016 at 8:49:32 AM UTC-5, Daniel LaLiberte wrote:
The titles for the axes and the overall chart go in the areas remaining outside the chart area.  That is, if your chartArea.left option is 10, then you are only leaving 10 pixels for the left axis title and ticks, which is probably not enough.  There are options to move the titles into the inside of the chart area, but the text would potentially overlap the chart graphics.
On Thu, Feb 18, 2016 at 11:49 PM, <josep...@gmail.com> wrote:
Hello,

I am new to Google Charts. I am using the following function in my code.

 programmaticChart  = new google.visualization.ChartWrapper({
        chartType: 'BubbleChart',
        containerId: 'programmatic_chart_div',
        options: {
          width: 1000,
          height: 450,
          chartArea: {left: 10, top: 15, right: 0, bottom: 0}, 
 vAxis: {
scaleType: 'log', title: 'Organizational'}, 
 hAxis: {
scaleType: 'log', title:'National'}
        }
      });

Everything works fine including the logarithmic scale of my axes. But the title of my axes and my chart is invisible in my output. Could you please help me?

--
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 google-visualization-api+unsub...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages