Skip to content

plotly-plot is not a known element issue in Angular 11 #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vikramgeek opened this issue Feb 18, 2021 · 3 comments
Closed

plotly-plot is not a known element issue in Angular 11 #150

vikramgeek opened this issue Feb 18, 2021 · 3 comments

Comments

@vikramgeek
Copy link

vikramgeek commented Feb 18, 2021

plotlygraph.component.html :- 
 <plotly-plot [data]="graph.data" [layout]="graph.layout"></plotly-plot>

In plotlygraph.component.ts :-
graph object is already declared there.

In app.module.ts:-
 import * as PlotlyJS from 'plotly.js/dist/plotly.js'; 
 import { PlotlyModule } from 'angular-plotly.js';

 PlotlyModule.plotlyjs = PlotlyJS;

 imports: [
  BrowserModule,
  AppRoutingModule,
  BrowserAnimationsModule,
  HttpClientModule,
  PlotlyModule,
 ],
@vikramgeek vikramgeek changed the title plotly-plot is not a known element Angular 11 plotly-plot is not a known element issue in Angular 11 Feb 18, 2021
@andrefarzat
Copy link
Collaborator

@vikramgeek what angular version you're using?
Also, may you try using the PlotlyViaCDNModule?

@jml0123
Copy link

jml0123 commented Mar 8, 2021

Same issue here with Angular 10. Is there a solution that doesn't include using the CDN?

@andrefarzat
Copy link
Collaborator

andrefarzat commented Mar 9, 2021

I dunno why this happens, @jml0123 . May I ask more details about the code/implementation in your angular 10?
Also, we have to update the docs in the README.md, for nowadays plotly.js should be included from plotly.js-dist package in favor of plotly.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants