diff --git a/README.md b/README.md index 692ad99..7164eb2 100644 --- a/README.md +++ b/README.md @@ -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/) | @@ -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 `
` into which the plot is rendered. | | `[className]` | `string` | `undefined` | applied to the `
` into which the plot is rendered | -| `[style]` | `Object` | `{position: 'relative', display: 'inline-block'}` | used to style the `
` into which the plot is rendered | +| `[innerStyle]` | `Object` | `{position: 'relative', display: 'inline-block'}` | used to style the `
` 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 | @@ -125,7 +125,7 @@ For a full description of Plotly chart types and attributes see the following re selector: 'plotly-example', template: ` + [useResizeHandler]="true" [innerStyle]="{position: 'relative', width: '100%', height: '100%'}"> `, }) export class PlotlyExampleComponent { diff --git a/projects/plotly/src/lib/plotly.component.ts b/projects/plotly/src/lib/plotly.component.ts index 57cebbb..cf92282 100644 --- a/projects/plotly/src/lib/plotly.component.ts +++ b/projects/plotly/src/lib/plotly.component.ts @@ -28,9 +28,10 @@ import { Plotly } from './plotly.interface'; selector: 'plotly-plot', standalone: true, imports: [CommonModule], - template: `
- -
`, + template: ` +
+ +
`, providers: [PlotlyService], }) export class PlotlyComponent implements OnInit, OnChanges, OnDestroy, DoCheck { @@ -47,7 +48,7 @@ export class PlotlyComponent implements OnInit, OnChanges, OnDestroy, DoCheck { layout = input>(); config = input>(); frames = input[]>(); - style = input<{ [key: string]: string }>(); + innerStyle = input<{ [key: string]: string }>(); divId = input(); revision = input(0);