Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: #287 Rename style property (breaking change)#289

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
bzh2610 wants to merge1 commit intoplotly:master
base:master
Choose a base branch
Loading
frombzh2610:rename-style-prop
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -99,7 +99,7 @@ For a full description of Plotly chart types and attributes see the following re
### Basic Props

| Prop | Type | Default | Description |
|--------------------------| ---------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|----------------------------| ---------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[data]` | `Array` | `[]` | list of trace objects (see https://plot.ly/javascript/reference/) |
| `[layout]` | `Object` | `undefined` | layout object (see https://plot.ly/javascript/reference/#layout) |
| `[frames]` | `Array` | `undefined` | list of frame objects (see https://plot.ly/javascript/reference/) |
Expand All@@ -114,7 +114,7 @@ For a full description of Plotly chart types and attributes see the following re
| `(error)` | `Function(err)` | `undefined` | Callback executed when a plotly.js API method rejects |
| `[divId]` | `string` | `undefined` | id assigned to the `<div>` into which the plot is rendered. |
| `[className]` | `string` | `undefined` | applied to the `<div>` into which the plot is rendered |
| `[style]` | `Object` | `{position: 'relative', display: 'inline-block'}` | used to style the `<div>` into which the plot is rendered |
| `[innerStyle]` | `Object` | `{position: 'relative', display: 'inline-block'}` | used to style the `<div>` into which the plot is rendered |
| `[debug]` | `Boolean` | `false` | Assign the graph div to `window.gd` for debugging |
| `[useResizeHandler]` | `Boolean` | `false` | When true, adds a call to `Plotly.Plot.resize()` as a `window.resize` event handler |

Expand All@@ -125,7 +125,7 @@ For a full description of Plotly chart types and attributes see the following re
selector: 'plotly-example',
template: `
<plotly-plot [data]="graph.data" [layout]="graph.layout"
[useResizeHandler]="true" [style]="{position: 'relative', width: '100%', height: '100%'}">
[useResizeHandler]="true" [innerStyle]="{position: 'relative', width: '100%', height: '100%'}">
</plotly-plot>`,
})
export class PlotlyExampleComponent {
Expand Down
9 changes: 5 additions & 4 deletionsprojects/plotly/src/lib/plotly.component.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,9 +28,10 @@ import { Plotly } from './plotly.interface';
selector: 'plotly-plot',
standalone: true,
imports: [CommonModule],
template: `<div #plot [attr.id]="divId()" [ngClass]="getClassName()" [ngStyle]="style()">
<ng-content></ng-content>
</div>`,
template: `
<div #plot [attr.id]="divId()" [ngClass]="getClassName()" [ngStyle]="innerStyle()">
<ng-content></ng-content>
</div>`,
providers: [PlotlyService],
})
export class PlotlyComponent implements OnInit, OnChanges, OnDestroy, DoCheck {
Expand All@@ -47,7 +48,7 @@ export class PlotlyComponent implements OnInit, OnChanges, OnDestroy, DoCheck {
layout = input<Partial<Plotly.Layout>>();
config = input<Partial<Plotly.Config>>();
frames = input<Partial<Plotly.Config>[]>();
style = input<{ [key: string]: string }>();
innerStyle = input<{ [key: string]: string }>();

divId = input<string>();
revision = input(0);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp