Thanks for the reply. I've experimented with your solution, but it still
seems to come back to needing the values, even as ticks or numeric values,
to be the same for both sets of data in order for the animation to work
properly.
Here is the data:
var rowData1 = [['University', 'Tuition', { role: 'annotation'
}, { role: 'style' }, { role: 'tooltip' }],
['TRU', 3907, '$3,907', 'color: #72a592', 'Thompson
Rivers University'],
['UBC', 4890, '$4,890', 'color: gray', 'University
of BC'],
['UNBC', 4912, '$4,912', 'color: gray', 'University
of Northern BC'],
['UVic', 5159, '$5,159', 'color: gray', 'University
of Victoria'],
['SFU', 5217, '$5,217', 'color: gray', 'Simon
Fraser University']];
var rowData2 = [['University', 'Tuition', { role: 'annotation'
}, { role: 'style' }, { role: 'tooltip' }],
['TRU', 3907, '$3,907', 'color: #72a592', 'Thompson
Rivers University'],
['MacEwan', 4620, '$4,620', 'color: gray', 'MacEwan
University'],
['Mount Royal', 4942, '$4,942', 'color: gray',
'Mount Royal University'],
['Alberta', 5321, '$5,321', 'color: gray',
'University of Alberta'],
['Calgary', 5386, '$5,386', 'color: gray',
'University of Calgary']];
This doesn't work because the university names are different in each set.
If I give them numeric designations, wouldn't they have to be 0-4 in each
case? Or is there a way of naming 0-4 separately for each group?
On Tuesday, April 7, 2015 at 12:28:33 PM UTC-7, Daniel LaLiberte wrote:
>
> We could probably change the wonky animation to use the position as a
> backup, in case most values are different enough that there is no point
> trying to use the values. It may have done something like that in the
> past, but that algorithm had bad performance (as in, it was slow) in many
> cases, so we simplified it.
>
> You could so something similar by using numeric values instead of the
> university names, but still display them as you want by specifying the
> formatted representation of each value. That is, instead of using
> ["University of Minnesota", ...] use [{v: 0, f: 'University of Minnesota'},
> ...] But then you will also need to specify your axis tick values in a
> similar way with the 'ticks' option:
>
> var options = {
> hAxis: { ticks: [{v: 0, f: 'University of Minnesota'}, {v: 1,
> f:'University of Illinois'}, ...] }
> }
>
> The values have to be numeric to use the explicit 'ticks' option.
>
>
> On Tue, Apr 7, 2015 at 2:50 PM, newsonaut <[email protected] <javascript:>
> > wrote:
>
>> I have a column chart displaying two sets of data, and I want to use
>> animation when switching back and forth between them.
>>
>> If the first values are the same in each set (i.e., the names of the
>> universities along the bottom), then the animation works as expected. But,
>> of course, the names would be incorrect.
>>
>> Example of good animation: http://newsonaut.com/chart/animgood.html
>>
>> If the values are changed (i.e., different university names are used),
>> then the animation does a weird swipe to the side.
>>
>> Example of wonky animation: http://newsonaut.com/chart/animbad.html
>>
>> Is there any way to get around this, other than turning off the animation?
>>
>> --
>> 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 [email protected]
>> <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> 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
> [email protected] <javascript:> 5CC, Cambridge MA
> [email protected] <javascript:> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.