Created
December 17, 2018 03:02
-
-
Save corymaklin/cefa036f5022595dca99b4e435999ebb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as tfvis from '@tensorflow/tfjs-vis'; | |
| const data = [ | |
| { index: 0, value: 50 }, | |
| { index: 1, value: 100 }, | |
| { index: 2, value: 150 }, | |
| ]; | |
| // Get a surface | |
| const surface = tfvis.visor().surface({ name: 'Barchart', tab: 'Charts' }); | |
| // Render a barchart on that surface | |
| tfvis.render.barchart(data, surface, {}); | |
| const div = document.getElementById('container'); | |
| div.appendChild(surface); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment