Datatables and Highcharts Integration
Datatables and Highcharts Integration
Noodles12
Posts: 113Questions: 41Answers: 2
I am working on a page that includes datatables and highcharts. I'm not sure how to add column names (ABCD, EFGH, XXXX, VVVV) as legends to this chart. . Here is a link to my code. I have also included the code snippet. Also the pie sizes are all equal. It should be based upon the data in the table. I tried to follow your example from here -
https://datatables.net/examples/api/highcharts.html. Not sure what I'm missing
Thanks.
Answers
Please use my updated test case -
https://live.datatables.net/hexuwuba/6/edit
The example you linked to counts the number of times each Position is found in the table. You will need to do something different if you want the values within the table. This updated test case uses
rows().every()
to iterate the rows to compile the data:https://live.datatables.net/hexuwuba/6/edit
Take a look at the Highcharts Pie Charts with Legend docs to learn how to add a legend.
Kevin