|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <meta charset='utf-8'> |
| 5 | + <title>Sheetsee Chart Demo</title> |
| 6 | + <meta name='viewport' content='width=device-width, initial-scale=1.0'/> |
| 7 | + <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js'></script> |
| 8 | + <script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/tabletop.js/1.1.0/tabletop.min.js'></script> |
| 9 | + <script type='text/javascript' src='../js/sheetsee.js'></script> |
| 10 | + <link rel='stylesheet' type='text/css' href='../assets/style.css'> |
| 11 | + </head> |
| 12 | + |
| 13 | + <style> |
| 14 | + p {font-family: Baskerville, Libre Baskerville, Georgia, serif;} |
| 15 | + #pennies.axis {shape-rendering: crispEdges;} |
| 16 | + #pennies.x.axis .minor, #pennies.y.axis .minor {stroke-opacity: .5;} |
| 17 | + #pennies.x.axis {stroke-opacity: 1;} |
| 18 | + #pennies.y.axis line, #pennies.y.axis path, #pennies.x.axis path {fill: none; stroke: #acacac; stroke-width: 1;} |
| 19 | + #pennies .x.axis line {stroke: #acacac; stroke-opacity: .75;} |
| 20 | + .bigg {-webkit-transition: all .2s ease-in-out; -webkit-transform: scale(2);} |
| 21 | + path.chartLine {stroke: #14ECC8; stroke-width: 3; fill: none;} |
| 22 | + #pennies div.tooltip {position: absolute; text-align: left; padding: 4px 8px; width: auto; font-size: 10px; height: auto; background: #fff; border: 0px; pointer-events: none; font-family: Helvetica, Arial, sans-serif;} |
| 23 | + circle {fill: #fff; cursor: pointer;} |
| 24 | + path.domain {fill: #CCF4FF;} |
| 25 | + </style> |
| 26 | + |
| 27 | +<body> |
| 28 | + <div class="container"> |
| 29 | + <h1>Pennies by State</h1> |
| 30 | + <p><em><a href="https://docs.google.com/a/github.com/spreadsheet/ccc?key=0Ao5u1U6KYND7dGN5QngweVJUWE16bTRob0d2a3dCbnc&usp=drive_web#gid=0" target="_blank">spreadsheet</a></em></p> |
| 31 | + <div id="pennies"></div> |
| 32 | + <p><em><a onClick='window.location="view-source:" + window.location.href'>View Source</a> // <a href="../docs/sheetsee-charts.html">View Documentation</a></em></p> |
| 33 | + |
| 34 | + <footer> |
| 35 | + <h4 id="getting-started">Getting Started</h4> |
| 36 | + <ul> |
| 37 | + <li><a href="../docs/about.html">About Sheetsee</a></li> |
| 38 | + <li><a href="../docs/building.html">Building Sheetsee</a></li> |
| 39 | + <li><a href="../docs/basics.html">Basics</a></li> |
| 40 | + </ul> |
| 41 | + <h4 id="ideas">Ideas</h4> |
| 42 | + <ul> |
| 43 | + <li><a href="../docs/fork-n-go.html">Fork-n-Go</a></li> |
| 44 | + <li><a href="../docs/tips.html">Tips!</a></li> |
| 45 | + <li><a href="../docs/custom-charts.html">Custom charts</a></li> |
| 46 | + </ul> |
| 47 | + <h4>Demos</h4> |
| 48 | + <ul> |
| 49 | + <li><a href="/demos/demo-table.html">Table Demo</a></li> |
| 50 | + <li><a href="/demos/demo-map.html">Map Demo</a></li> |
| 51 | + <li><a href="/demos/demo-chart.html">Chart Demo</a></li> |
| 52 | + </ul> |
| 53 | + <h4 id="use">Use</h4> |
| 54 | + <ul> |
| 55 | + <li><a href="../docs/sheetsee-core.html">Sheetsee-core</a></li> |
| 56 | + <li><a href="../docs/sheetsee-tables.html">Sheetsee-tables</a></li> |
| 57 | + <li><a href="../docs/sheetsee-maps.html">Sheetsee-maps</a></li> |
| 58 | + <li><a href="../docs/sheetsee-charts.html">Sheetsee-charts</a></li> |
| 59 | + </ul> |
| 60 | + <h4 id="use">Contact</h4> |
| 61 | + <ul> |
| 62 | + <li><a href="http://www.twitter.com/jllord">@jllord</a></li> |
| 63 | + <li><a href="https://github.com/jlord/sheetsee.js/issues/new">File an issue</a></li> |
| 64 | + </ul> |
| 65 | + <h4 id="home"><a href="/">Home</a></h4> |
| 66 | + </footer> |
| 67 | + </div> |
| 68 | + |
| 69 | + <script type="text/javascript"> |
| 70 | + document.addEventListener('DOMContentLoaded', function() { |
| 71 | + var URL = "0Ao5u1U6KYND7dGN5QngweVJUWE16bTRob0d2a3dCbnc" |
| 72 | + Tabletop.init( { key: URL, callback: showInfo, simpleSheet: true } ) |
| 73 | + }) |
| 74 | + |
| 75 | + function showInfo(data) { |
| 76 | + var cali = Sheetsee.getOccurance(data, "state") |
| 77 | + var colors = ['#ff00ff', '#acacac'] |
| 78 | + var caliData = Sheetsee.makeColorArrayOfObject(cali, colors) |
| 79 | + var lineOptions = { units: "units", |
| 80 | + labels: "undefined", |
| 81 | + m: [80, 100, 120, 100], |
| 82 | + w: 800, h: 400, |
| 83 | + div: "#pennies", |
| 84 | + yaxis: "pennies", |
| 85 | + hiColor: "#E4EB29" |
| 86 | + } |
| 87 | + Sheetsee.d3LineChart(caliData, lineOptions) |
| 88 | + } |
| 89 | + </script> |
| 90 | + |
| 91 | + </body> |
| 92 | +</html> |
0 commit comments