voyti
Posts: 2
Joined: Thu Sep 23, 2021 11:10 am

Responsive data table

Hey guys, new customer here so I may be missing something major - my apologies if so.

My requirement is that I need to basically have a highcharts "chart" type that's a regular table. This is to maintain as much consistency with the other types we feature as possible in terms of not only technical implementation but also look & feel, including (crucially) exporting and resizing.

I've done some exploration and stumbled across an example that basically hides the chart and shows the data table in its stead. Then allowHTML does the trick for exporting , so now the only remaining nice-to-have would be responsiveness, i.e. that the data table responded to the container size changes dynamically.

I currently assume that resizing the data table. if at all possible, would require some custom styling delivered through Highcharts API, so it's also applied on the exporting stage. If there's any recommendations on how to do that better or how to proceed with my assumed implementation I would appreciate that a lot
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Responsive data table

Hello,

Welcome to our forum and thanks for contacting us with your question!

Here is an official demo showing how to make an exportable table.

Demo:
https://jsfiddle.net/gh/get/library/pur ... table-html

API Reference
https://api.highcharts.com/highcharts/e ... .showTable

You can customize responsiveness using CSS, here is a simple example:
https://jsfiddle.net/BlackLabel/k143ro65/

Let me know if that was what you were looking for!
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
voyti
Posts: 2
Joined: Thu Sep 23, 2021 11:10 am

Re: Responsive data table

Thank you, this answers my question exactly and is super helpful. Have a great day :)
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Responsive data table

You're welcome! Same to you ;)
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Usage”