Skip to content

Commit ca54d88

Browse files
authored
🤖 Merge PR DefinitelyTyped#72148 Update Plotlyjs to support subtitle by @kojo12228
1 parent 1b0f247 commit ca54d88

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

types/plotly.js/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,12 @@ export interface Layout {
421421
xanchor: "auto" | "left" | "center" | "right";
422422
yanchor: "auto" | "top" | "middle" | "bottom";
423423
pad: Partial<Padding>;
424+
subtitle:
425+
| string
426+
| Partial<{
427+
text: string;
428+
font: Partial<Font>;
429+
}>;
424430
}>;
425431
titlefont: Partial<Font>;
426432
autosize: boolean;

types/plotly.js/test/core-tests.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ const trace2 = {
3131
const data = [trace1, trace2];
3232
const tickangle: "auto" = "auto";
3333
const layout = {
34-
title: "Sales Growth",
34+
title: {
35+
text: "Sales Growth",
36+
subtitle: "Annual sales growth between 1999 and 2002",
37+
},
3538
xaxis: {
3639
title: "Year",
3740
showgrid: false,

0 commit comments

Comments
 (0)