bokeh-vue

0.0.5 • Public • Published

Show bokeh chart in vue

Installation

npm i bokeh-vue --save

Usage

<template>
  <div>
    <bokeh-vue :plot="plot"></bokeh-vue>
  </div>
</template>
 
<script>
import BokehVue from 'bokeh-vue'
export default {
  components: {
    'bokeh-vue': BokehVue
  },
  data () {
    plot: {}
  },
  mounted () {
    this.plot = {
      'bokehVersion': '1.0.2',
      'div': '["<div class="bk-root" id="74694b03-e536-4de1-b629-e5c7cc63a5fa"></div>"]',
      'script': '["(function() {↵  var fn = function() {↵    Bokeh.sa…t.addEventListener("DOMContentLoaded", fn);↵})();"]'
    }
  }
}
</script>

You must input the value of 'bokehVersion'

The type of 'div' and 'script' is array

Backend python code

scriptdiv = components(pwrap_script=False)
return {'div':div, 'script':script}

Readme

Keywords

Package Sidebar

Install

npm i bokeh-vue

Weekly Downloads

5

Version

0.0.5

License

MIT

Unpacked Size

4.62 kB

Total Files

5

Last publish

Collaborators

  • lccc