StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
675 B
27 lines
675 B
4 years ago
|
"use strict"
|
||
|
|
||
|
var vectorizeText = require("../index.js")
|
||
|
|
||
|
var graph = vectorizeText("Hello world! 你好",
|
||
|
{ width:500,
|
||
|
textBaseline: "top"
|
||
|
})
|
||
|
|
||
|
console.log(graph)
|
||
|
|
||
|
var svg = ['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="80" >']
|
||
|
graph.edges.forEach(function(e) {
|
||
|
var p0 = graph.positions[e[0]]
|
||
|
var p1 = graph.positions[e[1]]
|
||
|
svg.push('<line x1="' + p0[0] + '" y1="' + p0[1] +
|
||
|
'" x2="' + p1[0] + '" y2="' + p1[1] +
|
||
|
'" stroke-width="1" stroke="black" />')
|
||
|
})
|
||
|
svg.push("</svg>")
|
||
|
|
||
|
if(typeof window !== "undefined") {
|
||
|
document.body.innerHTML = svg.join("")
|
||
|
} else {
|
||
|
console.log(svg.join(""))
|
||
|
}
|