[FEATURE] Bar Chart CSV Export Plugin #226
Draft
+328
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-actions
QueryData[]
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-actions
in perses/perses. Dependencies have been updated to reference the snapshot branch.Screenshots
Export Button:

File Name and Information Format:

Checklist
[FEATURE] BarChart CSV Export Plugin
naming conventionUI Changes