Module: Workbench::VizHelper

Defined in:
app/helpers/workbench/viz_helper.rb

Instance Method Summary collapse

Instance Method Details

#graph_javascript_tagObject



6
7
8
9
10
11
# File 'app/helpers/workbench/viz_helper.rb', line 6

def graph_javascript_tag
  content_for :head do
    javascript_include_tag "https://cdn.jsdelivr.net/npm/chart.js@4.4.4/dist/chart.umd.min.js",
      "https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns@3.0.0/dist/chartjs-adapter-date-fns.bundle.min.js"
  end
end

#graph_viz_tagObject



2
3
4
# File 'app/helpers/workbench/viz_helper.rb', line 2

def graph_viz_tag()
  (:span, '', data: { "diagram": 'digraph { a -> b }', 'graph-viz': 'true'})
end