Skip to content

Commit

Permalink
Add VegaLite.jl integration
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Jun 7, 2018
1 parent 1b397d9 commit 127b024
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# DataVoyager.jl v0.2.0 Release Notes
* Add VegaLite.jl integration

# DataVoyager.jl v0.1.1 Release Notes
* Use newer voyager version

Expand Down
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ IterableTables 0.6.1
DataValues 0.3.0
JSON 0.9.1
URIParser
VegaLite 0.3.0
16 changes: 9 additions & 7 deletions src/DataVoyager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module DataVoyager

using Electron, DataValues

import IteratorInterfaceExtensions, TableTraits, IterableTables, JSON
import IteratorInterfaceExtensions, TableTraits, IterableTables, JSON, VegaLite

export Voyager

Expand Down Expand Up @@ -42,22 +42,24 @@ function (v::Voyager)(source)

run(v.w, code)

return nothing
return v
end

# function Base.getindex(v::Voyager)
# code = "voyagerInstance.getSpec(true)"
function Base.getindex(v::Voyager)
code = "voyagerInstance.getSpec(true)"

# content = run(v.w, code)
content = run(v.w, code)

# return VegaLite.VLSpec{:plot}(content)
# end
return VegaLite.VLSpec{:plot}(content)
end

# function Base.getindex(v::Voyager, index::Int)
# code = "voyagerInstance.getBookmarkedSpecs()"

# content = run(v.w, code)

# info(content)

# return VegaLite.VLSpec{:plot}(JSON.parse(content[index]))
# end

Expand Down

0 comments on commit 127b024

Please sign in to comment.