How to use the @vx/mock-data.genBins function in @vx/mock-data

To help you get started, we’ve selected a few @vx/mock-data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hshoff / vx / packages / vx-demo / components / tiles / heatmap.js View on Github external
import { Group } from '@vx/group';
import { HeatmapCircle, HeatmapRect } from '@vx/heatmap';
import { genBins } from '@vx/mock-data';
import { scaleLinear } from '@vx/scale';
import { max, min } from 'd3-array';
import React from 'react';

const data = genBins(16, 16);

// accessors
const x = d => d.bin;
const y = d => d.bins;
const z = d => d.count;

export default ({
  width,
  height,
  events = false,
  margin = {
    top: 10,
    left: 20,
    right: 20,
    bottom: 110
  },