Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I getting "ArrayBuffer(ReferenceError: Can't find variable: vg)" #163

Open
SashkoTar opened this issue Nov 19, 2018 · 1 comment
Open

I getting "ArrayBuffer(ReferenceError: Can't find variable: vg)" #163

SashkoTar opened this issue Nov 19, 2018 · 1 comment

Comments

@SashkoTar
Copy link

I run quite simple flow
Vegas("Country Pop").
withData(
Seq(
Map("country" -> "USA", "population" -> 314),
Map("country" -> "UK", "population" -> 64),
Map("country" -> "DK", "population" -> 80)
)
).
encodeX("country", Nom).
encodeY("population", Quant).
mark(Bar).show

but I get blank window for graph and message "ArrayBuffer(ReferenceError: Can't find variable: vg)"

I use version 0.3.11
Could you please let me know where I can start fixing from?

@oshikiri
Copy link
Collaborator

oshikiri commented Nov 24, 2018

@SashkoTar There seems to be an error in generated HTML.

Could you please check the output of println(plot.html.pageHTML())?

scala> import vegas._
import vegas._

scala> 

scala> val plot = Vegas("Country Pop").
     |   withData(
     |     Seq(
     |       Map("country" -> "USA", "population" -> 314),
     |       Map("country" -> "UK", "population" -> 64),
     |       Map("country" -> "DK", "population" -> 80)
     |     )
     |   ).
     |   encodeX("country", Nom).
     |   encodeY("population", Quant).
     |   mark(Bar)
plot: vegas.DSL.ExtendedUnitSpecBuilder = ExtendedUnitSpecBuilder(...

scala> println(plot.html.pageHTML())
<html>
  <head>
    <script src="https://cdn.jsdelivr.net/webjars/org.webjars.bower/d3/3.5.17/d3.min.js" charset="utf-8"></script>
...
    </body>
</html>

scala> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants