Class: Vega::LiteChart
Instance Method Summary
collapse
Methods inherited from BaseChart
#embed_options!, #to_html, #to_iruby, #to_iruby_mimebundle, #to_json
Constructor Details
Returns a new instance of LiteChart.
13
14
15
16
|
# File 'lib/vega/lite_chart.rb', line 13
def initialize
@schema = "https://vega.github.io/schema/vega-lite/v5.json"
super()
end
|
Instance Method Details
#data!(value) ⇒ Object
18
19
20
21
|
# File 'lib/vega/lite_chart.rb', line 18
def data!(value)
@spec[:data] = data_value(value)
self
end
|
#spec(*args) ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/vega/lite_chart.rb', line 25
def spec(*args)
if args.empty?
@spec
else
dup.spec!(*args)
end
end
|
#to_pdf ⇒ Object
41
42
43
|
# File 'lib/vega/lite_chart.rb', line 41
def to_pdf
export("vl2pdf")
end
|
#to_png ⇒ Object
33
34
35
|
# File 'lib/vega/lite_chart.rb', line 33
def to_png
export("vl2png")
end
|
#to_svg ⇒ Object
37
38
39
|
# File 'lib/vega/lite_chart.rb', line 37
def to_svg
export("vl2svg")
end
|