0

I have a question about Visualization: Google Organizational Chart

Everything is perfect. The only thing I want is to add possible comments (some text) for existing connections between the nodes. How can I do that?

P.S. I see I can add ToolTips for each node. But what about text between the connected nodes?

Thank you.

4

1 回答 1

1

好的,如果有人对我的解决方案感兴趣,这里是:

  <style>/*please add styles after .js files, so it won't be overwritten*/
    .google-visualization-orgchart-connrow-medium {
        height: 64px;/*changed to a higher value so I could put some text in between nodes*/
    }
    .label{
        color:red; font-style:italic; border:1px solid red;
        position: absolute;
        margin-top:-60px;
    }
  </style>

<div class="label">My text between nodes</div>在节点字符串值内添加。例子:

data.addRows([
  ...
    ['John<div class="label">Brother</div>', 'Lewis'],
  ...
]);
于 2013-08-12T14:39:14.757 回答