Module: FulgurChart

Defined in:
lib/fulgur_chart.rb

Defined Under Namespace

Classes: Builder

Class Method Summary collapse

Class Method Details

.build(spec_json) ⇒ Object

Entry point for the builder API:

FulgurChart.build(spec_json).width(800).dsl(:chartjs).render(:svg)  # => String
FulgurChart.build(spec_json).format(:png).render                    # => binary String

‘spec_json` is a chart.js v4 / Vega-Lite DSL JSON string. The behavior (DSL auto-detect, options, error classes, determinism) follows docs/binding-api-contract.md.



20
21
22
# File 'lib/fulgur_chart.rb', line 20

def self.build(spec_json)
  Builder.new(spec_json)
end