Look at this example http://savedbythegoog.appspot.com/?id=ag5zYXZlZGJ5dGhlZ29vZ3ISCxIJU2F2ZWRDb2RlGJXX1gEM
see how the number are aligned using the 'style' property and the table option 'allowHtml'. HTH ChartMan On Mon, Sep 14, 2009 at 11:30 PM, Asimov <[email protected]> wrote: > > Did you try to tamper with the table.draw(data, {allowHtml: true}); > attribute? > > On Aug 30, 7:22 pm, Sandeep <[email protected]> wrote: > > Hi, > > > > I need to change the text alignment for the cells in the DataTable. > > > > Below is my code : > > > > var data = new google.visualization.DataTable(); > > data.addColumn('string', 'Currency'); > > data.addColumn('number', 'Amount'); > > data.addRows(resultset.length); > > for(var i=0;i<resultset.length;i++) > > { > > data.setValue(i,0,resultset[i].currency.toString(), > > {'style': 'text-align:center;'}); > > data.setValue(i,1,parseFloat(resultset[i].amount), > > {'style': 'text-align:center;'}); > > > > } > > > > var sTableView = new google.visualization.Table > > (document.getElementById(sTableViewContainerID)); > > sTableView.draw(data ,{width: 200, height: 200, title: ''}); > > > > I'm struggling with this a lot !!! > > Appreciate if someone can help !! > > > > Thanks > > Sandeep > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
