我有一个网络,我正在使用vis.js构建,但它在宽度方面太大,无法放入页面的容器中.网络从左到右运行,包含有关特定进程的步骤.当一个人完成任务时,服务器会提供新的JSON记录来更新颜色.
由于布局,我无法更改容器大小.当网络加载时,它会导致字体非常小且不可读.有没有办法可以将缩放级别设置为一个选项,以便只显示该过程中的当前步骤?
function draw() {
test = null;
// create a network
var testContainer = document.getElementById('testing');
// create some nodes
var width = testing.clientWidth;
var nodes = [
{id: 1, x: 0, y: 1, label: 'Start', color: 'green', shape: 'circle'},
{id: 2, label: 'Step 2', shape: 'square'},
{id: 3, label: 'Step 3', shape: 'square'},
{id: 4, label: 'Step 4', shape: 'square'},
{id: 5, label: 'Step 5', shape: 'square'},
{id: 6, label: 'Step 6', shape: 'square'},
{id: 7, label: 'Step 7', …Run Code Online (Sandbox Code Playgroud) javascript visualization chap-links-library vis.js vis.js-network
有没有人花时间从 Cesium 应用程序中提取时间线小部件?我希望使用没有 Dojo 依赖项的时间线小部件。我找到了一个预告片,说这是可能的,但时间线示例并不是最容易进行逆向工程的。有没有人知道我如何提取必要的库并删除 Dojo 依赖项?