[visualization-api] Re: Organizational Chart (Node Children)

2014-12-03 Thread Mohamed El Ghandour


Answered by Juvian: http://stackoverflow.com/users/3308055/juvian 

Regarding to the problem of getting children and subchildren of selected, 
you need to deal with recursion: 

Here is an example: http://jsfiddle.net/36gg3ro1/1/

google.visualization.events.addListener(chart, 'select', function(){
  var children=[]
  var selected=chart.getSelection()[0].row;

  function getChilds(index){ // recursive function, adds children of 
index (row)
  var childs=chart.getChildrenIndexes(index); // get children 
indexes of current index
  for(var i = 0; i  childs.length;i++){ // for each children
  children.push(data.getValue(childs[i],0)) // add the title
  getChilds(childs[i]) // and call the function with this 
children index, to get their children and so on  this is recursive
  }
  }

  getChilds(selected) // start recursive function with selected index
  console.log(children)

})





On Tuesday, 2 December 2014 13:05:33 UTC+2, Mohamed El Ghandour wrote:

 Hi,
 I have an organizational chart with many levels, the image below is taken 
 from a part of it.
 I try to get all the childs and sub childs of a selected node, like if 
 Power Business Unit node selected it get all the 3 childs and for every 
 single child do the same. I got the first level but I can't get the depth 
 of the tree to provide the number of loops to reach the last child.

 1- How can I get the last child in the chart? how to get the depth of the 
 tree?
 2- Is there a zoom in/zoom out toolbar or something, that I can add to the 
 chart?

 that is my code of drawing:

  google.load('visualization', '1', { packages: ['table', 
 'orgchart'] });
 google.setOnLoadCallback(drawChart);
 function drawChart() {

 var data = new google.visualization.DataTable();
 data.addColumn('string', 'NODE');
 data.addColumn('string', 'PARENT');
 data.addColumn('string', 'NODEID');

 
 data.addRows(JSON.parse(document.getElementById(%=HiddenField1.ClientID%).value));
 //
 var chart = new 
 google.visualization.OrgChart(document.getElementById('chart_div'));

 function selectHandler() {
 var selectedItem = chart.getSelection()[0];
 if (selectedItem) {
 var oInd = data.getValue(selectedItem.row, 2);

 var arrLoop = 
 chart.getChildrenIndexes(selectedItem.row);
 var arrConcat = 
 chart.getChildrenIndexes(selectedItem.row);


 for (var i = 0; i  arrLoop.length; i++) {
 var arr2 = new 
 Array(chart.getChildrenIndexes(arrLoop[i]).length);
 arr2 = chart.getChildrenIndexes(arrLoop[i]);
 for (var j = 0; j  arr2.length; j++) {
 arrConcat.push(arr2[j]);
 }
 arrConcat.concat(arr2);
 }

 var arrChilds = new Array(arrConcat.length);

 for (var i = 0; i  arrConcat.length; i++) {
 arrChilds[i] = data.getValue(arrConcat[i], 2);
 }
 drawTable(oInd, arrChilds);
 }
 }

 google.visualization.events.addListener(chart, 'select', 
 selectHandler);

 chart.draw(data, { allowHtml: true });

 //for (var i = 0; i  data.getNumberOfRows() ; i++) {
 //chart.collapse(i, true);
 //}
 }





 https://lh4.googleusercontent.com/-VFmgSBVUuNE/VH2ZgKPiKTI/AHI/lk0m4QlzCkw/s1600/OrgChart.JPG


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Margin for horizontal label

2014-12-03 Thread Luke
Hi Sergey

It's solved with suggestion you gave me. 

Thanks



Il giorno martedì 2 dicembre 2014 19:13:53 UTC+1, Sergey ha scritto:

 OK, can you give some code to reproduce this?

 On Tue Dec 02 2014 at 12:51:54 PM Luca Marantelli l.mara...@gmail.com 
 javascript: wrote:

 I already use that. The margin remains huge
 Il 02/dic/2014 18:24 'Sergey Grabkovsky' via Google Visualization API 
 google-visua...@googlegroups.com javascript: ha scritto:

 You can explicitly set the size of the chart area via the options, so if 
 you make the height bigger, then the chart area should fill up more of the 
 chart, and the haxis would have less room for the label. I believe that 
 this should work for you:
 options = {
   chartArea: {height: '80%'}
 }

 On Tue Dec 02 2014 at 12:20:17 PM Luca Marantelli l.mara...@gmail.com 
 javascript: wrote:

 Hi sergey
 What do you mean exactly?
 Il 02/dic/2014 16:02 'Sergey Grabkovsky' via Google Visualization API 
 google-visua...@googlegroups.com javascript: ha scritto:

 Hi Luke, if you expand the chart area, and give the label less room, 
 your margin should shrink as well. I may be forgetting something, but I 
 don't think there's an option to explicitly control the margin of the 
 label.

 On Tue Dec 02 2014 at 8:00:04 AM Luke l.mara...@gmail.com 
 javascript: wrote:

 Hi

 I have a Bar chart that is displaying the horizontal axis label with 
 a huge margin. The vertical axis label is ok, the h-axis isn't.
 I search for something about reducing this margin or paddinig but I 
 couldn't find anything.

 Please see attach
 I need to put that label just under the horizontal values

 Thanks

  -- 
 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 
 google-visualization-api+unsubscr...@googlegroups.com javascript:.
 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

  -- 

 You received this message because you are subscribed to a topic in the 
 Google Groups Google Visualization API group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/google-visualization-api/NSArwIdtwIA/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 google-visualization-api+unsubscr...@googlegroups.com javascript:.


 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

  -- 
 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 google-visualization-api+unsubscr...@googlegroups.com 
 javascript:.
 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

  -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups Google Visualization API group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/google-visualization-api/NSArwIdtwIA/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 google-visualization-api+unsubscr...@googlegroups.com javascript:.
 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

  -- 
 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 google-visualization-api+unsubscr...@googlegroups.com 
 javascript:.
 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.



-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Add Diagonal Line to Scatter Chart

2014-12-03 Thread 'Daniel Sussman' via Google Visualization API
I'm not looking to add a trend line, just a diagonal line with a slope of 1 
that would be independent from the dataset. So basically, it would run from 
the origin to the top right corner no matter what the data points were. 
Does anyone know how to do this?

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Line chart with special points

2014-12-03 Thread Rafael Cabral
Thank you very much. That works for me.

2014-12-01 16:28 GMT+00:00 'Sergey Grabkovsky' via Google Visualization API
google-visualization-api@googlegroups.com:

 Hi, you should be able to accomplish this using the style role. You can
 find the documentatino for it here:
 https://developers.google.com/chart/interactive/docs/roles#stylerole

 On Fri Nov 28 2014 at 10:50:27 AM procabral procab...@gmail.com wrote:

 Hi. I am trying to have a line graph, with some Normal points and some
 Special  points.
 I would like that the Special poins are marked, and easilly
 differentiated from Normal points.
 I have attached a Simple example.
 Any help/hint will be appreciated.
 Regards.
 procabral


 https://lh5.googleusercontent.com/-JLADDyGQuDo/VHiY9gyaWWI/AB8/WOmvB7529_8/s1600/img-graph.jpg



  --
 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 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to a topic in the
 Google Groups Google Visualization API group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/google-visualization-api/MPVytP8_8eM/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Charting a CVS File

2014-12-03 Thread Ken Burkhalter
Thanks all for the replies.

I have no problem charting manually entered data [as you had suggest Jon], 
my issue is in grabbing data from a file on my web server and charting it.

I tried your code suggestions Sergey, but am still coming up with a blank 
screen.

My code is shown below, hopefully someone can spot what I am doing wrong, 
rather than trying to give a verbal explanation of what to do. 

Sergey note I was unsure what the values should be in the csvColumns 
parameter. Since a search didn't reveal the definitions of the cvsColumns 
parameter, I assumed that 'number' meant there were number values in each 
column (which is true).  

Does there need to be a 'number' value stated for each column in the data 
array (a csv file with three [column] entries per line.)  In which case my 
my parameter should be csvColumns: ['number', 'number', 'number']

Also at the end of the csvColumns line, in your code sample, the code used 
a , (coma),  Should that have really been a semi-colon (;) ?

html
  head
   script src=https://www.google.com/jsapi; /script
   script src=http://code.jquery.com/jquery-1.10.1.min.js; /script
   script src=jquery.csv-0.71.js /script
   
   script
  google.load(visualization, 1, {packages:[corechart]});
  google.setOnLoadCallback(drawChart);
  /
var csvURL = http://192.168.1.90/tempsD1.txt;
var queryOptions = {
csvColumns: ['number', 'number' /* Or whatever the columns in the CSV file 
are */],
csvHasHeader: false /* This should be false if your CSV file doesn't have a 
header */
}

var query = new google.visualization.Query(csvUrl, queryOptions);

query.send(handleQueryResponse);

function handleQueryResponse(response) {

if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + 
response.getDetailedMessage());
return;
}

  var data = response.getDataTable();
 /
function drawChart() {
  
 // set chart options
 var options = {
title: Temperatures,
legend: 'none'
 };

 // create the chart object and draw it
var chart = new 
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options);
  }
/script
  /head
  
  body
div id=chart_div style=width: 900px; height: 500px;/div
  /body
/html

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Charting a CVS File

2014-12-03 Thread 'Jon Orwant' via Google Visualization API
Ken, comments inline.

On Wed, Dec 3, 2014 at 9:31 AM, Ken Burkhalter kenburkhal...@gmail.com
wrote:

 Thanks all for the replies.

 I have no problem charting manually entered data [as you had suggest Jon],
 my issue is in grabbing data from a file on my web server and charting it.

 I tried your code suggestions Sergey, but am still coming up with a blank
 screen.

 My code is shown below, hopefully someone can spot what I am doing wrong,
 rather than trying to give a verbal explanation of what to do.

 Sergey note I was unsure what the values should be in the csvColumns
 parameter. Since a search didn't reveal the definitions of the cvsColumns
 parameter, I assumed that 'number' meant there were number values in each
 column (which is true).

 Does there need to be a 'number' value stated for each column in the data
 array (a csv file with three [column] entries per line.)  In which case my
 my parameter should be csvColumns: ['number', 'number', 'number']


Right.



 Also at the end of the csvColumns line, in your code sample, the code used
 a , (coma),  Should that have really been a semi-colon (;) ?


Nope, a comma.



 html
   head
script src=https://www.google.com/jsapi; /script
script src=http://code.jquery.com/jquery-1.10.1.min.js; /script
script src=jquery.csv-0.71.js /script

script
   google.load(visualization, 1, {packages:[corechart]});
   google.setOnLoadCallback(drawChart);
   /
 var csvURL = http://192.168.1.90/tempsD1.txt;
 var queryOptions = {
 csvColumns: ['number', 'number' /* Or whatever the columns in the CSV file
 are */],
 csvHasHeader: false /* This should be false if your CSV file doesn't have
 a header */
 }

 var query = new google.visualization.Query(csvUrl, queryOptions);

 query.send(handleQueryResponse);

 function handleQueryResponse(response) {

 if (response.isError()) {
 alert('Error in query: ' + response.getMessage() + ' ' +
 response.getDetailedMessage());
 return;
 }

   var data = response.getDataTable();
  /


You have a syntax error here because of the single slash on a line by
itself.  That's why you're seeing a blank screen.

(How do I know this?  I cut and pasted your code and opened it up in my
browser. You can tell what's going on in your browser by looking at the
JavaScript console, which you can open up via your browser's menu.)

Jon


 function drawChart() {

  // set chart options
  var options = {
 title: Temperatures,
 legend: 'none'
  };

  // create the chart object and draw it
 var chart = new
 google.visualization.LineChart(document.getElementById('chart_div'));
 chart.draw(data, options);
   }
 /script
   /head

   body
 div id=chart_div style=width: 900px; height: 500px;/div
   /body
 /html

  --
 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 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Webpage with 15 graphs takes too long to load

2014-12-03 Thread 'Sergey Grabkovsky' via Google Visualization API
Hi Nigel,

I'd love to help you get your page working faster, but it's a little
difficult to diagnose your issues without being able to play with and
profile the page. However, a common mistake that people make is having
multiple google.load calls, generally people either have one per package or
one per chart. You should *not* do this.

You should have one google.load call that loads all the packages that your
page will need.

Another thing that might be slowing you down is your data fetching. If you
have 15 charts, and each one of them fires an AJAX request, that won't
really end well. You should group and bundle your data as much as you can
and then filter it on the client. Alternatively, your server can just
return all 15 DataTables simultaneously, instead of having a separate
request for each.

*Getting your charts working with OnClick*
Some users find this to be a bit tricky. Since you didn't outline exactly
how you failed to get this working, I'll just speak about the most common
issue: the div should be visible when the chart is drawing. We use the div
for text measurement, so all kinds of things might be off if your div isn't
visible, since text sizes won't be reported properly. This generally only
applies to display: none, and not to visible: false, although that might
not be entirely true. But you shouldn't even have to use display or
visible, if you're rendering the charts into the same div. Here's an
example of buttons drawing charts: http://jsfiddle.net/yfLng7y1/

I hope this helps! Please post back with more information if you have any
further questions.

On Tue Dec 02 2014 at 5:27:15 PM Nigel Griffiths nigelgriffi...@gmail.com
wrote:

 HI,
 I want to display at least 15 related graphs on one web page.
 - these are UNIX performance stats for on VM for a day based on nmon data.
 - 1 to 4 stats with 100 to 700 data points per graph
 But I find the whole pages is blank until all the graphs are generated
 which takes 12 seconds to load = which too long.

 Is there a way to force the first graph to display ASAP - this gives the
 user eye candy, while the rest of the graphs are generated.

 Alternative a way to use OnClick on a button to get one of the graphs
 drawn at a time each in the same screen area.
 - I tried but failed to get that working using .visable and .display.

 Any hints/tips would be good, Cheers Nigel Griffiths.

 --
 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 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to google-visualization-api@
 googlegroups.com.
 Visit this group at http://groups.google.com/
 group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Spreadsheet - Column Chart: Compare Mode feature functionality

2014-12-03 Thread anonymous
I had this issue but it was resolved by clicking the View Mode in the top 
left hand corner of the chart. Switching from Edit mode to View mode allows 
you to see the comparisons.

On Wednesday, November 19, 2014 8:58:03 PM UTC-5, Jieming Wei wrote:

 I have this problem too!!! Seems it hasn't been fixed for two years.

 On Tuesday, October 9, 2012 11:37:06 AM UTC-7, M Rochon wrote:

 I've created a spreadsheet column chart in which the compare mode advance 
 edit feature is not working properly.  When viewing the preview of the 
 column chart in the advance edit window with the compare mode activated, it 
 works just fine.  However, when I update these changes, the chart itself 
 does appear to be importing/implementing this added feature of 
 functionality.  

 Is there something I may be overlooking or is this perhaps an unresolved 
 bug in the Docs?  Thanks in advance for your feedback!



-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Charting a CVS File

2014-12-03 Thread Ken Burkhalter
Thanks for pointing out the syntax errors.  After your extraordinary hint 
about the Java Console (which I didn't know about) debugging has speeded up 
considerably!!! :-)

I found a few more errors (missing braces, undefined objects) and am now to 
the point where I am at least getting error comments posted to the screen. 
 :-)

I am now getting a Data Table not Defined  ( Uncaught TypeError: Cannot 
read property 'Query' of undefined) on the following code ...

  *var query = new google.visualization.Query(csvURL, queryOptions);*

Since your suggested undocumented dataTableFromCsv support code seemed to 
define the two Query parameters, I'm guessing I might be missing a Library 
Source reference.

If so, please advise URL, else what might I be missing?

Thanks.  [:-)}

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Webpage with 15 graphs takes too long to load

2014-12-03 Thread Nigel Griffiths
Wow thanks for the advice.
Pretty sure I only load the chart library once.
 
The attached is a complete small example with just 30 data points per graph 
(14 of them) - which displays in 3 seconds but typically I have 300+ data 
points per graph which takes just 14 seconds but feels s ol o  n   g.
The data is embedded in the webpage to KISS - as these are generated.
I think my problem is purely size, I have 14 x 300 = 4200 data point - so I 
am asking for a lot processing.
Hence getting the first chart to display and then continuing to generate 
the other charts would make the page look responsive.
Phase two would be getting the data from a web database.

I will look into the OnClick option.

Thanks again, Nigel

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

	
	 
	 
	 File: sampleC.nmon
	 
	 nmon data graphed by nmon_charter (v3) using Google Charts. Author @mr_nmon
	 

Host:sampleC
Online Virtual CPUs: 7
Date:01-DEC-2014
Entitled Capacity  : 7.00
Time:00:00:06
Mode   : Uncapped
Interval:1200
Online Memory  : 63488 MB
Snapshots: 31
Type   : Shared-SMT-4

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
	




-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Webpage with 15 graphs takes too long to load

2014-12-03 Thread 'Sergey Grabkovsky' via Google Visualization API
You appear to have a chain of google.setOnLoadCallback, which is an odd
style, but shouldn't be affecting your performance. I'd still recommend
that you change the style, though, since it'll be easier for you to make
other improvements once you do. Generally, you should have just one
callback function that draws all the charts.

From there, we can improve the perceived performance. Each individual chart
doesn't take very long to render, but the durations will add up. If you do
a each draw in a setTimeout, that will let the browser handle interactivity
between each chart draw and schedule each function on its own time. So at
least, the page will load and not remain blank. I attached a formatted
version of your HTML that does this.

Another technique you might want to try is not rendering the chart until
the div is actually visible on the page. I think this is the same technique
as infinite scrolling, but I've never implemented this myself. Here's a
link to a stackoverflow question that seems relevant:
http://stackoverflow.com/questions/8192651/load-lazy-loading-a-div-whenever-the-div-gets-visible-for-the-first-time

Hopefully this helps.

On Wed Dec 03 2014 at 1:23:27 PM Nigel Griffiths nigelgriffi...@gmail.com
wrote:

 Wow thanks for the advice.
 Pretty sure I only load the chart library once.

 The attached is a complete small example with just 30 data points per
 graph (14 of them) - which displays in 3 seconds but typically I have 300+
 data points per graph which takes just 14 seconds but feels s ol o  n
 g.
 The data is embedded in the webpage to KISS - as these are generated.
 I think my problem is purely size, I have 14 x 300 = 4200 data point - so
 I am asking for a lot processing.
 Hence getting the first chart to display and then continuing to generate
 the other charts would make the page look responsive.
 Phase two would be getting the data from a web database.

 I will look into the OnClick option.

 Thanks again, Nigel

 --
 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 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to google-visualization-api@
 googlegroups.com.
 Visit this group at http://groups.google.com/
 group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

  
   
   
   File: sampleC.nmon
   
   nmon data graphed by nmon_charter (v3) using Google Charts. Author @mr_nmon
   

Host:sampleC
Online Virtual CPUs: 7
Date:01-DEC-2014
Entitled Capacity  : 7.00
Time:00:00:06
Mode   : Uncapped
Interval:1200
Online Memory  : 63488 MB
Snapshots: 31
Type   : Shared-SMT-4































  




-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.



-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] [BUG] line chart - Legends with same value

2014-12-03 Thread Watson Marconato


https://lh3.googleusercontent.com/-05fH-fZSc3c/VH9uv1nMmLI/ALE/CjOWoBXoND4/s1600/Call%2BCenter%2B-%2BSEBRAE-ES%2B-%2BAcompanhamento%2Bde%2Bresultados%2B-%2BMozilla%2BFirefox.jpg
Thanks,

It worked, but when the tooltip has many legends it cut the values in 
tooltip.

There is some solution for this?

Image in order to demosntration.

https://lh3.googleusercontent.com/-05fH-fZSc3c/VH9uv1nMmLI/ALE/CjOWoBXoND4/s1600/Call%2BCenter%2B-%2BSEBRAE-ES%2B-%2BAcompanhamento%2Bde%2Bresultados%2B-%2BMozilla%2BFirefox.jpg


Em segunda-feira, 1 de dezembro de 2014 14h30min55s UTC-2, Sergey escreveu:

 Hmm. If you use focusTarget: 'category', you can get around the issue, 
 since the category tooltips will show all the values for any given 
 category. Here is a jsfiddle example of that: 
 http://jsfiddle.net/L7z1andu/

 On Fri Nov 28 2014 at 1:39:12 PM Watson Marconato wmmar...@gmail.com 
 javascript: wrote:

 Guys,

 I have one line charts and i notice that when two legends has the same 
 value the google charts show just value of the last legend.



 Follows the link with exemple
 http://jsfiddle.net/WatsonMarconato/ab2g21o7/


 Notice that the legends BUG and SALES has the same value for the year 
 2007. But is not possible show the value of legend SALES, the chart show 
 just value of legend BUG.


 Someone knowledge some solution for this?


 I'm sorry for my english.

 Thanks.

  -- 
 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 google-visualization-api+unsubscr...@googlegroups.com 
 javascript:.
 To post to this group, send email to google-visua...@googlegroups.com 
 javascript:.
 Visit this group at 
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.



-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Charting a CVS File

2014-12-03 Thread Ken Burkhalter

In the event it helps.  Here is the complete HTML page...

https://lh3.googleusercontent.com/-X_i1Ax5xA4I/VH9u8QDKuoI/Cas/4N4f-WtnL9k/s1600/chart.png
 

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Charting a CVS File

2014-12-03 Thread Ken Burkhalter
The error is thrown at Line 22


On Wednesday, December 3, 2014 3:14:12 PM UTC-5, Ken Burkhalter wrote:


 In the event it helps.  Here is the complete HTML page...


 https://lh3.googleusercontent.com/-X_i1Ax5xA4I/VH9u8QDKuoI/Cas/4N4f-WtnL9k/s1600/chart.png
  


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] [BUG] line chart - Legends with same value

2014-12-03 Thread 'Sergey Grabkovsky' via Google Visualization API
There is no solution for that, except to increase the amount of room given
to the legend, and even then it's not guaranteed that it would render all
the rows. Your best bet would be to have the legend on the right and
increase the height of the chart until you see everything.

On Wed Dec 03 2014 at 3:13:21 PM Watson Marconato wmmarcon...@gmail.com
wrote:


 https://lh3.googleusercontent.com/-05fH-fZSc3c/VH9uv1nMmLI/ALE/CjOWoBXoND4/s1600/Call%2BCenter%2B-%2BSEBRAE-ES%2B-%2BAcompanhamento%2Bde%2Bresultados%2B-%2BMozilla%2BFirefox.jpg
 Thanks,

 It worked, but when the tooltip has many legends it cut the values in
 tooltip.

 There is some solution for this?

 Image in order to demosntration.


 https://lh3.googleusercontent.com/-05fH-fZSc3c/VH9uv1nMmLI/ALE/CjOWoBXoND4/s1600/Call%2BCenter%2B-%2BSEBRAE-ES%2B-%2BAcompanhamento%2Bde%2Bresultados%2B-%2BMozilla%2BFirefox.jpg


 Em segunda-feira, 1 de dezembro de 2014 14h30min55s UTC-2, Sergey escreveu:

 Hmm. If you use focusTarget: 'category', you can get around the issue,
 since the category tooltips will show all the values for any given
 category. Here is a jsfiddle example of that: http://jsfiddle.net/
 L7z1andu/

 On Fri Nov 28 2014 at 1:39:12 PM Watson Marconato wmmar...@gmail.com
 wrote:

 Guys,

 I have one line charts and i notice that when two legends has the same
 value the google charts show just value of the last legend.



 Follows the link with exemple
 http://jsfiddle.net/WatsonMarconato/ab2g21o7/


 Notice that the legends BUG and SALES has the same value for the year
 2007. But is not possible show the value of legend SALES, the chart show
 just value of legend BUG.


 Someone knowledge some solution for this?


 I'm sorry for my english.

 Thanks.

  --
 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 google-visualization-api+unsubscr...@googlegroups.com.

 To post to this group, send email to google-visua...@googlegroups.com.


 Visit this group at http://groups.google.com/
 group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.

  --
 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 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Charting a CVS File

