创建一个包含甘特图结构和数据的 JSON 对象
config | object | 可选,包含甘特图配置的对象 |
gantt.exportToJSON({
name:"gantt.json"
});
该方法属于 export 扩展,因此请确保已启用 export_api 插件。
对于 8.0 版本之前的甘特图,需要在页面中添加 https://export.dhtmlx.com/gantt/api.js 来使用在线导出服务,例如:
<script src="codebase/dhtmlxgantt.js"></script>
<script src="https://export.dhtmlx.com/gantt/api.js"></script>
config 对象支持以下选项: