Skip to content

Commit 56b0c4d

Browse files
committed
Rename style property
1 parent 5201d97 commit 56b0c4d

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ For a full description of Plotly chart types and attributes see the following re
9999
### Basic Props
100100

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

@@ -125,7 +125,7 @@ For a full description of Plotly chart types and attributes see the following re
125125
selector: 'plotly-example',
126126
template: `
127127
<plotly-plot [data]="graph.data" [layout]="graph.layout"
128-
[useResizeHandler]="true" [style]="{position: 'relative', width: '100%', height: '100%'}">
128+
[useResizeHandler]="true" [innerStyle]="{position: 'relative', width: '100%', height: '100%'}">
129129
</plotly-plot>`,
130130
})
131131
export class PlotlyExampleComponent {

projects/plotly/src/lib/plotly.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ import { Plotly } from './plotly.interface';
2828
selector: 'plotly-plot',
2929
standalone: true,
3030
imports: [CommonModule],
31-
template: `<div #plot [attr.id]="divId()" [ngClass]="getClassName()" [ngStyle]="style()">
32-
<ng-content></ng-content>
33-
</div>`,
31+
template: `
32+
<div #plot [attr.id]="divId()" [ngClass]="getClassName()" [ngStyle]="innerStyle()">
33+
<ng-content></ng-content>
34+
</div>`,
3435
providers: [PlotlyService],
3536
})
3637
export class PlotlyComponent implements OnInit, OnChanges, OnDestroy, DoCheck {
@@ -47,7 +48,7 @@ export class PlotlyComponent implements OnInit, OnChanges, OnDestroy, DoCheck {
4748
layout = input<Partial<Plotly.Layout>>();
4849
config = input<Partial<Plotly.Config>>();
4950
frames = input<Partial<Plotly.Config>[]>();
50-
style = input<{ [key: string]: string }>();
51+
innerStyle = input<{ [key: string]: string }>();
5152

5253
divId = input<string>();
5354
revision = input(0);

0 commit comments

Comments
 (0)