[visualization-api] not show title on GEOCHART
not show title on GEOCHART -- 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] Ability to toggle chart options in dashboard
Dear Dan, Sergey the Google team, I am trying to find a way to allow chart users to toggle chart options in dashboards. For example, suppose I define an AreaChart in ChartWrapper, with the option 'isStacked: true'. I would like a category filter control that allowed me to change that option to 'isStacked: false'. Or taking things to another level, how about giving users a dashboard that allowed them to filter the choice of chart used to view a given data table, such as line chart, bar chart vs table chart. That is something that other visualisation frameworks, eg. D3 can do really well. I have wracked my brain trying to work out how to do this within the existing Google visualisation controls and dashboard structure but couldn't figure it out. Now I know that one way to do this would be to create multiple DOMs for each Google chart and then build controls in HTML/CSS that let me select the ones I wanted and hide the others, but this would be expensive in developer time and an inelegant way to do something which really ought to be possible within your API. Is there an obvious solution that I have missed? If so please let me know. Or if not, please consider it as an enhancement that would make your API much more competitive vs its peers. Thank you for your assistance, Nick -- 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] not show title on GEOCHART
Hi Sathiya, \the Google GeoChart doesn't support the title option at the moment, but you can put in your own with HTML. Jon On Mon, Mar 9, 2015 at 7:53 AM, Sathiya Seelan i.sathiya...@gmail.com wrote: not show title on GEOCHART -- 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: Uncaught Error: Type mismatch. Value /Date(1409626800000)/ does not match type date in column index 0
I would recommend that you change the database itself either to store real dates or numbers. If this is not possible, you could use a regular expression to get the number out. In your case, that regexp would look something like /Date\((\d+)\)/. Here's an example of using that: http://jsfiddle.net/vc36osx3/2/ On Sat, Mar 7, 2015 at 8:11 AM Wilson Rogério Braun braun0...@gmail.com wrote: Como retornar a data_semanal? De: Date(140962680) Para: data.addRows([ [140962680, 3], [141962680, 1], [142962680, 1], [143962680, 1], [144962680, 2] ]); Em sábado, 7 de março de 2015 07:46:46 UTC-3, Wilson Rogério Braun escreveu: Algum local ou exemplo para esta consulta? Em sexta-feira, 6 de março de 2015 16:10:20 UTC-3, Wilson Rogério Braun escreveu: Até ai acho que estou entendendo, obrigado, mas como retornar do banco desta forma? Em sexta-feira, 6 de março de 2015 15:29:01 UTC-3, Sergey escreveu: Here is a basic example: http://jsfiddle.net/vc36osx3/ On Fri, Mar 6, 2015 at 1:12 PM Wilson Rogério Braun brau...@gmail.com wrote: Teria algum exemplo para aplicar a sugestão? Em sexta-feira, 6 de março de 2015 11:09:40 UTC-3, Wilson Rogério Braun escreveu: *Alguém tem alguma sugestão?* *Controler:* public ActionResult Peso() { var dia = db.spPesoEvolucao().ToList(); var a = dia.Select(x = new { x.data_semanal, x.peso_kg }); return Json(a, JsonRequestBehavior.AllowGet); } *View:* script type=text/javascript src=https://www.google.com/jsapi;/scriptscript type=text/javascript src=//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js/script !-- Script-- script type=text/javascript google.load('visualization', '1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawChart); function drawChart() { $.get('/Programa/Peso', {}, function (data) { var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' }); console.log(data); for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]); } var options = { vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 ... -- 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.
[visualization-api] Change color on element
I am starting with Google chart and I have allready many thinga but I need to change the color of an element e I cant get. Follow my code: script type=text/javascript src=https://www.google.com/jsapi;/script script type=text/javascript google.load('visualization', '1', {packages: ['corechart']}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Ano', 'Style'); data.addColumn('number', '1 Ponto'); data.addColumn({type: 'string', role: 'annotation'}); data.addColumn('number', '2 Pontos'); data.addColumn({type: 'string', role: 'annotation'}); data.addColumn('number', '3 Pontos'); data.addColumn({type: 'string', role: 'annotation'}); data.addColumn('number', '4 Pontos'); data.addColumn({type: 'string', role: 'annotation'}); data.addColumn('number', '5 Pontos'); data.addColumn({type: 'string', role: 'annotation'}); data.addRows([ ['2010', 22, '22', 1, '1', 11, '11', 11, '11', 22, '22'], ['2011', 14, '14', 20, '20', 21, '21', 11, '11', 22, '22'], ['2012', 23, '23', 32, '32', 11, '11', 11, '11', 22, '22'], ]); var options = { annotations: { alwaysOutside: true, textStyle: { fontSize: 10, color: '#000', auraColor: 'none' } }, width: 1000, height: 563, hAxis: { title: 'Ano', }, vAxis: { title: 'Qtd de Pessoas' } }; var chart = new google.visualization.ColumnChart( document.getElementById('ex5')); chart.draw(data, options); } /script Anyone can help me ? Tks Ricardo Costa -- 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] Tips to get better performance?
Hi Daniel, You can check out the page here - http://dalecox.github.io/DNA_Analysis/samples/SkewChart.html http://dalecox.github.io/DNA_Analysis/samples/SkewChart.html I haven't cross browser tested, so for best results I would recommend running in Chrome. You'll need this data set - http://dalecox.github.io/DNA_Analysis/samples/largerData.txt In my case I don't think I really need the table just the visualization or if there was an option to only get table when needed that would be great. Thanks for all your help, Dale -- 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] Turn off inner box highlight on click
Just did my very first Google bar chart. Pretty straight forward, except that I can't figure out how to inhibit highlighting if a user clicks on one of the bars. Currently, a white inner box appears if I click on it. How do I inhibit this? At this point, I don't intend to provide for any interactive capability except for hover annotations. Thanks, Mike Here's my current code: script type=text/javascript src=https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}/script script type=text/javascript google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Index', 'FFIUS', 'SP 500'], ['10 Yrs', .77, .74], ['5 Yrs', 1.22, 1.12], ['3 Yrs', .62, .59], ['1 Yr', .48, .46], ['YTD', .05, .06], ['6 Mos', .12, .11], ['3 Mos', .03, .03], ['1 Mo', .02, .03] ]); var options = { chart: {bars: 'horizontal'}, backgroundColor: { fill: '#f0f0f0' }, colors: ['#1F4E79','#ADB9CA'], chartArea: {left: 50,top: 20, right: 40, bottom: 20, width:'85%',height:'75%', backgroundColor: '#f0f0f0'}, legend: {textStyle: {fontName: 'Calibri', fontSize: 12, bold: true}, alignment: center, position: bottom}, bar: {groupWidth: 90%}, vAxis: {textStyle: {fontName: 'Calibri', fontSize: 12,bold: true}}, hAxis: { textStyle: {fontName: 'Calibri', fontSize: 12,bold: true}, format: '#%', viewWindowMode: 'explicit', viewWindow: { max: 1.25 } } }; var chart = new google.visualization.BarChart( document.getElementById('ffius-returns')); chart.draw(data, options); } /script -- 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: Uncaught Error: Type mismatch. Value /Date(1409626800000)/ does not match type date in column index 0
It sounds like a lot of the questions you have are unrelated to Google Charts, and have more to do with basic JavaScript programming. You should consult a JavaScript book or tutorial, or ask this question on a beginner forum, like StackOverflow. Hope this helps, - Sergey On Mon, Mar 9, 2015 at 3:24 PM Wilson Rogério Braun braun0...@gmail.com wrote: *Uncaught ReferenceError: data is not definedAvaliacao:193 drawStuff* google.load('visualization', '1.1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawStuff); $.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {}); function drawStuff() { . Em segunda-feira, 9 de março de 2015 16:19:45 UTC-3, Sergey escreveu: I'm not sure what you were trying to do here, so I don't have any suggestions for what to do instead, but this is the line where the error is: *$.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {};* On Mon, Mar 9, 2015 at 3:08 PM Wilson Rogério Braun brau...@gmail.com wrote: * Uncaught SyntaxError: Unexpected token ;* *script type=text/javascriptgoogle.load('visualization', '1.1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawStuff); function drawStuff() { $.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {};* * var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' });* *//console.log(data);* * for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]);* *}); // Redefine as dates var view = new google.visualization.DataView(data); view.setColumns([{type: 'date', calc: function(dt, row) {var stringDateValue = dt.getValue(row, 0);var number = parseInt(/Date\((\d+)\)/.exec(stringDateValue)[1]); return new Date(number);} }, 1])var options = { //title: EVOLUÇÃO DE PESO EM KG POR DATA,* *vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 } },* *legend: { position: none }, async: true //aumenta a velocidade de renderização* *};var chart = new google.visualization.LineChart(document.getElementById('EvolucaoPeso'));* *chart.draw(view, options); }; /script* Em sexta-feira, 6 de março de 2015 11:09:40 UTC-3, Wilson Rogério Braun escreveu: *Alguém tem alguma sugestão?* *Controler:* public ActionResult Peso() { var dia = db.spPesoEvolucao().ToList(); var a = dia.Select(x = new { x.data_semanal, x.peso_kg }); return Json(a, JsonRequestBehavior.AllowGet); } *View:* script type=text/javascript src=https://www.google.com/jsapi;/scriptscript type=text/javascript src=//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js/script !-- Script-- script type=text/javascript google.load('visualization', '1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawChart); function drawChart() { $.get('/Programa/Peso', {}, function (data) { var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' }); console.log(data); for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]); } var options = { vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 ... -- 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
Re: [visualization-api] Tips to get better performance?
Thanks for providing your code and data. It really helps us to find out what Google Charts users are doing. Since you are now generating the chart asynchronously, you need to wait for the 'ready' event to find out when the chart is done drawing. It appears we are generating tooltip text even if you have turned off interactivity, which we should fix. It looks like you should be able to disable tooltips further if you add this to your options: tooltip: { trigger: 'none' } I get about a 25% improvement from that. Another chunk of time is spent formatting the domain data anyway, even without tooltips. We can made this a bit faster, reducing the formatting to half a second with this: var formatter = new google.visualization.NumberFormat({pattern: ''}); formatter.format(data, 0); But you could eliminate this if you just generate your data in this form for each cell value: {v: value, f: ''} Another larger chunk of time, about half the remaining time, is consumed generating the invisible accessibility table. We don't have a way of disabling this table because it is for the benefit of the user. However, we will provide an option to disable this feature, defaulting to false. Ideally, we need to find a way to detect whether the user would prefer the accessibility table instead of the generated chart. The above hack to specify the formatted representation of data values as empty strings will, of course, conflict with the generation of the accessibility table, so we would prefer to avoid that. These are the highest priority issues regarding performance that we need to address. After we take care of these, there will certainly be other issues. I've attached the modified SkewChart.html code. On Mon, Mar 9, 2015 at 12:24 PM, Dale Cox daleco...@gmail.com wrote: Hi Daniel, You can check out the page here - http://dalecox.github.io/DNA_Analysis/samples/SkewChart.html http://dalecox.github.io/DNA_Analysis/samples/SkewChart.html I haven't cross browser tested, so for best results I would recommend running in Chrome. You'll need this data set - http://dalecox.github.io/DNA_Analysis/samples/largerData.txt In my case I don't think I really need the table just the visualization or if there was an option to only get table when needed that would be great. Thanks for all your help, Dale -- 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. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlalibe...@google.com dlalibe...@google.com 5CC, Cambridge MA daniel.lalibe...@gmail.com daniel.lalibe...@gmail.com 9 Juniper Ridge Road, Acton MA -- 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. text/html; charset=US-ASCII; name="SkewChart.html": Unrecognized
[visualization-api] Re: Uncaught Error: Type mismatch. Value /Date(1409626800000)/ does not match type date in column index 0
* Uncaught SyntaxError: Unexpected token ;* *script type=text/javascriptgoogle.load('visualization', '1.1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawStuff); function drawStuff() { $.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {}; var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' }); //console.log(data); for (var i = 0; i data.length; i++) {if (data[i].data_semanal != null)tdata.addRow([data[i].data_semanal, data[i].peso_kg]);}); // Redefine as datesvar view = new google.visualization.DataView(data);view.setColumns([{ type: 'date',calc: function(dt, row) {var stringDateValue = dt.getValue(row, 0);var number = parseInt(/Date\((\d+)\)/.exec(stringDateValue)[1]); return new Date(number);}}, 1])var options = { //title: EVOLUÇÃO DE PESO EM KG POR DATA, vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 } }, legend: { position: none }, async: true //aumenta a velocidade de renderização };var chart = new google.visualization.LineChart(document.getElementById('EvolucaoPeso')); chart.draw(view, options); }; /script* Em sexta-feira, 6 de março de 2015 11:09:40 UTC-3, Wilson Rogério Braun escreveu: *Alguém tem alguma sugestão?* *Controler:* public ActionResult Peso() { var dia = db.spPesoEvolucao().ToList(); var a = dia.Select(x = new { x.data_semanal, x.peso_kg }); return Json(a, JsonRequestBehavior.AllowGet); } *View:* script type=text/javascript src=https://www.google.com/jsapi;/scriptscript type=text/javascript src=//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js/script !-- Script-- script type=text/javascript google.load('visualization', '1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawChart); function drawChart() { $.get('/Programa/Peso', {}, function (data) { var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' }); console.log(data); for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]); } var options = { vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 ... -- 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] Google charts not showing in IE11 (setImmediate issue)
Sorry for the delay. We have a difficult time testing on the Windows platform, due to security restrictions. I was attempting to test the following, but got bogged down in irrelevant hassles. So rather than delaying, I'll have to rely on you doing some more work. If it works out, you'll have make a similar change anyway at this point. Could you try delaying the execution of the setImmediate.js code even more? Remove your google.setOnLoadCallback() and just do this: load jsapi and call google.load() load ISC_* code window.setTimeout( function() { // wrap the setImmediate.js code in a function that you load from a file: function defineSetImmediate() { ... setImmediate.js code } // remove the first part of that code that just returns if global.setImmediate is defined. if (global.setImmediate) { return; } defineSetImmediate(); drawChart(); }, 3000); That will give an arbitrary 3 seconds for ISC to finish loading, then define setImmediate again. On Thu, Mar 5, 2015 at 9:49 AM, Constantin FEIER costy.fe...@acquitysoftware.com wrote: Hello, Thank you for this quick response. It is very easy to reproduce it just by creating a test.html file with the suggested code and downloading the 3 files in a smartclient directory. As you suggested, with the same testcase, - I moved all the google chart scripts after the 3 smartclient js files, it did not work - I downloaded setImmediat.js, add it between the 3 smartclient js files and google chart scripts, still no luck The error is the same, nothing changed for the two tests. Le jeudi 5 mars 2015 15:09:35 UTC+1, Daniel LaLiberte a écrit : I see you also posted in the SmartClient forums: http://forums. smartclient.com/showthread.php?t=32363 One other person has reported an issue with setImmediate, but we haven't narrowed down the cause, so thanks for posting your additional clue about the effect of SmartClient on Google Charts. There is a use of setImmediate deep in Google Closure libraries that Google Charts depends on, but this has not been a problem for other IE users of the same code. Perhaps SmartClient is applying the workaround for issues with setImmediate that is described in http://codeforhire.com/2013/ 09/21/setimmediate-and-messagechannel-broken-on-internet-explorer-10/ which basically sets window.setImmedate to undefined. I haven't tried to dig through the obfuscated ISC_* code you attached, but you might find this is what they are doing. Maybe the load order and execution order of all the code you are using makes a difference. Can you move the ISC_* code loading up into the HEAD, before the Google Charts code? If not, you should be able to move the Google Charts code into the BODY after the ISC_* code. If you have to defer the Google Charts loading until after the page is loaded, see https://developers.google.com/chart/interactive/docs/ library_loading_enhancements#enhancedloading and follow the link to dynamic loading You might try adding this cross-browser implementation of setImmediate: https://github.com/YuzuJS/setImmediate/blob/master/setImmediate.js Load it after you load your SmartClient code, so that if window.setImmedate is being set to undefined, it will then be updated with this new definition. Please let us know what you learn. On Thu, Mar 5, 2015 at 6:10 AM, Constantin FEIER costy...@acquitysoftware.com wrote: Hi, I am using Google visualization in a SmartClient app. Since 20 february 2015, charts are not showing anymore in IE11, without any changes in our app. There is a red line with this error Unable to get value of the property setImmediate object is null or undefined Here is a testcase with a simple piechart. Without SmartClient js files, chart are showing well. If i add the 3 js files attached, there is no chart and the red line appears !doctype html html head script type=text/javascript src=https://www.google.com/jsapi;/script script type=text/javascript google.load(visualization, 1, {packages:[corechart]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Work', 11], ['Eat', 2], ['Commute', 2], ['Watch TV', 2], ['Sleep',7] ]); var options = { title: 'My Daily Activities', is3D:true }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } /script /head body div id=piechart style=width: 900px; height: 500px;/div script type=text/javascript src=smartClient/ISC_Core.js/script script type=text/javascript src=smartClient/ISC_Foundation.js/script script type=text/javascript src=smartClient/ISC_Containers.js/script /body /html -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To
Re: [visualization-api] Google charts not showing in IE11 (setImmediate issue)
Oops.. messed that up by Sending too soon. This is the part of the setImmediate.js code you need to remove: if (global.setImmediate) { return; } On Mon, Mar 9, 2015 at 2:58 PM, Daniel LaLiberte dlalibe...@google.com wrote: Sorry for the delay. We have a difficult time testing on the Windows platform, due to security restrictions. I was attempting to test the following, but got bogged down in irrelevant hassles. So rather than delaying, I'll have to rely on you doing some more work. If it works out, you'll have make a similar change anyway at this point. Could you try delaying the execution of the setImmediate.js code even more? Remove your google.setOnLoadCallback() and just do this: load jsapi and call google.load() load ISC_* code window.setTimeout( function() { // wrap the setImmediate.js code in a function that you load from a file: function defineSetImmediate() { ... setImmediate.js code } // remove the first part of that code that just returns if global.setImmediate is defined. if (global.setImmediate) { return; } defineSetImmediate(); drawChart(); }, 3000); That will give an arbitrary 3 seconds for ISC to finish loading, then define setImmediate again. On Thu, Mar 5, 2015 at 9:49 AM, Constantin FEIER costy.fe...@acquitysoftware.com wrote: Hello, Thank you for this quick response. It is very easy to reproduce it just by creating a test.html file with the suggested code and downloading the 3 files in a smartclient directory. As you suggested, with the same testcase, - I moved all the google chart scripts after the 3 smartclient js files, it did not work - I downloaded setImmediat.js, add it between the 3 smartclient js files and google chart scripts, still no luck The error is the same, nothing changed for the two tests. Le jeudi 5 mars 2015 15:09:35 UTC+1, Daniel LaLiberte a écrit : I see you also posted in the SmartClient forums: http://forums. smartclient.com/showthread.php?t=32363 One other person has reported an issue with setImmediate, but we haven't narrowed down the cause, so thanks for posting your additional clue about the effect of SmartClient on Google Charts. There is a use of setImmediate deep in Google Closure libraries that Google Charts depends on, but this has not been a problem for other IE users of the same code. Perhaps SmartClient is applying the workaround for issues with setImmediate that is described in http://codeforhire.com/2013/ 09/21/setimmediate-and-messagechannel-broken-on-internet-explorer-10/ which basically sets window.setImmedate to undefined. I haven't tried to dig through the obfuscated ISC_* code you attached, but you might find this is what they are doing. Maybe the load order and execution order of all the code you are using makes a difference. Can you move the ISC_* code loading up into the HEAD, before the Google Charts code? If not, you should be able to move the Google Charts code into the BODY after the ISC_* code. If you have to defer the Google Charts loading until after the page is loaded, see https://developers.google.com/chart/interactive/docs/ library_loading_enhancements#enhancedloading and follow the link to dynamic loading You might try adding this cross-browser implementation of setImmediate: https://github.com/YuzuJS/setImmediate/blob/master/setImmediate.js Load it after you load your SmartClient code, so that if window.setImmedate is being set to undefined, it will then be updated with this new definition. Please let us know what you learn. On Thu, Mar 5, 2015 at 6:10 AM, Constantin FEIER costy...@acquitysoftware.com wrote: Hi, I am using Google visualization in a SmartClient app. Since 20 february 2015, charts are not showing anymore in IE11, without any changes in our app. There is a red line with this error Unable to get value of the property setImmediate object is null or undefined Here is a testcase with a simple piechart. Without SmartClient js files, chart are showing well. If i add the 3 js files attached, there is no chart and the red line appears !doctype html html head script type=text/javascript src=https://www.google.com/jsapi;/script script type=text/javascript google.load(visualization, 1, {packages:[corechart]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Work', 11], ['Eat', 2], ['Commute', 2], ['Watch TV', 2], ['Sleep',7] ]); var options = { title: 'My Daily Activities', is3D:true }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } /script /head body div id=piechart style=width: 900px; height: 500px;/div script type=text/javascript src=smartClient/ISC_Core.js/script script type=text/javascript
Re: [visualization-api] Re: Uncaught Error: Type mismatch. Value /Date(1409626800000)/ does not match type date in column index 0
I'm not sure what you were trying to do here, so I don't have any suggestions for what to do instead, but this is the line where the error is: *$.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {};* On Mon, Mar 9, 2015 at 3:08 PM Wilson Rogério Braun braun0...@gmail.com wrote: * Uncaught SyntaxError: Unexpected token ;* *script type=text/javascriptgoogle.load('visualization', '1.1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawStuff); function drawStuff() { $.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {};* * var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' });* *//console.log(data);* * for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]);* *}); // Redefine as dates var view = new google.visualization.DataView(data); view.setColumns([{type: 'date', calc: function(dt, row) {var stringDateValue = dt.getValue(row, 0);var number = parseInt(/Date\((\d+)\)/.exec(stringDateValue)[1]); return new Date(number);} }, 1])var options = { //title: EVOLUÇÃO DE PESO EM KG POR DATA,* *vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 } },* *legend: { position: none }, async: true //aumenta a velocidade de renderização* *};var chart = new google.visualization.LineChart(document.getElementById('EvolucaoPeso'));* *chart.draw(view, options); }; /script* Em sexta-feira, 6 de março de 2015 11:09:40 UTC-3, Wilson Rogério Braun escreveu: *Alguém tem alguma sugestão?* *Controler:* public ActionResult Peso() { var dia = db.spPesoEvolucao().ToList(); var a = dia.Select(x = new { x.data_semanal, x.peso_kg }); return Json(a, JsonRequestBehavior.AllowGet); } *View:* script type=text/javascript src=https://www.google.com/jsapi;/scriptscript type=text/javascript src=//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js/script !-- Script-- script type=text/javascript google.load('visualization', '1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawChart); function drawChart() { $.get('/Programa/Peso', {}, function (data) { var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' }); console.log(data); for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]); } var options = { vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 ... -- 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: Uncaught Error: Type mismatch. Value /Date(1409626800000)/ does not match type date in column index 0
*Uncaught ReferenceError: data is not definedAvaliacao:193 drawStuff* google.load('visualization', '1.1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawStuff); $.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {}); function drawStuff() { . Em segunda-feira, 9 de março de 2015 16:19:45 UTC-3, Sergey escreveu: I'm not sure what you were trying to do here, so I don't have any suggestions for what to do instead, but this is the line where the error is: *$.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {};* On Mon, Mar 9, 2015 at 3:08 PM Wilson Rogério Braun brau...@gmail.com javascript: wrote: * Uncaught SyntaxError: Unexpected token ;* *script type=text/javascriptgoogle.load('visualization', '1.1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawStuff); function drawStuff() { $.get('/Programa_Nutricao/Avaliacao/EvolucaoPeso', {};* * var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' });* *//console.log(data);* * for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]);* *}); // Redefine as dates var view = new google.visualization.DataView(data); view.setColumns([{type: 'date', calc: function(dt, row) {var stringDateValue = dt.getValue(row, 0);var number = parseInt(/Date\((\d+)\)/.exec(stringDateValue)[1]); return new Date(number);} }, 1])var options = { //title: EVOLUÇÃO DE PESO EM KG POR DATA,* *vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 } },* *legend: { position: none }, async: true //aumenta a velocidade de renderização* *};var chart = new google.visualization.LineChart(document.getElementById('EvolucaoPeso'));* *chart.draw(view, options); }; /script* Em sexta-feira, 6 de março de 2015 11:09:40 UTC-3, Wilson Rogério Braun escreveu: *Alguém tem alguma sugestão?* *Controler:* public ActionResult Peso() { var dia = db.spPesoEvolucao().ToList(); var a = dia.Select(x = new { x.data_semanal, x.peso_kg }); return Json(a, JsonRequestBehavior.AllowGet); } *View:* script type=text/javascript src=https://www.google.com/jsapi;/scriptscript type=text/javascript src=//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js/script !-- Script-- script type=text/javascript google.load('visualization', '1', { 'packages': ['corechart'] }); google.setOnLoadCallback(drawChart); function drawChart() { $.get('/Programa/Peso', {}, function (data) { var tdata = new google.visualization.DataTable(); tdata.addColumn('date', 'data_semanal'); tdata.addColumn('number', 'peso_kg'); //tdata.addColumn({ type: 'string', role: 'annotation' }); console.log(data); for (var i = 0; i data.length; i++) { if (data[i].data_semanal != null) tdata.addRow([data[i].data_semanal, data[i].peso_kg]); } var options = { vAxis: { title: PESO, minValue: 1 }, hAxis: { title: DATA, textStyle: { fontSize: 10 ... -- 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