![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@ng-vcl/plotly
Advanced tools
Be aware of this Plotly bug.
Name | Type | Default | Description |
---|---|---|---|
plotId | string | undefined | plot div id |
plotClass | string | undefined | plot div classes |
data | any[] | undefined | plot data |
layout | any | undefined | plot layout |
configuration | any | undefined | plot configuration |
events | any | undefined | plot events, see "Attaching events" below |
plot | any | undefined | plot div (HTMLElement) |
debug (1) | boolean | false | whether to output event information in the console |
(1) Suggested use is in conjunction with browsing the vcl-plotly code
Name | Arguments | Description |
---|---|---|
restyle | update: any, traces?: number[] | Plotly.restyle wrapper |
relayout | layout: any = this.layout | Plotly.relayout wrapper |
update | Plotly.update wrapper | |
redraw | Plotly.redraw wrapper (force a full recalculation and redraw of the plot) | |
recreate | Plotly.newPlot wrapper | |
addTraces | traces: any OR any[], index?: number | Plotly.addTraces wrapper |
deleteTraces | traces: number OR number[] | Plotly.deleteTraces wrapper |
The plotly package provides a special entry point for webpack. Add "webpack" to resolve.mainFields in your webpack config file.
resolve: { mainFields: ["webpack", "module", "browser", "main"], ... }
if you want to use plotly in combination with zone.js, you must include plotly before zone.js in your project!
import '@ng-vcl/plotly';
import 'zone.js/dist/zone';
See also: https://github.com/plotly/plotly.js/issues/955.
import { VCLPlotlyModule } from '@ng-vcl/plotly';
@NgModule({
...
imports: [
VCLPlotlyModule
]
...
})
export class AppModule {}
<vcl-plotly *ngIf="data"
[debug]="debug"
[plotId]="plotId"
[data]="data"
[layout]="layout"
[configuration]="configuration"
[events]="events">
</vcl-plotly>
The events
field is an object just like layout
and configuration
.
To attach your custom events to the plotly plot, see the possible
events
and create them like so:
const events = {
plotly_click: (data: any, event: any, plotId: string, plot: any, Plotly: any) => {
...
}
}
Note: if you want to add a plotly_afterplot
event handler,
you'll have to manually set afterPlot
to true.
vclPlotlyComponent.afterPlot = true
It's also possible to enable the debug flag to output information in the console.
<vcl-plotly
...
[debug]="true"
...>
</vcl-plotly>
FAQs
Plotly vcl component
The npm package @ng-vcl/plotly receives a total of 4 weekly downloads. As such, @ng-vcl/plotly popularity was classified as not popular.
We found that @ng-vcl/plotly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.