Re: [visualization-api] Digest for google-visualization-api@googlegroups.com - 8 Messages in 6 Topics

9 views
Skip to first unread message

bill wagner

unread,
Dec 16, 2009, 8:04:07 PM12/16/09
to google-visua...@googlegroups.com
Hi Guys, is there a way to link Google Spread sheet files one to each other?.

On Wed, Dec 16, 2009 at 6:16 PM, <google-visua...@googlegroups.com> wrote:
  Today's Topic Summary

Group: http://groups.google.com/group/google-visualization-api/topics

    Matthew Carroll <matthew....@gmail.com> Dec 16 09:45AM -0800
     
    Cheers Visualizations Crew -
     
    I feel like a newb asking this question, but I cannot seem to grasp how to
    join DataTables/Views. I know that I am going to get pointed to the API
    reference, but I don't the format.
     
    I am pulling two different queries from different Google Spreadsheets and
    need to join columns from each. I understand the constructor arguments, but
    not the format to actually handle the join of the two tables.
     
    Can someone please help with some sample code or additional resources to
    help me figure it out?
     
    Cheers - Matt

     

    Robert Firicano <pegas...@gmail.com> Dec 16 12:52PM -0500
     
    You need an I'd that is common in both spreadsheets
     
     
     
     
    On Dec 16, 2009, at 12:45 PM, Matthew Carroll <matthew....@gmail.com

     

    NHcoder <n8u...@gmail.com> Dec 16 09:37AM -0800
     
    I'm using the Gauge visualization to display AC current measured to 1
    decimal place. Making the gauge work was easy as I jmultiply my data
    value by 10 so that the range is an integer. My issue is with the
    displayed value at the bottom of the gauge. That value is displayed
    like "218" which is actually "21.8". It would be nice if there was a
    configuration option to define the number of decimal places for
    display with a default of none.

     

    Lisa <lwoo...@acm.org> Dec 16 09:28AM -0800
     
    I worked around it by handling all timezone info on the server side,
    adjusting as needed when I generate the DataTable.
     
     

     

    Evgeny Fisherov <evg...@gmail.com> Dec 16 09:21AM -0800
     
    Hello
    I sthere any way to update AnnotatedTimeLine instance dynamically and
    not in onRender() method?
    I need it in order to display dynamically changed information.
     
    Thank you,
    Evgeny

     

    LaFouine <junichi...@gmail.com> Dec 16 09:22AM -0800
     
    Hello,
     
    I would like to make an interaction of scatterchart and linechart.
     
    data1 and data2 are related by Sample ('A','B','C','D').
     
    When I click a point of the scatterchart, I want to make highlight the
    line of corresponding sample in linechart.
     
    Is it possible?
     
     
    <html>
    <head>
    <script type="text/javascript" src="http://www.google.com/jsapi"></
    script>
    <script type="text/javascript">
    google.load("visualization", "1", {packages:
    ["linechart","scatterchart","Table"]});
    google.setOnLoadCallback(drawChart);
    function drawChart() {
    // data for scatterchart
    var data1 = new google.visualization.DataTable();
    data1.addColumn('number', 'Year');
    data1.addColumn('number', 'Coefficient');
    data1.addColumn('string', 'Sample');
    data1.addRows(4);
    data1.setValue(0, 0, 2004);
    data1.setValue(0, 1, 12);
    data1.setValue(0, 2, 'A');
    data1.setValue(1, 0, 2004);
    data1.setValue(1, 1, 5.5);
    data1.setValue(1, 2, 'B');
    data1.setValue(2, 0, 2005);
    data1.setValue(2, 1, 14);
    data1.setValue(2, 2, 'C');
    data1.setValue(3, 0, 2005);
    data1.setValue(3, 1, 5);
    data1.setValue(3, 2, 'D');
     
     
    // data for linechart
    var data2 = new google.visualization.DataTable();
    data2.addColumn('string', 'Quarter');
    data2.addColumn('number', 'A');
    data2.addColumn('number', 'B');
    data2.addColumn('number', 'C');
    data2.addColumn('number', 'D');
    data2.addRows(4);
    data2.setValue(0, 0, '1Q');
    data2.setValue(0, 1, 1000);
    data2.setValue(0, 2, 400);
    data2.setValue(0, 3, 200);
    data2.setValue(0, 4, 300);
    data2.setValue(1, 0, '2Q');
    data2.setValue(1, 1, 1170);
    data2.setValue(1, 2, 460);
    data2.setValue(1, 3, 600);
    data2.setValue(1, 4, 300);
    data2.setValue(2, 0, '3Q');
    data2.setValue(2, 1, 860);
    data2.setValue(2, 2, 580);
    data2.setValue(2, 3, 250);
    data2.setValue(2, 4, 400);
    data2.setValue(3, 0, '4Q');
    data2.setValue(3, 1, 1030);
    data2.setValue(3, 2, 540);
    data2.setValue(3, 3, 120);
    data2.setValue(3, 4, 350);
     
    var scatterChart = new google.visualization.ScatterChart
    (document.getElementById('scatterchart_span'));
    scatterChart.draw(data1, {width: 400, height: 240, titleX:
    'Year', titleY: 'Coefficient', legend: 'none', pointSize: 5});
     
    var lineChart = new google.visualization.LineChart
    (document.getElementById('linechart_span'));
    lineChart.draw(data2, {width: 400, height: 240, legend:
    'bottom', titleX: 'Quarter', titleY: 'Sales'});
     
    /*
    ??? How to relate scatterchart to linechart ???
    google.visualization.events.addListener(scatterChart,
    'select', function() {
    lineChart.setSelection(scatterChart.getSelection());
    });
    */
     
     
    //For easy to see data
    var table1 = new google.visualization.Table
    (document.getElementById('table1_div'));
    table1.draw(data1, {showRowNumber: true});
     
    var table2 = new google.visualization.Table
    (document.getElementById('table2_div'));
    table2.draw(data2, {showRowNumber: true});
    }
    </script>
    </head>
     
    <body>
    <span id="scatterchart_span"></span>
    <span id="linechart_span"></span>
    <H3>data</H3>
    <div id='table1_div'></div>
    <p>
    <div id='table2_div'></div>
    </body>
    </html>

     

    Markw65 <mar...@gmail.com> Dec 16 08:28AM -0800
     
    Well, actually, encoding the data in the url is /exactly/ how the
    image charts work.
     
    And yes, it does mean that the url length is limited - eg ie6 limits
    it to 2k on the client side. Also, some servers will limit it
    (although I dont think google's chart servers do that).
     
    If you want/need to get around that, you can use "POST" instead of
    "GET" with an XMLHttpRequest from javascript. Then you can send
    whatever (and however much) data you want.
     
    But then you're outside of the google visualization world, and are
    working with your own protocol.
     
    Mark
     

     

--

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.

Reply all
Reply to author
Forward
0 new messages