![JAR search and dependency download from the Maven repository](/logo.png)
vegas.render.BaseHTMLRenderer.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vegas_2.11 Show documentation
Show all versions of vegas_2.11 Show documentation
The missing matplotlib for Scala and Spark
The newest version!
package vegas.render
import vegas.spec.Spec.ExtendedUnitSpec
import scala.io.Source
trait BaseHTMLRenderer {
private val WebJars = Source.fromInputStream(getClass.getResourceAsStream("/webjars.csv"))
.getLines
.map { l => val row = l.split(","); (row(0), row(1)) }
.toMap
private def CDN(artifact: String, file: String) = s"https://cdn.jsdelivr.net/webjars/org.webjars.bower/$artifact/${WebJars(artifact)}/$file"
def JSImports = List(
CDN("d3", "d3.min.js"),
CDN("vega", "vega.min.js"),
CDN("vega-lite", "vega-lite.min.js"),
"https://vega.github.io/vega-editor/vendor/vega-embed.js"
)
def defaultName = {
"vegas-" + java.util.UUID.randomUUID.toString
}
def specJson: String
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy