-
Notifications
You must be signed in to change notification settings - Fork 122
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
feat: add PNG export #451
feat: add PNG export #451
Conversation
Codecov Report
@@ Coverage Diff @@
## master #451 +/- ##
=========================================
+ Coverage 77.91% 78.1% +0.18%
=========================================
Files 81 91 +10
Lines 4189 4320 +131
Branches 891 908 +17
=========================================
+ Hits 3264 3374 +110
- Misses 913 933 +20
- Partials 12 13 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I've left just few comments
stories/interactions.tsx
Outdated
@@ -635,4 +635,61 @@ storiesOf('Interactions', module) | |||
{ | |||
info: 'Sends an event every time the cursor changes. This is provided to sync cursors between multiple charts.', | |||
}, | |||
); | |||
) | |||
.add('PNG export action', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a description on how to get the snapshot and is a default implementation?
Check storybook API/docs to find a way to add info to the story.
I think we should start add some text on every story we add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call - I've added an info section to the story in fd354c6. I'll open up an issue to track adding a Docs tab such as in https://www.learnstorybook.com/design-systems-for-developers/react/en/document/ where we can configure and clarify each story 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened issue #457
🎉 This PR is included in version 14.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [14.2.0](elastic/elastic-charts@v14.1.0...v14.2.0) (2019-11-25) ### Features * add PNG export ([opensearch-project#451](elastic/elastic-charts#451)) ([53c74c5](elastic/elastic-charts@53c74c5)), closes [opensearch-project#82](elastic/elastic-charts#82)
Summary
Thank you Marco for the help on this! This PR will close #82 and allows PNG export of charts:
A PNG export story was added under the heading
Interactions
.Additionally, in the playground.tsx from this PR the following implements the PNG export functionality:
Next steps:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.src/index.ts
(and stories only import from../src
except for test data & storybook)