Adding line markers to interactive charts...

29 views
Skip to first unread message

alex

unread,
Jul 12, 2011, 1:01:14 AM7/12/11
to Google Visualization API
Is there any way to do this? I can't find the appropriate page in the
manual...

It's clearly possible for image charts:
http://code.google.com/apis/chart/image/docs/chart_params.html#gcharts_line_markers

Thanks in advance!

Roni Biran

unread,
Jul 12, 2011, 5:18:34 AM7/12/11
to google-visua...@googlegroups.com
Hi Alex,

All you need to do is define which series use what chart type.

For your simple example, generate duplicated data series, the first will be a bar chart and the second line. That will give you the requested result.

Hope that helped,

Roni




--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


Roni Biran

unread,
Jul 12, 2011, 5:21:40 AM7/12/11
to google-visua...@googlegroups.com
Hi Alex (once again),

You can place the following script on the playground

function drawVisualization({
  // Some raw data (not necessarily accurate)
  var rowData [['Month''Bolivia''Bolivia Line'],
                 ['2004/05'165165],
                 ['2005/06'135135],
                 ['2006/07'157157],
                 ['2007/08'139139],
                 ['2008/09'136136]];

  // Create and populate the data table.
  var data google.visualization.arrayToDataTable(rowData);

  // Create and draw the visualization.
  var ac new google.visualization.ComboChart(document.getElementById('visualization'));
  ac.draw(data{
    title 'Monthly Coffee Production by Country',
    width600,
    height400,
    vAxis{title"Cups"},
    hAxis{title"Month"},
    seriesType"bars",
    series{1{type"line"}}
  });
}

Enjoy,

Roni
Reply all
Reply to author
Forward
0 new messages