回复 10楼 shonken
*** sbrowser 合并 ***
LOCAL c11,c12
c11=JUSTPATH(sys(16,0))
c12=( SUBSTR(c11, AT('.CLICK',c11)+7 ))
cdata =FILETOSTR(c12+"\js11.json")
echarts=FILETOSTR(c12+"\echarts.min.js")
TEXT TO cHtml TEXTMERGE NOSHOW PRETEXT 7
<!DOCTYPE html>
<html lang="zh-CN" style="height: 100%">
<head>
<meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<div id="container" style="height: 100%"></div>
<script type="text/javascript">
<<m.echarts>>
var graph=<<m.cdata>>
var dom = document.getElementById('container');
var myChart = echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
});
var app = {};
var option;
myChart.showLoading();
myChart.hideLoading();
graph.nodes.forEach(function (node) {
node.label = {
show: node.symbolSize > 30
};
});
option = {
title: {
text: 'Les Miserables',
subtext: 'Default layout',
top: 'bottom',
left: 'right'
},
tooltip: {},
legend: [
{
// selectedMode: 'single',
data: graph.categories.map(function (a) {
return a.name;
})
}
],
animationDuration: 1500,
animationEasingUpdate: 'quinticInOut',
series: [
{
name: 'Les Miserables',
type: 'graph',
layout: 'none',
data: graph.nodes,
links: graph.links,
categories: graph.categories,
roam: true,
label: {
position: 'right',
formatter: '{b}'
},
lineStyle: {
color: 'source',
curveness: 0.3
},
emphasis: {
focus: 'adjacency',
lineStyle: {
width: 10
}
}
}
]
};
myChart.setOption(option);
if (option && typeof option === 'object') {
myChart.setOption(option);
}
window.addEventListener('resize', myChart.resize);
</script>
</body>
</html>
ENDTEXT
Strtofile(cHtml,c12+"\RelationshipChart2.html")
Thisform.wb.loadFile(c12+"\RelationshipChart2.html")
*Thisform.wb.loadHtml(cHtml)
[此贴子已经被作者于2022-11-22 16:53编辑过]