<https://lh5.googleusercontent.com/-gWhQvfu2Uo0/UjlXfCSDk5I/AAAAAAAAAIw/noqoNL8RHsg/s1600/googleChart.png>
Thank for the help

i tried your code but is partially working 
in my column chart only the first value get displayed not the remaining 
(the value of gujarat , maharashtra , rajastan)

Thanks




On Tuesday, September 17, 2013 6:53:17 PM UTC+5:30, Ravindra Gharge wrote:
>
> I am setting the columns to use in the chart's view
> I have the javascript array ( pausecontent ) which is dynamic and have the 
> name of the states 
> I  want to assign this to views lable 
> I tryed the code which is commented
> please suggest better approach 
>
> bellow code is working fine but i want to assign the array pausecontent[] 
> which is dynamic 
>  
> my code is 
>
>  view: {
>       // set the columns to use in the chart's view
>       // calculated columns put data belonging to each country in the 
> proper column
>     /*  columns: [0,
>       for(var index=0; index<pausecontent.length; index++){
>          {
>         type: 'number',
>         label: pausecontent[index],
>         calc: function (dt, row) {
>           return (dt.getValue(row, 0) == pausecontent[index]) ? 
> dt.getValue(row, 1) : null;
>         }
>       }
>       }]
>     }*/
>       columns: [0, {
>         type: 'number',
>         label: pausecontent[0],
>         calc: function (dt, row) {
>           return (dt.getValue(row, 0) == pausecontent[0]) ? 
> dt.getValue(row, 1) : null;
>         }
>       },{
>         type: 'number',
>         label: pausecontent[1],
>         calc: function (dt, row) {
>           return (dt.getValue(row, 0) == pausecontent[1]) ? 
> dt.getValue(row, 1) : null;
>         }
>       }, {
>         type: 'number',
>         label: pausecontent[2],
>         calc: function (dt, row) {
>           return (dt.getValue(row, 0) == pausecontent[2]) ? 
> dt.getValue(row, 1) : null;
>         }
>       }, {
>         type: 'number',
>         label: pausecontent[3],
>         calc: function (dt, row) {
>           return (dt.getValue(row, 0) == pausecontent[3]) ? 
> dt.getValue(row, 1) : null;
>         }
>       }
>     ]}
>

-- 
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/groups/opt_out.

Reply via email to