-
Notifications
You must be signed in to change notification settings - Fork 35
[FEATURE] Bar Chart CSV Export Plugin #226
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
base: main
Are you sure you want to change the base?
Conversation
096d495 to
7909679
Compare
Signed-off-by: Erica Hinkle <ehinkle@redhat.com>
7909679 to
1056350
Compare
| "module": "lib/index.js", | ||
| "types": "lib/index.d.ts", | ||
| "dependencies": { | ||
| "@perses-dev/components": "0.52.0-beta.1", |
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.
why do you need to move out the perses dependencies from the peerDependencies ?
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.
because the current dependencies of the monorepo are still pointing to 0.51.0 so we use this to be able to use a specific version for this plugin. When we upgrade all the plugins to use 0.52.0-beta.1 we can move this back to peerDependencies.
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.
ah yeah ok got it. We will need another release of perses/perses to unlock the upgrade here unfortunately ...
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.
this change is not needed anymore as the PR #236 upgraded the @perses-dev dependencies to the v0.52.0-beta.3 and is resolving the issue raised here
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.
yes exactly, let us know @ericahinkleRH if you have time to work on this feature. If not we can take over.
|
@ericahinkleRH are you still willing to finish this PR ? |
Description
CSV Export Plugin for BarChart
This PR implements the CSV export functionality for the BarChart plugin, working in conjunction with the core changes in perses/perses snapshot branch to enable CSV downloads for bar chart data. File gets downloaded with name "panelName_data.csv".
Overview
Adds an "Export as CSV" action button to BarChart panels that allows users to download their bar chart data in CSV format. The export includes proper column headers and formats data for Excel and Sheets compatibility. The first line of the CSV file has "Label, Value" and then under that it has the data structured in that way with descriptions beside the related values.
Implementation Details
panelName_data.csv)Integration with Core Changes
snapshot/timeseries-panel-actionsQueryData[]from core system and converts to CSV formatFiles Added/Modified
BarChartExportAction.tsx- Export button component and download logicBarChart.tsx- Plugin definition with export actionCSVExportUtils.ts- Shared CSV formatting utilities (if not already present)Testing
Dependencies
This plugin requires the core CSV export functionality from the snapshot branch
snapshot/timeseries-panel-actionsin perses/perses. Dependencies have been updated to reference the snapshot branch.Screenshots
Export Button:

File Name and Information Format:

Checklist
[FEATURE] BarChart CSV Export Pluginnaming conventionUI Changes