Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
10 changes: 9 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
updates:
- package-ecosystem: npm
directory: /
target-branch: main
target-branch: master
schedule: { interval: weekly }
groups:
angular: { patterns: ["@angular/*", "angular-eslint", "@angular-eslint/*", "ng-packagr", "typescript"] }
Expand All @@ -24,6 +24,8 @@ updates:
update-types: ["version-update:semver-major"]
- dependency-name: "typescript-eslint"
update-types: ["version-update:semver-major"]
- dependency-name: "plotly.js-dist"
update-types: ["version-update:semver-major"]
- package-ecosystem: npm
directory: /
target-branch: v20
Expand All @@ -48,6 +50,10 @@ updates:
update-types: ["version-update:semver-major"]
- dependency-name: "typescript-eslint"
update-types: ["version-update:semver-major"]
- dependency-name: "plotly.js-dist"
update-types: ["version-update:semver-major"]
- dependency-name: "zone.js"
update-types: ["version-update:semver-minor"]
- package-ecosystem: npm
directory: /
target-branch: v21
Expand All @@ -72,3 +78,5 @@ updates:
update-types: ["version-update:semver-major"]
- dependency-name: "typescript-eslint"
update-types: ["version-update:semver-major"]
- dependency-name: "plotly.js-dist"
update-types: ["version-update:semver-major"]
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: CI

on:
workflow_dispatch:
pull_request:
branches: [main, v20, v21, "v*"]
branches: [master, v20, v21, "v*"]
push:
branches: [main, v20, v21, "v*"]
branches: [master, v20, v21, "v*"]

permissions:
contents: read
Expand All @@ -18,8 +19,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24.15.0
cache: npm
Expand All @@ -30,7 +31,7 @@ jobs:
- run: npm audit --omit=dev --audit-level=high
- run: npm run verify:package
- run: npm run verify:consumer
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: angular-plotly-package-${{ github.sha }}
path: dist/plotly
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [21.0.1] - 2026-08-20
### Fixed
- Added `[innerStyle]` as the preferred plot container styling input while
retaining `[style]` as a deprecated compatibility alias.


## [21.0.0] - 2026-08-20
### Changed
- Added Angular 21 support using the official Angular 20→21 migrations.
Expand Down
6 changes: 3 additions & 3 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Maintenance and release policy

The package major identifies its supported Angular major. `main` tracks the
The package major identifies its supported Angular major. `master` tracks the
latest Angular major; older supported majors use `vN` maintenance branches.

| Package line | Angular | Branch | npm tag | Status |
| --- | --- | --- | --- | --- |
| 20.x | 20.x | `v20` | `angular20` | LTS through 2026-11-28 |
| 21.x | 21.x | `v21` | `angular21` | LTS |
| 22.x | 22.x | `main` | `angular22`, `latest` | Active |
| 22.x | 22.x | `master` | `angular22`, `latest` | Active |

## Changes and forward ports

Expand All @@ -16,7 +16,7 @@ commit in ascending major order with `git cherry-pick -x`, one linked pull
request per branch. Do not forward-port Angular migrations, dependency-major
changes, package versions, or release metadata.

`main` has no duplicate current-major branch. Before upgrading `main` to a new
`master` has no duplicate current-major branch. Before upgrading `master` to a new
Angular major, create `vN` from its final commit and protect that branch.

## Releases
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
> A [plotly.js](https://github.com/plotly/plotly.js) Angular component from
> [Plotly](https://plot.ly/).

[![CircleCI](https://circleci.com/gh/plotly/angular-plotly.js.svg?style=svg)](https://circleci.com/gh/plotly/angular-plotly.js)
[![Coverage Status](https://coveralls.io/repos/github/plotly/angular-plotly.js/badge.svg?branch=master&i=1)](https://coveralls.io/github/plotly/angular-plotly.js?branch=master&i=1)
[![CI](https://github.com/plotly/angular-plotly.js/actions/workflows/ci.yml/badge.svg)](https://github.com/plotly/angular-plotly.js/actions/workflows/ci.yml)

<div align="center">
<a href="https://dash.plotly.com/project-maintenance">
Expand All @@ -22,7 +21,7 @@ major. Install the matching package line:

| angular-plotly.js | Angular | Branch | Support |
| --- | --- | --- | --- |
| 22.x | 22.x | `main` | Active |
| 22.x | 22.x | `master` | Active |
| 21.x | 21.x | `v21` | LTS |
| 20.x | 20.x | `v20` | LTS through 2026-11-28 |

Expand Down Expand Up @@ -123,18 +122,19 @@ 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 |
| `[style]` | `Object` | `undefined` | deprecated compatibility alias for `[innerStyle]` |
| `[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 |

**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/
**Note**: To make a plot responsive, i.e. to fill its containing element and resize when the window is resized, use `innerStyle` 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/

```typescript
@Component({
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
Loading
Loading