Skip to content

piranna/gitbook-plugin-plotly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plotly plugin for GitBook

Build Status NPM version

Plugin for GitBook to render Plotly charts

This plugin is based on code from gitbook-plugin-mermaid.

How to install it?

You can use install via NPM:

npm install gitbook-plugin-plotly

And use it for your book with in the book.json:

{
    "plugins": ["plotly"]
}

How to use it?

There are two options how can be graph put into the gitbook. To use embedded graph, put in your book block as:

{% plotly %}
{
  "a": "b"
}
{% endplotly %}

Plugin will pick up block body and replace it with generated svg diagram. To load graph from file, put in your book block as:

{% plotly src="./diagram.plotly" %}
{% endplotly %}

If not absolute, plugin will resolve path given in src attribute relative to the current book page, load its content and generate svg diagram.

About

Plugin for GitBook to render Plotly charts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •