Colors and States

115 views
Skip to first unread message

Sima Kan

unread,
May 18, 2012, 11:49:19 PM5/18/12
to google-visua...@googlegroups.com
Hello All!

I've been playing around with the motion chart the past couple of days and have 2 questions. Hoping someone can answer them.

1. While looking at some examples online, I noticed that there are a few which defaulted the color dropdown to column value instead of the "Same Color" that is currently defaulted out of the box. I read up on setting States and passing in the parameters to the state string.
My current state string looks like this:
'{"iconKeySettings":[],"stateVersion":3,"time":"notime","xAxisOption":"_NOTHING", "uniColorForNonSelected":false,"playDuration":15,"iconType":"BUBBLE","sizeOption":"_NOTHING","xZoomedDataMin":null,"xZoomedIn":false,"duration":{"multiplier":1,"timeUnit":"none"},"yZoomedDataMin":null,"xLambda":1,"colorOption":"_UNICOLOR","nonSelectedAlpha":0.4,"dimensions":{"iconDimensions":[]},"yZoomedIn":false,"yAxisOption":"_NOTHING","yLambda":1,"yZoomedDataMax":null,"showTrails":true,"xZoomedDataMax":null};';

But, the chart still defaults to "Same Color" on startup. What option do I set to default the Color dropdown to a column value on load?

2. Is it possible to call a motion chart from another motion chart based on a bubble selected? Any pointers how I can do this?

Thanks in advance,
SimaKan

ChartMan

unread,
May 20, 2012, 3:30:39 AM5/20/12
to google-visua...@googlegroups.com
On Sat, May 19, 2012 at 6:49 AM, Sima Kan <kan...@gmail.com> wrote:
Hello All!

I've been playing around with the motion chart the past couple of days and have 2 questions. Hoping someone can answer them.

1. While looking at some examples online, I noticed that there are a few which defaulted the color dropdown to column value instead of the "Same Color" that is currently defaulted out of the box. I read up on setting States and passing in the parameters to the state string.
My current state string looks like this:
'{"iconKeySettings":[],"stateVersion":3,"time":"notime","xAxisOption":"_NOTHING", "uniColorForNonSelected":false,"playDuration":15,"iconType":"BUBBLE","sizeOption":"_NOTHING","xZoomedDataMin":null,"xZoomedIn":false,"duration":{"multiplier":1,"timeUnit":"none"},"yZoomedDataMin":null,"xLambda":1,"colorOption":"_UNICOLOR","nonSelectedAlpha":0.4,"dimensions":{"iconDimensions":[]},"yZoomedIn":false,"yAxisOption":"_NOTHING","yLambda":1,"yZoomedDataMax":null,"showTrails":true,"xZoomedDataMax":null};';

But, the chart still defaults to "Same Color" on startup. What option do I set to default the Color dropdown to a column value on load?

Look at this property:

"colorOption":"_UNICOLOR"
 "colorOption":"3" -- 3 is the column number to use for colors.


2. Is it possible to call a motion chart from another motion chart based on a bubble selected? Any pointers how I can do this?

Whenever you select a bubble there is a "select" event  being dispatched from the chart. You can listen to that event and then call what ever code you like over the other motion chart.


ChartMan




Thanks in advance,
SimaKan

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/4hS69FgRjXMJ.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

Sima Kan

unread,
May 21, 2012, 1:22:35 AM5/21/12
to google-visua...@googlegroups.com
Hello ChartMan!

Thank you for your response. However, when I change the colorOption property, the color dropdown completely disappeared from the chart. Is there any other property that has been set and causing this?

Where I can find information on each property and its usage?

Thanks!

Thanks in advance,
SimaKan
To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to google-visualization-api+unsub...@googlegroups.com.

ChartMan

unread,
May 21, 2012, 1:29:45 AM5/21/12
to google-visua...@googlegroups.com

From the chart wrench menu > advanced you can see the "state" string after each interaction with the chart. Please see if you can find your answer there.

ChartMan

To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/3O2OiBSCDV4J.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages