如何在jQuery的谷歌组织结构图中显示二对一关系

时间:2019-05-16 06:37:03

标签: c# jquery model-view-controller

<script src="orgchart/orgchart.js"></script>
<div id="chart_div"></div>
<div id="chart_div2"></div>
<script>
  google.charts.load('current', {
    packages: ["orgchart"]
  });
  google.charts.setOnLoadCallback(drawChart);
  var lst = [];

  function drawChart() {
    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Name');
    data.addColumn('string', 'Manager');
    data.addColumn('string', 'ToolTip'); // For each orgchart box, provide the name, manager, and tooltip to show. data.addRows([ [{ v: 'ScanImport002', f: 'Scan Import' }, '', ''], [{ v: 'Fusion', f: 'Fusion' }, 'ScanImport002', ''], [{ v: 'DosimetristContouring003', f: 'Dosimetrist Contouring' }, 'ScanImport002', ''], // ['Dosimetrist Contouring', 'ScanImport002', ''], [{ v: 'test003', f: 'test' }, 'DosimetristContouring003', ''], [{ v: 'Physicist Chart Check003 ', f: 'Physicist Chart Check' }, 'test003', ''], [{ v: 'Physicist Chart Check0031 ', f: 'Physicist Chart Check' }, 'Therapist Chart Check012', ''], [{ v: 'Therapist Chart Check012', f: 'Therapist Chart Check' }, 'DosimetristContouring003', ''], // ['Plan Completion2', 'Dosimetrist Contouring', ''], ['Plan Completion', 'Fusion', 'Bob Sponge'], ['MD Check', 'Plan Completion', ''], ['Plan Documentation', 'MD Check', ''], ['Physicist Initial Chart Check', 'Plan Documentation', ''], // ['Therapist Chart Check', 'Physicist Initial Chart Check', ''] ]); console.log(data); var chart = new google.visualization.OrgChart(document.getElementById('chart_div')); chart.draw(data, { allowHtml: true }); }

0 个答案:

没有答案