Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: plot type should also work implicitly #7

Open
ngfelixl opened this issue Feb 17, 2019 · 0 comments
Open

bug: plot type should also work implicitly #7

ngfelixl opened this issue Feb 17, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request types TypeScript type improvements

Comments

@ngfelixl
Copy link
Owner

When using with typescript and include the type in the plotdata, tslint throws

const trace = {x: [1, 2], y: [1, 2], type: 'bar'};
plot([trace]); // type: string not compatible with type: 'scatter' | 'lines' | ...

Current workaround: Explicitly name the type of the plotdata.

import { plot, Plot } from 'nodeplotlib';
const trace: Plot = {x: [1, 2], y: [1, 2], type: 'bar'};
plot([trace]);
@ngfelixl ngfelixl added the enhancement New feature or request label Dec 16, 2019
@ngfelixl ngfelixl self-assigned this Dec 16, 2019
@ngfelixl ngfelixl added the types TypeScript type improvements label Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request types TypeScript type improvements
Projects
None yet
Development

No branches or pull requests

1 participant