Subtitle is not visible in Line Chart

1,856 views
Skip to first unread message

prasanna gholap

unread,
Feb 9, 2015, 5:42:20 AM2/9/15
to google-visua...@googlegroups.com
I am trying to execute following code. But my title and subtitles are not shown in graph. 
When I remove subtitle option, title is visible.

Is there any problem with this code?
  
<html>
  <head>
    <script type="text/javascript"
            'modules':[{
              'name':'visualization',
              'version':'1',
              'packages':['corechart']
            }]
          }"></script>

    <script type="text/javascript">
      google.setOnLoadCallback(drawChart);
    function drawChart() {
      var data = new google.visualization.arrayToDataTable([["execution_ts","user1","user2","user3","user4","User5", "User6"],["2014-10-29",0,0,0,0,0,0],["2014-10-30",1,0,0,0,0,0],["2014-10-31",0,0,0,0,0,0],["2014-11-01",0,0,0,0,0,0],["2014-11-02",0,0,0,0,0,0],["2014-11-03",0,2,0,0,0,0],["2014-11-04",0,0,0,0,0,0],["2014-11-05",0,0,0,0,0,0],["2014-11-06",0,0,0,0,0,0],["2014-11-07",0,0,0,0,0,0],["2014-11-08",0,0,0,0,0,0],["2014-11-09",0,0,0,0,0,0],["2014-11-10",0,0,0,0,0,0],["2014-11-11",0,0,0,0,0,0],["2014-11-12",0,0,0,0,0,0],["2014-11-13",5,0,37,28,5,0],["2014-11-14",0,0,0,0,0,0],["2014-11-15",0,0,0,0,0,0],["2014-11-16",0,0,0,0,0,0],["2014-11-17",0,0,0,0,0,0],["2014-11-18",0,0,0,0,0,0],["2014-11-19",0,0,0,0,0,0]]);
      
      var options = {
      title: 'Execution Progress Per User',
                subtitle: 'Target Date: Some Date'
      width: 900,
      height: 500
    };
  var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));

  chart.draw(data, options);
  }
  </script>
  </head>
  <body>
  <div id="curve_chart" style="width: 900px; height: 500px"></div>
  </body> 
  </html>

~Pras

Jon Orwant

unread,
Feb 9, 2015, 8:10:12 AM2/9/15
to google-visua...@googlegroups.com
Only Material charts support subtitles, and LineChart isn't a Material chart. Also, there's no comma after your "subtitle" line.

Jon

--
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

prasanna gholap

unread,
Feb 10, 2015, 1:50:00 AM2/10/15
to google-visua...@googlegroups.com
Thanks Jon. No comma was a typo which wasn't there in actual code.

Is there any way to insert an extra information about graph?

-- Pras

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/4-iLvlaZK88/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages