D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
jishnudantu
Full window
Github gist
Gb_confusion_matrix
Built with
blockbuilder.org
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Correlation Matrix</title> <link rel="stylesheet" type="text/css" href="style.css"/> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script> </head> <body> <div style="display:inline-block;" id="legend"></div> <div style="display:inline-block; float:left" id="container"></div> <script src="main.js"></script> <script> var correlationMatrix = [ [1837, 0, 12, 1, 1, 119], [ 0, 1060, 274, 0, 0, 10], [ 5, 37, 2947, 7, 67, 79], [ 5, 4, 3, 74, 0, 150], [ 1, 0, 280, 0, 978, 79], [ 11, 1, 89, 4, 43, 5821] ]; var labels = ['Jogging', 'LyingDown', 'Sitting', 'Stairs', 'Standing', 'Walking']; Matrix({ container : '#container', data : correlationMatrix, labels : labels, start_color : '#ffffff', end_color : '#3498db' }); </script> </body>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js