Displaying a table using apache echarts

Really new to Grafana so bear with me. I’ve imported data from Postgre SQL with this query:

let account_name = [],
  latitude = [],
  longitude = [],
  successful_completions = [];

data.series.map((s) => {
  account_name = s.fields.find((f) => f.name === "account_name").values;
  latitude = s.fields.find((f) => f.name === "latitude").values;
  longitude = s.fields.find((f) => f.name === "longitude").values;
  successful_completions = s.fields.find((f) => f.name === "successful_completions").values;
});

I want to now display the result in a table format but I can’t seem to find any examples from apache echarts. Is there any way to do this? Thanks.

1 Like

@zyan It’s not he first time I see this request. Why do you need Apache ECharts to display a table? Why not to use the native Table panel?

1 Like

Heya, my end goal is for people to be able to select values from the table and then the different visualisations in the dashboard filter on that selected value.

@zyan It can be done with a native Table panel using Data Links, which updates dashboard variables.

1 Like

Thanks, I’ll give that a try

1 Like

Hi, here could be a reason to not use the native Table panel, or any native Panel at all:

If it were possible to export the csv using a custom delimiter (i.e. not by adding sep=, at the top of the file but by inserting e.g. semicolons directly), then the workaround I have proposed in this link would not be necessary.

I could simply export using semicolons directly in each row. Then my German clients could just open the file with excel and not have to manually configure anything (since the standard delimiter in Germany is ;)

ECharts could enable such flexibility, and help rid us of workarounds for what seems to have been a bug in Excel since 10 years… Ideally this should be an option directly in the Grafana Export feature though.

@rob.loh Since this post we published Business Table panel, which has download functionality.

We are looking into expanding downloading functionality in future releases and we can look into it: Add download settings · Issue #64 · VolkovLabs/business-table · GitHub

You are welcome to comment on the issue to add your requirements.

1 Like