Skip to content

Instantly share code, notes, and snippets.

@fafnirical
Last active December 27, 2017 18:08
Show Gist options
  • Select an option

  • Save fafnirical/c611314cbde7f6f7479e2604f2c39f4b to your computer and use it in GitHub Desktop.

Select an option

Save fafnirical/c611314cbde7f6f7479e2604f2c39f4b to your computer and use it in GitHub Desktop.

Revisions

  1. fafnirical revised this gist Dec 27, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    width: 375px;
    height: 165px;
    }
    </style>
    <script src="https://d3js.org/d3.v4.min.js"></script>
    <script>
    const width = 375;
  2. fafnirical created this gist Dec 27, 2017.
    26 changes: 26 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    <!DOCTYPE html>
    <meta charset="utf-8">
    <style>
    body {
    width: 375px;
    height: 165px;
    }
    <script src="https://d3js.org/d3.v4.min.js"></script>
    <script>
    const width = 375;
    const height = 165;

    const colors = [
    'red',
    'orange',
    'yellow',
    'green',
    'blue',
    'indigo',
    'violet',
    ];

    const svg = d3.select('body').append('svg')
    .attr('width', width)
    .attr('height', height);
    </script>