vega 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +12 -12
- data/lib/vega/version.rb +1 -1
- data/lib/vega.rb +8 -8
- data/licenses/LICENSE-vega-interpreter.txt +1 -1
- data/licenses/LICENSE-vega.txt +1 -1
- data/vendor/assets/javascripts/vega-embed.js +436 -248
- data/vendor/assets/javascripts/vega-interpreter.js +33 -40
- data/vendor/assets/javascripts/vega-lite.js +2191 -1580
- data/vendor/assets/javascripts/vega.js +7345 -11726
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cbe3f79c8626d51ab419723a26bd9133015a488d91a8ef60f5925cd252127fa
|
4
|
+
data.tar.gz: 8d42e626aa562a4829f71c383601d3b5a0cc7b84b4efeb4224d70b739c572689
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea278e7d7eb6ad1957ed3a009a07db088ee16bada50ed0df89da3474cfbee75f4fdec3f08b7667f57d78688069f8e89455d3832764e2502ada631b52c810a1c
|
7
|
+
data.tar.gz: 4083b48f59c39a69ecfadea7e5a7e30903a10188baa1fcf3858e13d491b723c7a94041e5abfe61e7b44bb92db91cc754a1d763d9b53c3de6894d0ac22b7ecbf7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Interactive charts for Ruby, powered by [Vega](https://vega.github.io/vega/) and
|
|
6
6
|
|
7
7
|
Works with Rails, iRuby, and other frameworks
|
8
8
|
|
9
|
-
[![Build Status](https://github.com/ankane/vega-ruby/workflows/build/badge.svg
|
9
|
+
[![Build Status](https://github.com/ankane/vega-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/vega-ruby/actions)
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -18,14 +18,14 @@ gem "vega"
|
|
18
18
|
|
19
19
|
Then follow the instructions for how you plan to use it:
|
20
20
|
|
21
|
-
- [
|
22
|
-
- [
|
23
|
-
- [
|
24
|
-
- [
|
21
|
+
- [Importmap](#importmap) (Rails 7 default)
|
22
|
+
- [esbuild or Webpack](#esbuild-or-webpack)
|
23
|
+
- [Webpacker](#webpacker) (Rails 6 default)
|
24
|
+
- [Sprockets](#sprockets)
|
25
25
|
- [iRuby](#iruby)
|
26
26
|
- [Other](#other)
|
27
27
|
|
28
|
-
###
|
28
|
+
### Importmap
|
29
29
|
|
30
30
|
Add to `config/importmap.rb`:
|
31
31
|
|
@@ -45,7 +45,7 @@ import "vega-embed"
|
|
45
45
|
window.dispatchEvent(new Event("vega:load"))
|
46
46
|
```
|
47
47
|
|
48
|
-
###
|
48
|
+
### esbuild or Webpack
|
49
49
|
|
50
50
|
Run:
|
51
51
|
|
@@ -62,7 +62,7 @@ window.vegaEmbed = embed
|
|
62
62
|
window.dispatchEvent(new Event("vega:load"))
|
63
63
|
```
|
64
64
|
|
65
|
-
###
|
65
|
+
### Webpacker
|
66
66
|
|
67
67
|
Run:
|
68
68
|
|
@@ -76,7 +76,7 @@ And add to `app/javascript/packs/application.js`:
|
|
76
76
|
window.vegaEmbed = require("vega-embed").default
|
77
77
|
```
|
78
78
|
|
79
|
-
###
|
79
|
+
### Sprockets
|
80
80
|
|
81
81
|
Add to `app/assets/javascripts/application.js`:
|
82
82
|
|
@@ -418,7 +418,7 @@ Automatically add a nonce when configured in Rails with:
|
|
418
418
|
|
419
419
|
By default, the Vega parser uses the Function constructor, which [can cause issues with CSP](https://vega.github.io/vega/usage/interpreter/).
|
420
420
|
|
421
|
-
For
|
421
|
+
For Importmap, add to `config/importmap.rb`:
|
422
422
|
|
423
423
|
```ruby
|
424
424
|
pin "vega-interpreter", to: "vega-interpreter.js"
|
@@ -430,13 +430,13 @@ And add to `app/javascript/application.js`:
|
|
430
430
|
import "vega-interpreter"
|
431
431
|
```
|
432
432
|
|
433
|
-
For
|
433
|
+
For Webpacker, run:
|
434
434
|
|
435
435
|
```sh
|
436
436
|
yarn add vega-interpreter
|
437
437
|
```
|
438
438
|
|
439
|
-
For
|
439
|
+
For Sprockets, add to `app/assets/javascripts/application.js`:
|
440
440
|
|
441
441
|
```js
|
442
442
|
//= require vega-interpreter
|
data/lib/vega/version.rb
CHANGED
data/lib/vega.rb
CHANGED
@@ -4,16 +4,16 @@ require "json"
|
|
4
4
|
require "securerandom"
|
5
5
|
|
6
6
|
# modules
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
require_relative "vega/method_helpers"
|
8
|
+
require_relative "vega/base_chart"
|
9
|
+
require_relative "vega/chart"
|
10
|
+
require_relative "vega/lite_chart"
|
11
|
+
require_relative "vega/spec"
|
12
|
+
require_relative "vega/helper"
|
13
|
+
require_relative "vega/version"
|
14
14
|
|
15
15
|
# integrations
|
16
|
-
|
16
|
+
require_relative "vega/engine" if defined?(Rails)
|
17
17
|
|
18
18
|
module Vega
|
19
19
|
class << self
|
data/licenses/LICENSE-vega.txt
CHANGED