Shekharrajak / ng-bokeh

Angular wrapper for bokehJS
6 stars 2 forks source link

Added BokehJS as dependecy but not able to use methods #1

Open Shekharrajak opened 5 years ago

Shekharrajak commented 5 years ago

When I imported the BokehJS in component and tried to get the plotting object Bokehjs.Plotting, it is coming as undefined.

Here is the console.log(Bokehjs) output :

{version: "1.0.4", embed: {…}, protocol: {…}, _testing: {…}, logger: Logger, …}
Models: ƒ (name)
documents: []
embed: {add_document_standalone: ƒ, add_document_from_session: ƒ, embed_items_notebook: ƒ, kernels: {…}, BOKEH_ROOT: "bk-root", …}
index: {}
logger: Logger {_name: "bokeh", _log_level: LogLevel, trace: ƒ, debug: ƒ, info: ƒ, …}
protocol: {Message: ƒ, Receiver: ƒ, __esModule: true}
safely: ƒ safely(fn, silent)
set_log_level: ƒ set_log_level(level)
settings: Settings {_dev: false}
version: "1.0.4"
_testing: {results: {…}, init: ƒ, record: ƒ, count: ƒ, clear: ƒ, …}
__esModule: true
__proto__: Object}

Also before this I had issue similiar to https://github.com/bokeh/bokeh/issues/8197, that I resolved by modifying the path to relative path in many files of bokehjs (node_module/bokehjs/src/lib/api/**) .

For example

import {isEqual} from "core/util/eq"

is replaced with

import {isEqual} from "../core/util/eq"

in node_module/bokehjs/src/lib/api/plotting.ts

Shekharrajak commented 5 years ago

It looks like this issue, is resolved recently in https://github.com/bokeh/bokeh/pull/8782 , need to verify it.