0.0.9 • Published 5 years ago

d3-numerosity v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

d3-numerosity

Installing

If you use NPM, npm install d3-numerosity. Otherwise, download the latest release.

Generate Stimulus

d3-numerosity generate_stimulus supports 3 Shapes

  1. sqaure
  2. circle
  3. diamond

It accepts size and color as well

Example

import d3 from 'd3-numerosity';

    componentDidMount() {

      var result = d3.stimulus.generate_stimulus([
        {
          shape: 'circle',
          size: 10,
          color: 'red'
        },
        {
          shape: 'square',
          size: 20,
          color: '#4286f4'
        }
      ], [10, 10]);
      
      var div = document.getElementById("root");
      div.innerHTML += result;
  }

  render() {
    return <div className="App" />;
  }

Subcondition Generator

d3-numerosity subconditions only supports 4 colors

  1. RED
  2. BLUE
  3. GREEN
  4. YELLOW

Example

import d3 from 'd3-numerosity';

    componentDidMount() {

      var result = d3.subcondition.numerosity('YELLOW');
      
      var div = document.getElementById("root");
      div.innerHTML += result;
  }

  render() {
    return <div className="App" />;
  }

VisualSearch Generator

VisualSearch supports 4 colors

  1. RED
  2. BLUE
  3. GREEN
  4. YELLOW

Example

import d3 from 'd3-numerosity';

    componentDidMount() {

      var result = d3.visualSearch.visualSearch('RED');
      
      var div = document.getElementById("root");
      div.innerHTML += result;
  }

  render() {
    return <div className="App" />;
  }
0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago