0

私は自分のページで getOrgChart ライブラリを使用しようとしていますが、ブラウザはそれが関数ではないと主張し続けています:

コードは次のとおりです。

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
   <script src="getorgchart.js"></script>
   <link rel="stylesheet" src="getorgchart.css">
<script type="text/javascript"  src="https://www.google.com/jsapi"></script>
      <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
<script>
 $("#orgStaffing").getOrgChart({
                                theme: 'vivian',
                                primaryColumns: ['name','division','project','email'],
                                imageColumn: 'image',
                                gridView: true,
4

1 に答える 1

0

2 番目の電子メール「jdoe@company.com」の前に引用符を追加してください

あなたの問題を再現しようとしました

    $("#orgStaffing").getOrgChart(
        {
            theme: 'vivian',
            primaryColumns: ['name','division','project','email'],
            imageColumn: 'image',
            gridView: true,
            dataSource: [ 
                    {id: 1, parentId: null, name: 'John Smith', division: 'Inbound', project: 'West', email: 'jsmith@company.com', image: 'johnsmith.jpg'}, 
                    {id: 2, parentId: 1, name: 'Jane Doe', division: 'Inbound', project: 'West', email: 'jdoe@company.com', image: 'janedoe.jpg'}
            ]
        });
html, body {margin: 0px; padding: 0px;height: 100%; overflow: hidden; }
#people {width: 100%;height: 100%; } 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="http://www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.css">
<div id="orgStaffing"></div>

できます

dataSource が有効な JSON オブジェクトであることを確認してください。

于 2016-09-13T17:03:29.200 に答える