module jspy.render_nb_js_dot

Inheritance diagram of jyquickhelper.jspy.render_nb_js_dot

Short summary

module jyquickhelper.jspy.render_nb_js_dot

Renders a graph in Javascript.

source on GitHub

Classes

class

truncated documentation

RenderJsDot

Renders a graph in a notebook defined in DOT language with viz.js. On binder, …

Static Methods

staticmethod

truncated documentation

_build_script

Builds the javascript script based wrapping the DOT language.

_get_libs_css

Returns the dependencies.

Methods

method

truncated documentation

__init__

Documentation

Renders a graph in Javascript.

source on GitHub

class jyquickhelper.jspy.render_nb_js_dot.RenderJsDot(dot, local=False, width='100%', height='100%', divid=None, style=None, only_html=True, div_class=None, check_urls=True, lite=False)

Bases: RenderJS

Renders a graph in a notebook defined in DOT language with viz.js. On binder, argument local should be set to True to be working.

source on GitHub

Parameters:
  • dot – (str) dot

  • local – (bool) use local path to javascript dependencies

  • script – (str) script

  • width – (str) width

  • height – (str) height

  • style – (str) style (added in <style>...</style>)

  • divid – (str|None) id of the div

  • only_html – (bool) use only function display_html and not display_javascript to add javascript to the page.

  • div_class – (str) class of the section div which will host the results of the javascript

  • check_urls – (bool) by default, check url exists

  • lite – (bool) use lite version (no neato)

source on GitHub

__init__(dot, local=False, width='100%', height='100%', divid=None, style=None, only_html=True, div_class=None, check_urls=True, lite=False)
Parameters:
  • dot – (str) dot

  • local – (bool) use local path to javascript dependencies

  • script – (str) script

  • width – (str) width

  • height – (str) height

  • style – (str) style (added in <style>...</style>)

  • divid – (str|None) id of the div

  • only_html

    (bool) use only function display_html and not display_javascript to add javascript to the page.

  • div_class – (str) class of the section div which will host the results of the javascript

  • check_urls – (bool) by default, check url exists

  • lite

    (bool) use lite version (no neato)

source on GitHub

static _build_script(dot)

Builds the javascript script based wrapping the DOT language.

Parameters:

dotDOT language

Returns:

javascript

source on GitHub

static _get_libs_css(local, lite)

Returns the dependencies.

Parameters:
  • local – use local file (True) or remote urls (False)

  • lite – use lite version

Returns:

tuple (libs, css)

source on GitHub