javascript - Google organisational charts: styling with multiple attributes -


i'm using google organisational charts , can set 1 property

data.setrowproperty(3, 'style', 'border: 1px solid green'); 

however want change background putting in more 1 attribute not working me

data.setrowproperty(0, 'style', 'background-color:red; border: 1px solid green'); 

does know if can done?

is issue can't set multiple or can't set background-color?

if apply code example in [documentation][1] both styles added background-color isn't used because setting background default.

      google.setonloadcallback(drawchart);        function drawchart() {          var data = new google.visualization.datatable();          data.addcolumn('string', 'name');          data.addcolumn('string', 'manager');          data.addcolumn('string', 'tooltip');            data.addrows([            [{v:'mike', f:'mike<div style="color:red; font-style:italic">president</div>'}, '', 'the president'],            [{v:'jim', f:'jim<div style="color:red; font-style:italic">vice president</div>'}, 'mike', 'vp'],            ['alice', 'mike', ''],            ['bob', 'jim', 'bob sponge'],            ['carol', 'bob', '']          ]);                      data.setrowproperty(0, 'style', 'background-color:red; border: 1px solid green');            var chart = new google.visualization.orgchart(document.getelementbyid('chart_div'));          chart.draw(data, {allowhtml:true});        }
<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['orgchart']}]}"></script>         <div id="chart_div""></div>     

if inspect "mike" style attribute incorrectly added. consider above example line

data.setrowproperty(0, 'style', 'background-color:red; border: 1px solid green'); 

and compare same thing using line:

data.setrowproperty(0, 'style', 'background: none; background-color:red; border: 1px solid green'); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -