def to_html(placeholder=random_canvas_id)
      chart_hash_must_be_present
      script = load_dependencies('web_frameworks')
      @div_id = placeholder
      script << high_chart_css(placeholder)
      # Helps to denote either of the three classes.
      chart_class = extract_chart_class
      # When user wants to plot a HighMap
      if chart_class == 'Map'
        script << high_map(placeholder, self)
      # When user wants to plot a HighStock
      elsif chart_class == 'StockChart'
        script << high_stock(placeholder, self)
      # When user wants to plot a HighChart
      elsif chart_class == 'Chart'
        script << high_chart(placeholder, self)
      end
      script
    end
def to_html(placeholder=random_canvas_id)
      chart_hash_must_be_present
      script = load_dependencies('web_frameworks')
      @div_id = placeholder
      script << high_chart_css(placeholder)
      # Helps to denote either of the three classes.
      chart_class = extract_chart_class
      # When user wants to plot a HighMap
      if chart_class == 'Map'
        script << high_map(placeholder, self)
      # When user wants to plot a HighStock
      elsif chart_class == 'StockChart'
        script << high_stock(placeholder, self)
      # When user wants to plot a HighChart
      elsif chart_class == 'Chart'
        script << high_chart(placeholder, self)
      end
      script
    end
@example

 To display the html code of the chart, use `to_html`. To see the same
 in IRuby notebook use `show_in_iruby`.
 User can also use :
 `IRuby.html chart.to_html` (or)
 `IRuby.html chart.to_html.to_s` (or)
 `IRuby.display chart.to_html, mime: 'text/html'`
 to get the same chart in IRuby notebook.