plotly-plot is not a known element issue in Angular 11
vikramgeek opened this issue · comments
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 what angular version you're using?
Also, may you try using the PlotlyViaCDNModule
?
Same issue here with Angular 10. Is there a solution that doesn't include using the CDN?
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