Re: [visualization-api] different between new google.charts.Bar & google.visualization.ComboChart

2016-04-28 Thread 'Daniel LaLiberte' via Google Visualization API
The bar.groupWidth option is not working correctly with the Material
charts.  Sorry.  I will add it to the list.

On Thu, Apr 28, 2016 at 11:13 AM, natarajan govindavel <
natarajan...@gmail.com> wrote:

> Hi,
> bar.groupWidth property not working Especially bar chart having single.
> Is there any workaround for this?
>
> Thanks
> Natarajan Govindavel.
>
> On Thursday, March 10, 2016 at 8:13:18 PM UTC+5:30, Sergey wrote:
>>
>> Natarajan,
>>
>> As I've said in an earlier email, you should only include /jsapi if you
>> use a GeoChart, and it doesn't appear that you do, so you should not
>> include it at all.
>>
>> Remember, that with the new loader, you need to do: google.*charts*.load
>> and google.*charts*.setOnLoadCallback.
>>
>> On Thu, Mar 10, 2016 at 9:15 AM natarajan govindavel 
>> wrote:
>>
>>>  Hi Sergey,

  I tried your solution which is working fine in Firefox and Chrome but
 Not in IE (checked with IE10,IE9,IE8,IE7).
  It produce same issue . SCRIPT5007: Unable to get property
 'arrayToDataTable' of undefined or null reference.

>>> I am using both classical and material charts on same page. should i
>>> include both library?
>>> https://www.google.com/jsapi
>>> ">
>>> https://www.gstatic.com/charts/loader.js";>
>>> google.setOnLoadCallback(function() {
>>> dataArray[0] =
>>> google.visualization.arrayToDataTable([['Status','Count'],['Open',183],['Closed',32]]);TitleArray[0]
>>> = 'Incident Status';;
>>> if (typeof dataArray[0] != "undefined") {
>>> // Array dynamically generated from code behind
>>>
>>> var options = {
>>> width: '100%',
>>> height: 400,
>>> titlePosition: 'none',//hiding the chart title
>>> legend: {
>>> position: 'bottom' //fix legend in bottom
>>> },
>>> is3D: true
>>> };
>>> var colors = new Array()
>>> for (var i = 0; i < dataArray[0].getNumberOfRows();
>>> i++) {
>>> if (dataArray[0].getValue(i, 0) == "Open")
>>> colors[i] = '#DB4437';
>>> else if (dataArray[0].getValue(i, 0) == "Closed")
>>> colors[i] = '#3FC380';
>>> else if (dataArray[0].getValue(i, 0) == "Incident
>>> Disposition")
>>> colors[i] = '#F9BF3B';
>>> }
>>> options.colors = colors;
>>> $('#status').text(TitleArray[0]);
>>> drawChart('Pie', dataArray[0], 'div_id_1', options);
>>> }
>>> });
>>>
>>>
>>>
>>>
  Thanks
  Natarajan


 On Tuesday, March 8, 2016 at 8:22:16 PM UTC+5:30, Sergey wrote:

 It sounds like you're not putting your chart code into a callback. That
 is, you're probably doing something like:
 
 
 var data = google.visualization.arrayToDataTable(...);
 // more chart stuff
 

 When you should be doing:
 ...
 
 google.charts.load(...);
 google.charts.setOnLoadCallback(drawChart);

 function drawChart() {
   var data = google.visualization.arrayToDataTable(...);
   // more chart stuff
 }
 

 On Tue, Mar 8, 2016 at 1:50 AM natarajan govindavel <
 natara...@gmail.com> wrote:


 Hi Sergey,

 If i remove jsapi loader code as you said i faced the following issue.

 https://www.gstatic.com/charts/loader.js";>
 <%-- https://www.google.com/jsapi?autoload={
 'modules':[{
   'name':'visualization',
   'version':'1.1',
   'packages':['corechart','bar','controls']
 }]
   }">--%>
  google.charts.load('current', {
 'packages': ['corechart','bar', 'controls']
 });
 it shows the error message. Uncaught TypeError: Cannot read property
 'arrayToDataTable' of undefined.
 In the visualization charts not loaded.

 Thanks
 Natarajan

 On Monday, March 7, 2016 at 8:39:37 PM UTC+5:30, Sergey wrote:

 Natarajan,

 *Please do not use autoload and the gstatic loader on the same page*.
 This can lead to issues that are very difficult to figure out.

 The gstatic loader is the only place where we're pushing new versions
 at this point. Loading jsapi as well will cause older versions to be
 loaded. The gstatic loader should be the only loader you use at this point
 (this means you should remove the jsapi script entirely, unless you use the
 GeoChart, in which case you still should not have it autoload). You need to
 add 'corechart' to your google.charts.load call though.

 Sadly, 

Re: [visualization-api] different between new google.charts.Bar & google.visualization.ComboChart

2016-04-28 Thread natarajan govindavel
Hi,
bar.groupWidth property not working Especially bar chart having single.
Is there any workaround for this?

Thanks
Natarajan Govindavel.

On Thursday, March 10, 2016 at 8:13:18 PM UTC+5:30, Sergey wrote:
>
> Natarajan,
>
> As I've said in an earlier email, you should only include /jsapi if you 
> use a GeoChart, and it doesn't appear that you do, so you should not 
> include it at all.
>
> Remember, that with the new loader, you need to do: google.*charts*.load 
> and google.*charts*.setOnLoadCallback.
>
> On Thu, Mar 10, 2016 at 9:15 AM natarajan govindavel  > wrote:
>
>>  Hi Sergey,
>>>
>>>  I tried your solution which is working fine in Firefox and Chrome but 
>>> Not in IE (checked with IE10,IE9,IE8,IE7).
>>>  It produce same issue . SCRIPT5007: Unable to get property 
>>> 'arrayToDataTable' of undefined or null reference.
>>>
>> I am using both classical and material charts on same page. should i 
>> include both library? 
>> https://www.google.com/jsapi
>> ">
>> https://www.gstatic.com/charts/loader.js";>
>> google.setOnLoadCallback(function() {
>> dataArray[0] = 
>> google.visualization.arrayToDataTable([['Status','Count'],['Open',183],['Closed',32]]);TitleArray[0]
>>  
>> = 'Incident Status';;
>> if (typeof dataArray[0] != "undefined") {
>> // Array dynamically generated from code behind   
>>  
>> var options = {
>> width: '100%',
>> height: 400,
>> titlePosition: 'none',//hiding the chart title
>> legend: {
>> position: 'bottom' //fix legend in bottom 
>> },
>> is3D: true
>> };
>> var colors = new Array()
>> for (var i = 0; i < dataArray[0].getNumberOfRows(); 
>> i++) {
>> if (dataArray[0].getValue(i, 0) == "Open")
>> colors[i] = '#DB4437';
>> else if (dataArray[0].getValue(i, 0) == "Closed")
>> colors[i] = '#3FC380';
>> else if (dataArray[0].getValue(i, 0) == "Incident 
>> Disposition")
>> colors[i] = '#F9BF3B';
>> }
>> options.colors = colors;
>> $('#status').text(TitleArray[0]);
>> drawChart('Pie', dataArray[0], 'div_id_1', options);
>> }
>> });
>>
>>
>>  
>>
>>>  Thanks
>>>  Natarajan
>>>
>>>
>>> On Tuesday, March 8, 2016 at 8:22:16 PM UTC+5:30, Sergey wrote:
>>>
>>> It sounds like you're not putting your chart code into a callback. That 
>>> is, you're probably doing something like:
>>> 
>>> 
>>> var data = google.visualization.arrayToDataTable(...);
>>> // more chart stuff
>>> 
>>>
>>> When you should be doing:
>>> ...
>>> 
>>> google.charts.load(...);
>>> google.charts.setOnLoadCallback(drawChart);
>>>
>>> function drawChart() {
>>>   var data = google.visualization.arrayToDataTable(...);
>>>   // more chart stuff
>>> }
>>> 
>>>
>>> On Tue, Mar 8, 2016 at 1:50 AM natarajan govindavel  
>>> wrote:
>>>
>>>
>>> Hi Sergey,
>>>
>>> If i remove jsapi loader code as you said i faced the following issue.
>>>
>>> https://www.gstatic.com/charts/loader.js";>
>>> <%-- https://www.google.com/jsapi?autoload={
>>> 'modules':[{
>>>   'name':'visualization',
>>>   'version':'1.1',
>>>   'packages':['corechart','bar','controls']
>>> }]
>>>   }">--%>
>>>  google.charts.load('current', {
>>> 'packages': ['corechart','bar', 'controls']
>>> });
>>> it shows the error message. Uncaught TypeError: Cannot read property 
>>> 'arrayToDataTable' of undefined.
>>> In the visualization charts not loaded.
>>>
>>> Thanks
>>> Natarajan
>>>
>>> On Monday, March 7, 2016 at 8:39:37 PM UTC+5:30, Sergey wrote:
>>>
>>> Natarajan,
>>>
>>> *Please do not use autoload and the gstatic loader on the same page*. 
>>> This can lead to issues that are very difficult to figure out.
>>>
>>> The gstatic loader is the only place where we're pushing new versions at 
>>> this point. Loading jsapi as well will cause older versions to be loaded. 
>>> The gstatic loader should be the only loader you use at this point (this 
>>> means you should remove the jsapi script entirely, unless you use the 
>>> GeoChart, in which case you still should not have it autoload). You need to 
>>> add 'corechart' to your google.charts.load call though.
>>>
>>> Sadly, there is currently no way to hide an axis in Material Charts.
>>>
>>> On Mon, Mar 7, 2016 at 7:59 AM natarajan govindavel  
>>> wrote:
>>>
>>> I forget to mention one thing. The below given chart is material chart.
>>>
>>>
>>> On Monday, March 7, 2016 at 5:02:37 PM UTC+5:30, 

Re: [visualization-api] Re: Changing the DataTable in a Dashboard or Clearing it and recreating it

2016-04-28 Thread 'Daniel LaLiberte' via Google Visualization API
Yes, dispose() should do everything necessary before trashing the dashboard
instance and doing what you want with associated elements.

The Dashboard container is only used to display errors, at the moment.  You
can put your charts inside the container, or not.

On Thu, Apr 28, 2016 at 9:54 AM, San Kaneda  wrote:

> Thank you.
>
> So once I dispose() of the dashboard is it safe to eliminate the children
> of the dashboard container DOM element and remove all references to the
> dashboard object?
>
> On Thu, Apr 28, 2016 at 2:27 PM, 'Daniel LaLiberte' via Google
> Visualization API  wrote:
>
>> There is unfortunately no way to unbind controls and charts in a
>> Dashboard once you have bound them.  You have to start over from scratch
>> with a new Dashboard().
>>
>> On Wednesday, April 27, 2016 at 8:00:32 AM UTC-4, Santiago Acosta wrote:
>>>
>>> If have the need to change the underlying data inside a Dashboard. I am
>>> pretty sure that a dashboard is intimately linked to its DataTable/View and
>>> that this may not change.
>>>
>>> My other option is to tear down the whole dashboard and recreate a new
>>> one with fresh data. However, unlike clearChart (present in most of the
>>> charts), I haven't found a way to clear the dashboard and free all the
>>> resources.
>>>
>>> Is there any recommendation on tearing down Dashboards? or is it even
>>> possible?
>>>
>> --
>> 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/qg5-sEH3eNw/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
>> https://groups.google.com/group/google-visualization-api.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-visualization-api/54c8cb6b-ef27-4a4b-88b8-25ce79edcb3c%40googlegroups.com
>> 
>> .
>>
>> 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
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/CAGeOesWyawCvbS2ffrBKicJVcuqU0dZMgarigXbFskFoRFac-A%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte 
dlalibe...@google.com    5CC, Cambridge 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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJNnwRvJoJ7vLDmvmgMh612Br2gE_jTE-hM8Ur60Nf1Uhg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Changing the DataTable in a Dashboard or Clearing it and recreating it

2016-04-28 Thread San Kaneda
Thank you.

So once I dispose() of the dashboard is it safe to eliminate the children
of the dashboard container DOM element and remove all references to the
dashboard object?

On Thu, Apr 28, 2016 at 2:27 PM, 'Daniel LaLiberte' via Google
Visualization API  wrote:

> There is unfortunately no way to unbind controls and charts in a Dashboard
> once you have bound them.  You have to start over from scratch with a new
> Dashboard().
>
> On Wednesday, April 27, 2016 at 8:00:32 AM UTC-4, Santiago Acosta wrote:
>>
>> If have the need to change the underlying data inside a Dashboard. I am
>> pretty sure that a dashboard is intimately linked to its DataTable/View and
>> that this may not change.
>>
>> My other option is to tear down the whole dashboard and recreate a new
>> one with fresh data. However, unlike clearChart (present in most of the
>> charts), I haven't found a way to clear the dashboard and free all the
>> resources.
>>
>> Is there any recommendation on tearing down Dashboards? or is it even
>> possible?
>>
> --
> 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/qg5-sEH3eNw/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
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/54c8cb6b-ef27-4a4b-88b8-25ce79edcb3c%40googlegroups.com
> 
> .
>
> 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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAGeOesWyawCvbS2ffrBKicJVcuqU0dZMgarigXbFskFoRFac-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Re: Changing the DataTable in a Dashboard or Clearing it and recreating it

2016-04-28 Thread 'Daniel LaLiberte' via Google Visualization API
There is unfortunately no way to unbind controls and charts in a Dashboard 
once you have bound them.  You have to start over from scratch with a new 
Dashboard().

On Wednesday, April 27, 2016 at 8:00:32 AM UTC-4, Santiago Acosta wrote:
>
> If have the need to change the underlying data inside a Dashboard. I am 
> pretty sure that a dashboard is intimately linked to its DataTable/View and 
> that this may not change.
>
> My other option is to tear down the whole dashboard and recreate a new one 
> with fresh data. However, unlike clearChart (present in most of the 
> charts), I haven't found a way to clear the dashboard and free all the 
> resources.
>
> Is there any recommendation on tearing down Dashboards? or is it even 
> possible?
>

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/54c8cb6b-ef27-4a4b-88b8-25ce79edcb3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Undocumented dashboard methods: clear, dispose

2016-04-28 Thread 'Daniel LaLiberte' via Google Visualization API
Hi Santiago,

The clear() method is what you want to call to remove listeners from the
Dashboard, which is important to avoid memory leaks, but it leaves the
dashboard instance otherwise intact so it can be used again.  The dispose()
and isDisposed() methods are about disposing of the instance itself.The
dispose() method does call clear() first.

Neither dispose() or clear() will do anything with the charts and controls
inside the Dashboard, since you set them up separately.


On Thu, Apr 28, 2016 at 4:50 AM, Santiago Acosta 
wrote:

> In connection to a topic I started at google-visualization-api/qg5-sEH3eNw
> 
> , I found some undocumented methods that look like what I would need to
> solve one of my issues.
>
> The undocumented methods are:
>
>- clear()
>- dispose()
>- isDisposed()
>
> Neither of these methods require any arguments. *isDisposed* returns
> false by default until you call the *dispose* method. I know from looking
> at the function from the console in Google Chrome that *dispose* will
> internally call clear.
>
>
> Does anyone know what these methods do?
>
> --
> 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
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/f674338e-f160-4880-8582-83fd8e052518%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte 
dlalibe...@google.com    5CC, Cambridge 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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOP8ZoanGUXF3y-ecddSTDfmgkA1cU5VqOuR1p-8Los0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Undocumented dashboard methods: clear, dispose

2016-04-28 Thread Santiago Acosta
In connection to a topic I started at google-visualization-api/qg5-sEH3eNw 
 
, I found some undocumented methods that look like what I would need to 
solve one of my issues.

The undocumented methods are:

   - clear()
   - dispose()
   - isDisposed()

Neither of these methods require any arguments. *isDisposed* returns false 
by default until you call the *dispose* method. I know from looking at the 
function from the console in Google Chrome that *dispose* will internally 
call clear.


Does anyone know what these methods do?

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/f674338e-f160-4880-8582-83fd8e052518%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.