Motion Chart - Changing Graph Type

142 views
Skip to first unread message

Raúl

unread,
Aug 3, 2009, 12:32:05 PM8/3/09
to Google Visualization API
Hello everybody,
I am having problems when I change the chart type (icon type: Bubbles
- Bar).
I set "iconType":"BUBBLE" by default. I load the chart and change the
type of view to "BAR".
The problem occurs when I get back to "Bubbles" view, my browser stops
responding.
Have there been any update to the API that has caused this issue?
since this problem did not happen earlier.

Raúl

jago

unread,
Aug 4, 2009, 4:45:30 AM8/4/09
to Google Visualization API
Do you have a working example in the web we can take a look at?

Where did you get the parameter 'iconType' from? It does not seem to
be a supported one: http://code.google.com/apis/visualization/documentation/gallery/motionchart.html

Raúl

unread,
Aug 4, 2009, 8:13:34 AM8/4/09
to Google Visualization API
"iconType" is one of state options.

For example,
options['state'] ='{"iconKeySettings":[],"stateVersion":
3,"time":"notime","xAxisOption":"_NOTHING","playDuration":
15,"iconType":"BUBBLE","sizeOption":"_NOTHING","xZoomedDataMin":null,"xZoomedIn":false,"duration":
{"multiplier":1,"timeUnit":"none"},"yZoomedDataMin":null,"xLambda":
1,"colorOption":"_NOTHING","nonSelectedAlpha":0.4,"dimensions":
{"iconDimensions":
[]},"yZoomedIn":false,"yAxisOption":"_NOTHING","yLambda":
1,"yZoomedDataMax":null,"showTrails":true,"xZoomedDataMax":null};';

Which is the maximum of bubbles that I should draw?

On Aug 4, 5:45 am, jago <java.j...@gmail.com> wrote:
> Do you have a working example in the web we can take a look at?
>
> Where did you get the parameter 'iconType' from? It does not seem to
> be a supported one:http://code.google.com/apis/visualization/documentation/gallery/motio...
>
> On Aug 3, 6:32 pm, Raúl <ramasc...@gmail.com> wrote:
>
>
>
> > Hello everybody,
> > I am having problems when I change the chart type (icon type: Bubbles
> > - Bar).
> > I set "iconType":"BUBBLE" by default. I load the chart and change the
> > type of view to "BAR".
> > The problem occurs when I get back to "Bubbles" view, my browser stops
> > responding.
> > Have there been any update to the API that has caused this issue?
> > since this problem did not happen earlier.
>
> > Raúl- Hide quoted text -
>
> - Show quoted text -

Raúl

unread,
Aug 6, 2009, 4:33:41 PM8/6/09
to Google Visualization API
This is my example:

function drawVisualization() {
var data = new google.visualization.DataTable();
data.addRows(9);
data.addColumn('string', 'Fruit');
data.addColumn('date', 'Date');
data.addColumn('number', 'Sales');
data.addColumn('number', 'Expenses');
data.addColumn('string', 'Location');
data.setValue(0, 0, 'Apples');
data.setValue(0, 1, new Date (1988,0,1));
data.setValue(0, 2, 1000);
data.setValue(0, 3, 300);
data.setValue(0, 4, 'East');
data.setValue(1, 0, 'Oranges');
data.setValue(1, 1, new Date (1988,0,1));
data.setValue(1, 2, 950);
data.setValue(1, 3, 200);
data.setValue(1, 4, 'West');
data.setValue(2, 0, 'Bananas');
data.setValue(2, 1, new Date (1988,0,1));
data.setValue(2, 2, 300);
data.setValue(2, 3, 250);
data.setValue(2, 4, 'West');
data.setValue(3, 0, 'Apples');
data.setValue(3, 1, new Date(1988,1,1));
data.setValue(3, 2, 1200);
data.setValue(3, 3, 400);
data.setValue(3, 4, "East");
data.setValue(4, 0, 'Oranges');
data.setValue(4, 1, new Date(1988,1,1));
data.setValue(4, 2, 900);
data.setValue(4, 3, 150);
data.setValue(4, 4, "West");
data.setValue(5, 0, 'Bananas');
data.setValue(5, 1, new Date(1988,1,1));
data.setValue(5, 2, 788);
data.setValue(5, 3, 617);
data.setValue(5, 4, "West");
data.setValue(6, 0, 'Bananas');
data.setValue(6, 1, new Date(1988,1,1));
data.setValue(6, 2, 1788);
data.setValue(6, 3, 1617);
data.setValue(6, 4, "West");
data.setValue(7, 0, 'Bananas');
data.setValue(7, 1, new Date(1988,1,1));
data.setValue(7, 2, 12788);
data.setValue(7, 3, 12217);
data.setValue(7, 4, "West");
data.setValue(8, 0, 'Bananas');
data.setValue(8, 1, new Date(1988,1,1));
data.setValue(8, 2, 22788);
data.setValue(8, 3, 42217);
data.setValue(8, 4, "West");
var motionchart = new google.visualization.MotionChart(
document.getElementById('visualization'));
var options = {};
options['state'] =
'{"iconKeySettings":[],"stateVersion":
3,"time":"notime","xAxisOption":"_NOTHING","playDuration":
15,"iconType":"BUBBLE","sizeOption":"_UNIQUE_SIZE","xZoomedDataMin":null,"xZoomedIn":false,"duration":
{"multiplier":1,"timeUnit":"none"},"yZoomedDataMin":null,"xLambda":
2,"colorOption":"_UNIQUE_COLOR","nonSelectedAlpha":0.7,"dimensions":
{"iconDimensions":
[]},"yZoomedIn":false,"yAxisOption":"_NOTHING","yLambda":
1,"yZoomedDataMax":null,"iconKeySettings":
[],"showTrails":false,"xZoomedDataMax":null};';
options['width'] = 750;
options['height'] = 400;
motionchart.draw(data, options);
}

I click on play, I change to "Bars" view and then I change back to
"Bubbles" view. At this moment my explorer stops responding for almost
5 minutes.

Could anybody help me?

Thanks

Raúl

Andy

unread,
Aug 12, 2009, 10:37:17 AM8/12/09
to Google Visualization API
Thank God I'm not the only one with this issue. It started happing to
my charts a couple of weeks ago. Hell breaks loose when passing from
Bar Charts to Bubbles, the browser starts eating memory and won't
stop!

I tried your example in the Ajax Playground (http://code.google.com/
apis/ajax/playground/?type=visualization#motion_chart) without the
state option and I'm having the exact issue.

Were you able to solve it?
> 15,"iconType":"BUBBLE","sizeOption":"_UNIQUE_SIZE","xZoomedDataMin":null,"x­ZoomedIn":false,"duration":
Reply all
Reply to author
Forward
0 new messages