[Feature] Support exporting chart data to CSV

Open
#21,693 8 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start by reading the existing toolbox.feature API and saveAsImage feature, then trace how ECharts accesses the data represented by a chart. Done means a saveAsCSV option can generate and download that data as CSV using the requested filename.

Written by the indexing model from the issue text.

Description

en new-feature topic: toolbox
What problem does this feature solve?

Many dashboard applications allow users to export the underlying chart data for further analysis, reporting, or sharing. While ECharts currently supports exporting a chart as an image, there is no built-in way to export the displayed data as a CSV file.

Today, developers need to implement their own CSV export logic for every chart, even though ECharts already has access to the data being visualized. This results in duplicated effort across projects and inconsistent implementations.

A built-in CSV export would provide a consistent, reusable solution for a common requirement in analytics and business applications.

If this feature were available natively in ECharts, it would reduce implementation effort for many developers and provide a more complete end-user experience.

Note: I hope you’ll consider adding this feature. If it’s accepted but not something the team plans to implement in the near term, I’d be happy to contribute a PR :)

What does the proposed API look like?

One possible approach would be to extend the existing toolbox.feature API with a built-in CSV export option.

option = {
  toolbox: {
    feature: {
      saveAsImage: {},
      saveAsCSV: {
        show: true,
        filename: 'chart-data'
      }
    }
  }
};

When the user clicks Export CSV, ECharts would generate and download a CSV containing the data currently represented by the chart.

Dominant language
TypeScript
Stars
67.7k
Forks
19.9k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/echarts

All issues in apache/echarts

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.