<div id="container" style="width: 100%; height: 100%">
Loading...
</div>
<link rel="stylesheet" href="/your-path/bi-web-sdk.min.css">
<script src="/your-path/lodash.min.js"></script>
<script src="/your-path/leaflet.js"></script>
<script src="/your-path/echarts.min.js"></script>
<script src="/your-path/bi-web-sdk.min.js"></script>
<script>
window.addEventListener('load', () => {
// 设置配置
BI.setConfig({
language: "pt_PT",
webUrl: "https://cleverbi-ng.percent.cn/",
serverUrl: "https://cleverbi-ng-service.percent.cn/api/subject",
mapResourceUrl: "/map-resource"
});
// 报告分享 id
const linkId = 'xxx';
// 创建一个报告
new BI.Report('container', { linkId });
});
</script>
import * as BI from 'cbi-web-sdk';
import 'cbi-web-sdk/cjs/bi-web-sdk.min.css';
BI.setConfig({
language: "zh_CN",
webUrl: "https://cleverbi-ng.percent.cn/",
serverUrl: "https://cleverbi-ng-service.percent.cn/api/subject",
mapResourceUrl: "/map-resource"
});
// 报告分享 id
const linkId = 'xxx';
// 创建一个报告
new BI.Report('container', { linkId });