The reason you see just the speed data is because you draw the Dashboard 
with the area data and then immediately draw over it with the speed data. 
 Dashboards can only use a single set of data.  In your case, since you 
have two data sets with a common column (Tech), you might want to consider 
combining both data sets together into a single data set and then using the 
"view" parameter of each ChartWrapper object to separate out the columns, 
eg:

var data = google.visualization.arrayToDataTable([
    ['Tech', 'Target', 'SynArea', 'LayoutArea', 'Target', 'CLK', 'I/O', 
'Mem',  'CG','CLK', 'Mem',  'CG', 'CLK', 'I/O', 'Mem',  'CG'],
    ['28hplbwp12t', 200, 736470, 866021, 200, 200, 200, 201, 251, 203, 205, 
230, 205, 206, 212, 245],
    //...
]);

then in your ChartWrappers:

// Define a table
var table_area = new google.visualization.ChartWrapper({
    'chartType': 'Table',
    'containerId': 'chart_area',
    'options': {
        'width': '600px'
    },
    view: {
        columns: [0, 1, 2, 3]
    }
});

// Define a table
var table_speed = new google.visualization.ChartWrapper({
    'chartType': 'Table',
    'containerId': 'chart_speed',
    'options': {
        'width': '600px'
    },
    view: {
        columns: [0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
    }
});

then draw your Dashboard with the single data set:

var dashboard_area = new 
google.visualization.Dashboard(document.getElementById('dashboard_area'));
dashboard_area.bind(categoryPicker, [table_area, table_speed]);
dashboard_area.draw(data);

On Thursday, July 24, 2014 5:20:50 PM UTC-4, Rashed Islam wrote:

> Hi,
>  I am trying to generate two table charts, and one Controller which will 
> control all of the tables. However, I am having some trouble. 
> Both of my tables are drawn, but they are being drawn with the same data. 
> I am attaching the code. There are two sets of data, area_data and 
> speed_data. However, after drawing it, I see that
> both table has the speed_data. 
> Can anyone help to find out what I am doing wrong?
>
> Thanks in advance.
>
>

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

Reply via email to