A Pen by Captain Anonymous on CodePen.
Created
July 29, 2016 12:39
-
-
Save theWhiteFox/538ebe4d7d620509f9a0b245fc34725e to your computer and use it in GitHub Desktop.
OXprXo
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
| <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.3/nv.d3.min.js"></script> | |
| <script src="https://rawgit.com/enplore/nvd3-charts/master/gauge.js"></script> | |
| <script src="https://rawgit.com/enplore/nvd3-charts/master/gaugeChart.js"></script> | |
| <div id="gauge-chart"> | |
| <svg></svg> | |
| </div> |
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
| nv.addGraph(function() { | |
| var chart = nv.models.gaugeChart() | |
| .title('Gauge') | |
| .min(0) | |
| .max(1); | |
| d3.select('#gauge-chart svg') | |
| .datum([Math.random()]) | |
| .call(chart); | |
| nv.utils.windowResize(chart.update); | |
| return chart; | |
| }); |
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
| html, body { | |
| width: 100%; | |
| height: 100%; | |
| } | |
| #gauge-chart { | |
| width: 100%; | |
| height: 100%; | |
| font-family: "Open Sans", Verdana; | |
| } | |
| #gauge-chart svg { | |
| width: 100%; | |
| height: 100%; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment