Skip to content

Commit

Permalink
Merge pull request #44 from ngfelixl/fix/layout-requires-all-parameters
Browse files Browse the repository at this point in the history
fix: make layout parameters optional
  • Loading branch information
ngfelixl authored Jan 29, 2021
2 parents 2508e48 + 9c7184b commit 7cd79d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodeplotlib",
"version": "0.7.1",
"version": "0.7.2",
"description": "NodeJS frontend-less plotting lib using plotly.js inspired by matplotlib",
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from 'plotly.js';

export * from './plots-container';
export * from './plot';
export * from 'plotly.js';
export { Layout, Plot, IPlot } from './plot';
5 changes: 3 additions & 2 deletions src/models/plot.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Layout, PlotData } from 'plotly.js';
import { Layout as FullLayout, PlotData } from 'plotly.js';

export type Plot = Partial<PlotData>;
export type Layout = Partial<FullLayout>;

export interface IPlot {
data: Plot[];
layout?: Partial<Layout>;
layout?: Layout;
}

0 comments on commit 7cd79d7

Please sign in to comment.