Chart with No Controls in a Dashboard

797 views
Skip to first unread message

Josiah

unread,
Jun 16, 2011, 3:15:01 PM6/16/11
to Google Visualization API
I want to have two charts that are a part of a dashboard, but I only
want one of them to have controls. It seems that charts that are a
part of a dashboard will not render unless I bind them to a control.
Is there any way to have a chart without controls other than creating
it separately from the dashboard? Thanks.

Josiah

unread,
Jun 17, 2011, 10:55:00 AM6/17/11
to Google Visualization API
Anyone have any ideas? Another issue that I'm running into is if I
create charts separate from a dashboard, I can't pick and choose which
DataTable columns to display in the chart.

asgallant

unread,
Jun 17, 2011, 2:25:29 PM6/17/11
to google-visua...@googlegroups.com
The dashboards are still in development, and are not feature-complete (AFAIK).

If you want to draw two charts off of a single data source the "old" way, use dataViews: http://code.google.com/apis/chart/interactive/docs/reference.html#DataView

Riccardo Govoni

unread,
Jun 20, 2011, 6:45:53 AM6/20/11
to google-visua...@googlegroups.com
If one of the two charts is not dependent on any control, can't you just feed it the entire datatable you'd otherwise give to the dashboard? Like:

var data = new google.visualization.DataTable();
// fill data

// Dependent chart
var chart1 = new google.visualization.ChartWrapper({ });
var control1 = new google.visualization.ControlWrapper({ });

// 'free' chart
var chart2 = new google.visualization.ChartWrapper({ });

// Draw the dashboard
new google.visualization.Dashboard().bind(control1, chart1).draw(data);
chart2.setDataTable(data).draw();

As asgallant says, you'd still be able to use DataViews ( or chartwrapper 'view' parameter ) to manipulate column selection.

/R.
Reply all
Reply to author
Forward
0 new messages