Jump to content

Include other libraries in examples


Recommended Posts

Hello Team,

Issue: Trying to import plotly causes Uncaught ReferenceError: plotly is not defined.

Context:I have been using spotfire mod examples from here ->https://github.com/TIBCOSoftware/spotfire-mods and tried to edit existing examples. I tried to install external charting libraries like plotly.js but when I tried to import the package into existing codebase the console log throws Uncaught Reference Error.

I am a js novice and have no experience with webpack.

Steps followed:

1. I used ts-spiderchart-d3 example. I setup the environment by running npm install.

2. Ran npm start and npm run server and verified that spiderchart is loading in spotfire client.

3.Decided to add plotly to it by doing npm install plotly.js --save-dev and npm install @types/plotly.js --save-dev

4. Added import * as Plotly from 'plotly.js';

5. This leads to Uncaught reference error.

Any directions or help will be greatly appreciated.

Thanks,

Adiamaan Keerthi

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...