Thanks it worked . I had another question can i hide the column during
hover . Display only the column which is needed
On Tuesday, April 15, 2014 6:01:50 PM UTC-4, Andrew Gallant wrote:
>
> Yes, change the return statement to this:
>
> return {v: ((selection[0].row == row) ? 2 : 1), f:
> dt.getFormattedValue(row, 1)};
>
> On Tuesday, April 15, 2014 3:56:44 PM UTC-4, maria wrote:
>>
>> I have used the data view to change the color as follows
>>
>> var view = new google.visualization.DataView(data);
>> view.setColumns([0, {
>> type: 'number',
>> label: data.getColumnLabel(1),
>> calc: function (dt, row) {
>> return (selection[0].row == row) ? 2 : 1;
>> }
>> }]);
>>
>> If i use the moethod which you have suggested it changes the hover but on
>> click the color of the state doesn't change . Is there a way i can do both
>> .
>>
>> On Tuesday, April 15, 2014 1:04:51 PM UTC-4, Andrew Gallant wrote:
>>>
>>> That view should make the chart display only the name and value in the
>>> tooltip.
>>>
>>> On Tuesday, April 15, 2014 12:49:27 PM UTC-4, maria wrote:
>>>>
>>>> Thank you for your reply . What if i do not want to display the color
>>>> column. and i want to display only the name and the value column during
>>>> hover .
>>>>
>>>> On Tuesday, April 15, 2014 12:11:44 PM UTC-4, Andrew Gallant wrote:
>>>>>
>>>>> use a DataView that returns the "color" as the column's value and
>>>>> "value" as the formatted value:
>>>>>
>>>>> var view = new google.visualization.DataView(data);
>>>>> view.setColumns([0, {
>>>>> type: 'number',
>>>>> label: 'Value',
>>>>> calc: function (dt, row) {
>>>>> return {v: dt.getValue(row, 2), f: dt.getFormattedValue(row,
>>>>> 1)};
>>>>> }
>>>>> });
>>>>>
>>>>> On Tuesday, April 15, 2014 11:59:24 AM UTC-4, maria wrote:
>>>>>>
>>>>>> Hi Everyone
>>>>>>
>>>>>> I created a Geochart which on-click changes the color of the
>>>>>> particular state. I have columns (Name, Value, color ). I use the color
>>>>>> column to change the particular state color on click. After the color is
>>>>>> changed the hover shows me the values of column (Name and Color ) . Is
>>>>>> there a way to change the hover values to (Name and value ) instead of
>>>>>> (Name and Color ) .
>>>>>>
>>>>>>
>>>>>> Thanks in advance
>>>>>>
>>>>>
--
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.