[Chartjs]-How to display chart data as html table chartjs

1👍

You need to identify what in your chart data could be represented as columns and rows in the table. If you named your x-axis, you could represent the chart data like this:

Color | # of Votes | # of Points
Red     12           7
Blue    19           11
... and so on

Also, chart data can be represented as a crosstab which is a more direct representation (since datapoint lies where x and y intersects):

             | Red | Blue | ... and so on
# of Votes     12    19
# of Points    7     11

Here’s the example of how you can convert the chart data to crosstab: https://jsfiddle.net/tara5/cjvuphkL/

Also, I agree with comments (@Alex), that you should provide samples (https://stackoverflow.com/help/how-to-ask), something that you tried to do yourself, but it didn’t work. Therefore, I cannot be sure if I provided the answer that you are looking for.

Leave a comment