I'm having the same problem. I have tried a lot of different states
and different ways to initialize them but no avail. The state is saved
succesfully to the options variable but it is still not applied to the
motionchart. I'm starting to think this is a bug. Can somebody
confirm?
Here's my code:
var data = new google.visualization.DataTable(json);
var chart = new
google.visualization.MotionChart(document.getElementById('chart_div'));
var options = {
width: 700,
height: 400,
showYScalePicker: false,
showXScalePicker: false,
showAdvancedPanel: false,
state: {"duration":{"multiplier":
1,"timeUnit":"D"},"yAxisOption":"3","sizeOption":"4","time":"2011-12-11","showTrails":true,"dimensions":
{"iconDimensions":["dim0"]},"yZoomedDataMax":
25,"xAxisOption":"5","nonSelectedAlpha":
0.4,"yZoomedIn":false,"xZoomedDataMin":
0,"orderedByX":false,"yZoomedDataMin":0,"yLambda":1,"playDuration":
15000,"iconKeySettings":
[],"uniColorForNonSelected":false,"xZoomedIn":false,"xZoomedDataMax":
876,"orderedByY":false,"iconType":"BUBBLE","xLambda":
1,"colorOption":"5"}
}
chart.draw(data, options);
On Oct 23, 4:53 am, Alex Dean <[email protected]> wrote:
> Following the instructions
> inhttp://code.google.com/apis/chart/interactive/docs/gallery/motionchar...,
> I configured the motion chart as desired and copied thestatestring
> from the Advanced settings panel. When I attempt to use thisstate
> for my chart, it is ignored.
>
> The only non-default options I'm trying to set are:
> - using the same color for all bubbles. ("colorOption":"_UNICOLOR")
> - setting a log scale for the x axis. ("xLambda":0 ?)
>
> Am I doing something wrong here? The width & height I'm setting are
> being used, but as far as I can tell all the 'state' options are being
> disregarded.
>
> var options = {}
> options['width'] = 1200;
> options['height'] = 800;
> options['state'] = {"xZoomedDataMax":845000000,"dimensions":
> {"iconDimensions":
> ["dim0"]},"colorOption":"_UNICOLOR","showTrails":true,"sizeOption":"5","xZoomedIn":false,"xLambda":
> 0,"yZoomedDataMin":0,"yAxisOption":"3","yZoomedDataMax":
> 993,"orderedByX":false,"iconType":"BUBBLE","iconKeySettings":
> [],"duration":{"timeUnit":"W","multiplier":1},"xZoomedDataMin":
> 0,"yLambda":1,"orderedByY":false,"nonSelectedAlpha":
> 0.4,"time":"2007-12-24","uniColorForNonSelected":false,"yZoomedIn":false,"xAxisOption":"2","playDuration":
> 15000};
>
> var chart = new
> google.visualization.MotionChart(document.getElementById('chart_div'));
> chart.draw(chart_data, options);
>
> thanks,
> alex
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.