@vx/mock-data

npm install --save @vx/mock-data

The @vx/mock-data package is here to help you test out your graphs.

Generators

Generators can create simple generic data for you like this:

import Mock from '@vx/mock-data';
const points = Mock.genRandomNormalPoints();

Mock.genRandomNormalPoints()

Returns a series of random normal x,y points.

Mock.getDateValue(n)

Generates n date values an hour apart from each other starting with the current time.

Mocks

Mock are essentially a bunch of data dumps that you can use like this:

import Mock from '@vx/mock-data';
const data = Mock.cityTemperature;

Mock.appleStock

Property
date
close

Mock.browserUsage

Property
date
Google Chrome
Internet Explorer
Firefox
Safari
Microsoft Edge
Opera
Mozilla
Other/Unknown

Mock.cityTemperature

Property
date
New York
San Francisco
Austin

Mock.groupDateValue

Property
date
key
value

Mock.letterFrequency

Property
letter
frequency

Source For Components