Skip to content

Commit a5981a4

Browse files
committed
Updating README.md with angular syntax for props
1 parent fbcb73d commit a5981a4

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

Diff for: README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,22 @@ For a full description of Plotly chart types and attributes see the following re
8686

8787
**Warning**: for the time being, this component may _mutate_ its `layout` and `data` props in response to user input, going against React rules. This behaviour will change in the near future once https://github.com/plotly/plotly.js/issues/2389 is completed.
8888

89-
| Prop | Type | Default | Description |
90-
| ------------------ | ---------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91-
| `data` | `Array` | `[]` | list of trace objects (see https://plot.ly/javascript/reference/) |
92-
| `layout` | `Object` | `undefined` | layout object (see https://plot.ly/javascript/reference/#layout) |
93-
| `frames` | `Array` | `undefined` | list of frame objects (see https://plot.ly/javascript/reference/) |
94-
| `config` | `Object` | `undefined` | config object (see https://plot.ly/javascript/configuration-options/) |
95-
| `revision` | `Number` | `undefined` | When provided, causes the plot to update _only_ when the revision is incremented. |
96-
| `onInitialized` | `Function(figure, graphDiv)` | `undefined` | Callback executed after plot is initialized. See below for parameter information. |
97-
| `onUpdate` | `Function(figure, graphDiv)` | `undefined` | Callback executed when when a plot is updated due to new data or layout, or when user interacts with a plot. See below for parameter information. |
98-
| `onPurge` | `Function(figure, graphDiv)` | `undefined` | Callback executed when component unmounts, before `Plotly.purge` strips the `graphDiv` of all private attributes. See below for parameter information. |
99-
| `onError` | `Function(err)` | `undefined` | Callback executed when a plotly.js API method rejects |
100-
| `divId` | `string` | `undefined` | id assigned to the `<div>` into which the plot is rendered. |
101-
| `className` | `string` | `undefined` | applied to the `<div>` into which the plot is rendered |
102-
| `style` | `Object` | `{position: 'relative', display: 'inline-block'}` | used to style the `<div>` into which the plot is rendered |
103-
| `debug` | `Boolean` | `false` | Assign the graph div to `window.gd` for debugging |
104-
| `useResizeHandler` | `Boolean` | `false` | When true, adds a call to `Plotly.Plot.resize()` as a `window.resize` event handler |
89+
| Prop | Type | Default | Description |
90+
| -------------------- | ---------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91+
| `[data]` | `Array` | `[]` | list of trace objects (see https://plot.ly/javascript/reference/) |
92+
| `[layout]` | `Object` | `undefined` | layout object (see https://plot.ly/javascript/reference/#layout) |
93+
| `[frames]` | `Array` | `undefined` | list of frame objects (see https://plot.ly/javascript/reference/) |
94+
| `[config]` | `Object` | `undefined` | config object (see https://plot.ly/javascript/configuration-options/) |
95+
| `[revision]` | `Number` | `undefined` | When provided, causes the plot to update _only_ when the revision is incremented. |
96+
| `(initialized)` | `Function(figure, graphDiv)` | `undefined` | Callback executed after plot is initialized. See below for parameter information. |
97+
| `(update)` | `Function(figure, graphDiv)` | `undefined` | Callback executed when when a plot is updated due to new data or layout, or when user interacts with a plot. See below for parameter information. |
98+
| `(purge)` | `Function(figure, graphDiv)` | `undefined` | Callback executed when component unmounts, before `Plotly.purge` strips the `graphDiv` of all private attributes. See below for parameter information. |
99+
| `(error)` | `Function(err)` | `undefined` | Callback executed when a plotly.js API method rejects |
100+
| `[divId]` | `string` | `undefined` | id assigned to the `<div>` into which the plot is rendered. |
101+
| `[className]` | `string` | `undefined` | applied to the `<div>` into which the plot is rendered |
102+
| `[style]` | `Object` | `{position: 'relative', display: 'inline-block'}` | used to style the `<div>` into which the plot is rendered |
103+
| `[debug]` | `Boolean` | `false` | Assign the graph div to `window.gd` for debugging |
104+
| `[useResizeHandler]` | `Boolean` | `false` | When true, adds a call to `Plotly.Plot.resize()` as a `window.resize` event handler |
105105

106106
**Note**: To make a plot responsive, i.e. to fill its containing element and resize when the window is resized, use `style` or `className` to set the dimensions of the element (i.e. using `width: 100%; height: 100%` or some similar values) and set `useResizeHandler` to `true` while setting `layout.autosize` to `true` and leaving `layout.height` and `layout.width` undefined. This will implement the behaviour documented here: https://plot.ly/javascript/responsive-fluid-layout/
107107

Diff for: bin/publish

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ fi
99

1010

1111
./bin/build
12-
npm publish
12+
npm publish dist

Diff for: package.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"start": "ng serve",
99
"build": "ng-packagr -p ng-package.json",
1010
"test": "ng test",
11-
"version": "./bin/build && git add -Af dist",
1211
"postversion": "git push && git push --tags"
1312
},
1413
"homepage": "https://github.com/plotly/angular-plotly.js",

0 commit comments

Comments
 (0)