NizamUlMulk
Posts: 4
Joined: Tue Jun 18, 2024 4:17 pm

Replace graphic data table by a DataTable object

I want know if it is possible.
Ex. I creates a DataTable .
Can I replace the default table that shows each graph (when clicking on the chart's context menu "View data table") so that it shows the table built with that other library?
How to do it?
Attachments
tabla1.png
tabla1.png (97.69 KiB) Viewed 124 times
tabla2.png
tabla2.png (22.9 KiB) Viewed 124 times
jakub.s
Site Moderator
Posts: 1378
Joined: Fri Dec 16, 2022 11:45 am

Re: Replace graphic data table by a DataTable object

Hi,

Welcome to our forum & thanks for the question!

I think that this topic should answer your question: viewtopic.php?t=41920

In short:
1. you can use the getRows method to get all the rows which you could pass to your custom library
2. you can use innerHTML to modify the table contents if you'd like

Let me know if one of the approaches works for you.

Best regards!
Jakub
Highcharts Developer
NizamUlMulk
Posts: 4
Joined: Tue Jun 18, 2024 4:17 pm

Re: Replace graphic data table by a DataTable object

jakub.s wrote: Wed Jun 19, 2024 8:21 am Hi,

Welcome to our forum & thanks for the question!

I think that this topic should answer your question: viewtopic.php?t=41920

In short:
1. you can use the getRows method to get all the rows which you could pass to your custom library
2. you can use innerHTML to modify the table contents if you'd like

Let me know if one of the approaches works for you.

Best regards!
Thanks for answer.
In that example builds a table and goes populating rows from series array.
I don't want do it, else assign a datatable builted with DataTable library, and replace the builted in table of highcharts.
No example for using getRows....
Is it posible to change innerHtml from highchart viewdata for innerHtml of DataTable table?. The data source is the same for 2, obviously
jakub.s
Site Moderator
Posts: 1378
Joined: Fri Dec 16, 2022 11:45 am

Re: Replace graphic data table by a DataTable object

Hi,

There's no way of replacing the built-in Highcharts table with a one created by the DataTable library (or any other UI table component).

You would have to follow the approach mentioned above which is getting the rows and populating this table yourself.

Changing the innerHTML may be a potential solution, but integrating it with DataTable is not really something that I could help you with, you would have to experiment with that yourself.

Please do not hesitate to ask in case you have any more questions about this.

Best regards!
Jakub
Highcharts Developer

Return to “Highcharts Usage”