2014-12-03 Thread 'Sergey Grabkovsky' via Google Visualization API
The Query is loaded along with the charts, so the code that uses the Query
needs to be in a callback as well. You need to structure your code like so:

google.load(...);
google.setOnLoadCallback(initialize);

function handleQueryResponse(response) {
  if (response.isError()) { ... }
  var data = response.getDataTable();
  var options = { ... };
  var chart = ...;
  chart.draw(data, options);
}

function initialize() {
  var datQuery = new google.visualization.Query(...);
  datQuery.send(handleQueryResponse);
}


On Wed Dec 03 2014 at 3:15:17 PM Ken Burkhalter kenburkhal...@gmail.com
wrote:

 The error is thrown at Line 22


 On Wednesday, December 3, 2014 3:14:12 PM UTC-5, Ken Burkhalter wrote:


 In the event it helps.  Here is the complete HTML page...


 https://lh3.googleusercontent.com/-X_i1Ax5xA4I/VH9u8QDKuoI/Cas/4N4f-WtnL9k/s1600/chart.png


  --
 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 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Charting a CVS File

2014-12-03 Thread Ken Burkhalter
Gad, this is worse than getting teeth pulled   [:-)}

I made the changes (I think, I've included a view of the current code 
below) but now I am getting the following error which doesn't seem to jibe 
with reality ...

n.I.js:266 Uncaught Error: CSV files on other domains are not supported. 
Please use sendMethod: 'xhr' or 'auto' and serve your .csv file from the 
same domain as this page. 

which makes absolutely no sense at all as the page's html document sits in 
the same directory as all the other web server pages (including 
index.html). 

Everything is definately on the same domain!

Here 
https://lh5.googleusercontent.com/-_pRPAyym7k8/VH9976LuNII/Ca8/MJJVWF0e9TM/s1600/chart.png


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Charting a CVS File

2014-12-03 Thread 'Sergey Grabkovsky' via Google Visualization API
You might be accessing your HTML file via the file:// protocol, which would
be a different domain than http://. If that's not the problem, then it
would be immensely helpful if you could post a screenshot of your browser
window (with the address bar and everything) accessing the page with the
developer tools open.

On Wed Dec 03 2014 at 4:19:26 PM Ken Burkhalter kenburkhal...@gmail.com
wrote:

 Gad, this is worse than getting teeth pulled   [:-)}

 I made the changes (I think, I've included a view of the current code
 below) but now I am getting the following error which doesn't seem to jibe
 with reality ...

 n.I.js:266 Uncaught Error: CSV files on other domains are not supported.
 Please use sendMethod: 'xhr' or 'auto' and serve your .csv file from the
 same domain as this page.

 which makes absolutely no sense at all as the page's html document sits in
 the same directory as all the other web server pages (including
 index.html).

 Everything is definately on the same domain!

 Here
 https://lh5.googleusercontent.com/-_pRPAyym7k8/VH9976LuNII/Ca8/MJJVWF0e9TM/s1600/chart.png


  --
 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 google-visualization-api+unsubscr...@googlegroups.com.
 To post to this group, send email to
 google-visualization-api@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-visualization-api.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Charting a CVS File

2014-12-03 Thread Ken Burkhalter

Sergey -

Is this what you wanted?


Assuming you can view the  code capture I posted in the previous 
message, you can see that I am NOT using any file protocols. 
Everything is nice Kosher HTTP tags.

 [:-)}


On 12/3/2014 4:22 PM, 'Sergey Grabkovsky' via Google Visualization API 
wrote:
You might be accessing your HTML file via the file:// protocol, which 
would be a different domain than http://. If that's not the problem, 
then it would be immensely helpful if you could post a screenshot of 
your browser window (with the address bar and everything) accessing 
the page with the developer tools open.


On Wed Dec 03 2014 at 4:19:26 PM Ken Burkhalter 
kenburkhal...@gmail.com mailto:kenburkhal...@gmail.com wrote:


Gad, this is worse than getting teeth pulled [:-)}

I made the changes (I think, I've included a view of the current
code below) but now I am getting the following error which doesn't
seem to jibe with reality ...

n.I.js:266 Uncaught Error: CSV files on other domains are not
supported. Please use sendMethod: 'xhr' or 'auto' and serve your
.csv file from the same domain as this page.

which makes absolutely no sense at all as the page's html document
sits in the same directory as all the other web server pages
(including index.html).

Everything is definately on the same domain!

Here

https://lh5.googleusercontent.com/-_pRPAyym7k8/VH9976LuNII/Ca8/MJJVWF0e9TM/s1600/chart.png


-- 
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
google-visualization-api+unsubscr...@googlegroups.com
mailto:google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to
google-visualization-api@googlegroups.com
mailto:google-visualization-api@googlegroups.com.
Visit this group at
http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the 
Google Groups Google Visualization API group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-visualization-api/cnXYDr411tQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
google-visualization-api+unsubscr...@googlegroups.com 
mailto:google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to 
google-visualization-api@googlegroups.com 
mailto:google-visualization-api@googlegroups.com.
Visit this group at 
http://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.


--
-ken burkhalter

--
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Charting a CVS File

2014-12-03 Thread Ken Burkhalter


On 12/3/2014 4:32 PM, Ken Burkhalter wrote:

Sergey -

Let me do this over again so you are not mislead.  The first 
screenshot, I just sent, was a capture from my desktop computer where 
I have been debugging, but the actual HTML code page runs on my web 
serverm which is what the capture below reflects 



Assuming you can view the  code capture I posted in the previous 
message, you can see that I am NOT using any file protocols. 
Everything is nice Kosher HTTP tags.

 [:-)}


On 12/3/2014 4:22 PM, 'Sergey Grabkovsky' via Google Visualization API 
wrote:
You might be accessing your HTML file via the file:// protocol, which 
would be a different domain than http://. If that's not the problem, 
then it would be immensely helpful if you could post a screenshot of 
your browser window (with the address bar and everything) accessing 
the page with the developer tools open.


On Wed Dec 03 2014 at 4:19:26 PM Ken Burkhalter 
kenburkhal...@gmail.com mailto:kenburkhal...@gmail.com wrote:


Gad, this is worse than getting teeth pulled   [:-)}

I made the changes (I think, I've included a view of the current
code below) but now I am getting the following error which
doesn't seem to jibe with reality ...

n.I.js:266 Uncaught Error: CSV files on other domains are not
supported. Please use sendMethod: 'xhr' or 'auto' and serve your
.csv file from the same domain as this page.

which makes absolutely no sense at all as the page's html
document sits in the same directory as all the other web server
pages (including index.html).

Everything is definately on the same domain!

Here

https://lh5.googleusercontent.com/-_pRPAyym7k8/VH9976LuNII/Ca8/MJJVWF0e9TM/s1600/chart.png


-- 
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
google-visualization-api+unsubscr...@googlegroups.com
mailto:google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to
google-visualization-api@googlegroups.com
mailto:google-visualization-api@googlegroups.com.
Visit this group at
http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in 
the Google Groups Google Visualization API group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-visualization-api/cnXYDr411tQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
google-visualization-api+unsubscr...@googlegroups.com 
mailto:google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to 
google-visualization-api@googlegroups.com 
mailto:google-visualization-api@googlegroups.com.
Visit this group at 
http://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.


--
-ken burkhalter


--
-ken burkhalter

--
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Material Bar Charts

2014-12-03 Thread Ovi
Hello,

I saw on the developer's API site that there are some new Material Bar 
Charts which allow you to have gradient colors and rounded corners. Can I 
use them with GWT? If yes, how? I am currently using the VisualizationUtils.
loadVisualizationApi(onLoadCallback, CoreChart.PACKAGE); . WHat package 
should I be loading instead?

THank you

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.