Class: Asciidoctor::Chart::Converter::Html5C3jsConverter
- Defined in:
- lib/asciidoctor/chart/converter/c3js.rb
Instance Method Summary collapse
- #convert_bar_chart(node) ⇒ Object
- #convert_line_chart(node) ⇒ Object
- #convert_pie_chart(node) ⇒ Object
- #convert_spline_chart(node) ⇒ Object
- #convert_step_chart(node) ⇒ Object
Methods inherited from Base
Instance Method Details
#convert_bar_chart(node) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/asciidoctor/chart/converter/c3js.rb', line 16 def node data, labels = prepare_data node " \#{chart_block_element node}\n \#{chart_bar_script node, data, labels}\n HTML\nend\n" |
#convert_line_chart(node) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/asciidoctor/chart/converter/c3js.rb', line 7 def convert_line_chart node data, labels = prepare_data node chart_generate_script = chart_line_script node, data, labels " \#{chart_block_element node}\n \#{chart_generate_script}\n HTML\nend\n" |
#convert_pie_chart(node) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/asciidoctor/chart/converter/c3js.rb', line 40 def convert_pie_chart node raw_data = node.attr 'data-raw', [] " \#{chart_block_element node}\n \#{chart_pie_script node, raw_data}\n HTML\nend\n" |
#convert_spline_chart(node) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/asciidoctor/chart/converter/c3js.rb', line 32 def convert_spline_chart node data, labels = prepare_data node " \#{chart_block_element node}\n \#{chart_spline_script node, data, labels}\n HTML\nend\n" |
#convert_step_chart(node) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/asciidoctor/chart/converter/c3js.rb', line 24 def convert_step_chart node data, labels = prepare_data node " \#{chart_block_element node}\n \#{chart_step_script node, data, labels}\n HTML\nend\n" |