Giter VIP home page Giter VIP logo

d3.autocontrol's Introduction

D3 Autocontrol Playground

Easily generate controls for yourself while you create your D3 visualization/application.

Dependencies

Example Useage:

1 ) Load all libraries/dependencies into HTML (order matters)

<!-- Begin D3 Autocontrol Playground dependencies -->
<script src="/scripts/vendor/d3.js"></script>
<link rel="stylesheet" href="/scripts/vendor/d3.slider.css">
<script src="/scripts/vendor/d3.slider.js"></script>
<script src='/scripts/vendor/jscolor/jscolor.js'></script>
<script src="/scripts/d3.playground.js"></script>
<script src="/scripts/d3.autocontrol.js"></script>
<!-- End D3 Autocontrol Playground dependencies -->

2 ) Use it in your d3 code

d3.select('svg').selectAll('circle')
  .data([1, 2, 3, 4])
    .attr('fill', 'blue',
      'color')
    .attr('cx', 0, 
      'slider', function (value, d, i) { 
        return (i + 1) * value;
      }, 1, 400)
    .attr('cy', function (d, i) { return 20 * (i + 1); })
    .attr('r', function (d, i) { return i + 5; },
      'code', function (d, i) { return d; })

This code will generate a color picker, slider, and code area that all update your code automagically.

Supported Controls:

  • slider
  • code
  • text
  • color

WARNING: d3.autocontrol.js will invisibly modify normal D3 functions. See d3.autocontrol.js for details/controls.

Author(s): Reed Spool

Built by Graphicacy

d3.autocontrol's People

Contributors

reedspool avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.