I'm going to simplify things a bit here, and work with the assumption that you have two DataTables named "server1" and "server2" tracking CPU usage over time. The join would be like this:
var joined = google.visualization.data.join(server1, server2, 'full', [[0, 0 ]], [1], [1]); joined.setColumnLabel(1, 'Server 1 CPU'); joined.setColumnLabel(1, 'Server 2 CPU'); You would have two lines, each representing the CPU usage from one server. On Thursday, June 7, 2012 12:35:12 PM UTC-4, Sabha wrote: > > Thanks but I dont know how you will be able to get that joint data to > display in the timeline graph and distinguish line1 is for the CPU usage > from Server1 while line2 is from CPU usage of Server2. > > Server1 Dataset: > Date, CPU %, Memory %, Disk IO% (Headers) > ,..., 5, 10, 15 > ...., 1, 19, 9 > ...., 25, 30, 5 > > Server2 Dataset: > Date, CPU %, Memory %, Disk IO% (Headers) > ,..., 15, 5, 12 > ...., 11, 39, 19 > ...., 5, 3, 35 > > Right now, the datasets dont carry any info that they are from specific > servers. Lets say I add that as additional column. But even if I do a join > (mostly left outer join as each dataset is specific to a server although > they are reporting on the same set of attrbutes), how you would report in > the graph which trendline for CPU belongs to which server instance? I > already use the join to show that in table format but cannot do the same to > display as an annotated timeline. > > Sample of join table with data -> Here the Heaps, Requests are specific to > server and I can draw the timeline graph per server but cannot do for the > join table directly. > > *Detailed Snapshots (by chronology)* > Dateā²Server Health HeapFree(%) OpenSockets HoggingRequests PendingRequests > MaxHeapSize(MB) CurrentHeapUsed(MB) HeapFree(MB) CompletedRequests Jun > 29, 2011 2:34:37 PMTF701_0101OK4190066083898.722709.2818003Jun 29, 2011 > 2:34:38 PMTF701_0102OK3270066084493.442114.5618276Jun 29, 2011 2:35:07 PM > TF701_0101OK3390066084427.362180.6418044Jun 29, 2011 2:35:08 PMTF701_0102 > OK2770066084823.841784.16 > > Not sure if the above copy-paste appears correctly formatted in email. > > I was thinking of one option, just keep adding more columns while forming > the join table so the values would appear null for non-associated datasets > but then it becomes messy as I add more servers and want to compare them > all at the same time. > > thanks very much, > Sabha > > > On Thursday, June 7, 2012 6:46:49 AM UTC-7, asgallant wrote: >> >> It sounds to me like you want to do a join of the two data sets, which is >> supported by the >> google.visualization.data.join()<https://developers.google.com/chart/interactive/docs/reference#google_visualization_data_join>method. >> >> On Wednesday, June 6, 2012 3:25:33 PM UTC-4, Sabha wrote: >>> >>> Hi, >>> >>> I have datasets from multiple parties that have the same set of >>> fields/columns. I can create annotated timeline chart for each >>> individual party separately in same page but I dont know if there is >>> an option to merge/present the timelines all in single chart. >>> >>> Example: For each stock, lets say we have an annotated timeline >>> plotting the buy/sell, bid/ask graph. We can draw the separate >>> annotated timeline for each stock plotting the buys and sells as >>> separate lines in the same chart. But I would like to plot the trend >>> lines of all buy/sells for both Google and Apple stock in the same >>> chart to see the comparison across time instead of viewing them in >>> separate charts. Similarly, plotting the buy and sell of NYSE and >>> Nasdaq (each has same set of columns). >>> >>> In my case, I have something like runtime attributes of machine or >>> node with the columns as cpu usage, iostats, vmstats, swap, network, >>> idleness etc as columns. Each of these columns will form their own >>> lines spanning the timelines for each machine. But how to plot the >>> comparison chart of multiple machines and showing the individual >>> columns so one cay view that MachineA CPU is higher compared to >>> MachineB while the the network and iostats are way down in comparison >>> in a given time frame? >>> >>> >>> >>> thanks, >>> Sabha >> >> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/MScuYNM_xR4J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
