All Projects → airbnb → Visx

airbnb / Visx

Licence: mit
🐯 visx | visualization components

Programming Languages

typescript
32286 projects
CSS
56736 projects

Projects that are alternatives of or similar to Visx

Britecharts
Client-side reusable Charting Library based on D3.js v5 that allows easy and intuitive use of charts and components that can be composed together creating amazing visualizations.
Stars: ✭ 3,688 (-74.64%)
Mutual labels:  svg, data-visualization, chart, d3
C3
📊 A D3-based reusable chart library
Stars: ✭ 9,163 (-37%)
Mutual labels:  svg, data-visualization, chart, d3
Reaviz
📊 Data visualization library for React based on D3
Stars: ✭ 215 (-98.52%)
Mutual labels:  data-visualization, chart, d3
Floweaver
View flow data as Sankey diagrams
Stars: ✭ 266 (-98.17%)
Mutual labels:  svg, data-visualization, d3
Ngx Charts
📊 Declarative Charting Framework for Angular
Stars: ✭ 4,057 (-72.11%)
Mutual labels:  svg, chart, d3
Billboard.js
📊 Re-usable, easy interface JavaScript chart library based on D3.js
Stars: ✭ 5,032 (-65.4%)
Mutual labels:  svg, chart, d3
Rumble Charts
React components for building composable and flexible charts
Stars: ✭ 293 (-97.99%)
Mutual labels:  svg, chart, d3
D3
This is the repository for my course, Learning Data Visualization with D3.js on LinkedIn Learning and Lynda.com.
Stars: ✭ 64 (-99.56%)
Mutual labels:  svg, data-visualization, d3
Amcharts4
The most advanced amCharts charting library for JavaScript and TypeScript apps.
Stars: ✭ 907 (-93.76%)
Mutual labels:  svg, data-visualization, chart
React D3 Tree
🌳 React component to create interactive D3 tree graphs
Stars: ✭ 543 (-96.27%)
Mutual labels:  svg, chart, d3
Ac D3
Javascript Library for building Audiovisual Charts in D3
Stars: ✭ 76 (-99.48%)
Mutual labels:  data-visualization, chart, d3
Just Dashboard
📊 📋 Dashboards using YAML or JSON files
Stars: ✭ 1,511 (-89.61%)
Mutual labels:  data-visualization, chart, d3
Npmcharts.com
Compare npm package downloads over time
Stars: ✭ 129 (-99.11%)
Mutual labels:  data-visualization, chart
Earthjs
D3 Earth JS
Stars: ✭ 128 (-99.12%)
Mutual labels:  svg, d3
Timeline Plus
Timeline - chronological visualization of your data
Stars: ✭ 140 (-99.04%)
Mutual labels:  data-visualization, chart
Pyecharts Snapshot
renders the output of pyecharts as png, jpeg, gif, svg, eps, pdf and raw base64
Stars: ✭ 142 (-99.02%)
Mutual labels:  svg, chart
G2
📊 A highly interactive data-driven visualization grammar for statistical charts.
Stars: ✭ 11,020 (-24.23%)
Mutual labels:  svg, data-visualization
Sunburst Chart
A sunburst interactive chart web component for visualizing hierarchical data
Stars: ✭ 140 (-99.04%)
Mutual labels:  data-visualization, chart
Aachartkit Swift
📈📊📱💻🖥️An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、…
Stars: ✭ 1,962 (-86.51%)
Mutual labels:  data-visualization, chart
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-98.95%)
Mutual labels:  svg, chart

Coverage Status

visx

visx is a collection of reusable low-level visualization components. visx combines the power of d3 to generate your visualization with the benefits of react for updating the DOM.


Docs Gallery Blog Slack #visx Changelog Getting started tutorial

Usage

Remix on Glitch

Let's make a simple bar graph.

First we'll install the relevant packages:

$ npm install --save @visx/mock-data @visx/group @visx/shape @visx/scale

import React from 'react';
import { letterFrequency } from '@visx/mock-data';
import { Group } from '@visx/group';
import { Bar } from '@visx/shape';
import { scaleLinear, scaleBand } from '@visx/scale';

// We'll use some mock data from `@visx/mock-data` for this.
const data = letterFrequency;

// Define the graph dimensions and margins
const width = 500;
const height = 500;
const margin = { top: 20, bottom: 20, left: 20, right: 20 };

// Then we'll create some bounds
const xMax = width - margin.left - margin.right;
const yMax = height - margin.top - margin.bottom;

// We'll make some helpers to get at the data we want
const x = d => d.letter;
const y = d => +d.frequency * 100;

// And then scale the graph by our data
const xScale = scaleBand({
  range: [0, xMax],
  round: true,
  domain: data.map(x),
  padding: 0.4,
});
const yScale = scaleLinear({
  range: [yMax, 0],
  round: true,
  domain: [0, Math.max(...data.map(y))],
});

// Compose together the scale and accessor functions to get point functions
const compose = (scale, accessor) => data => scale(accessor(data));
const xPoint = compose(xScale, x);
const yPoint = compose(yScale, y);

// Finally we'll embed it all in an SVG
function BarGraph(props) {
  return (
    <svg width={width} height={height}>
      {data.map((d, i) => {
        const barHeight = yMax - yPoint(d);
        return (
          <Group key={`bar-${i}`}>
            <Bar
              x={xPoint(d)}
              y={yMax - barHeight}
              height={barHeight}
              width={xScale.bandwidth()}
              fill="#fc2e1c"
            />
          </Group>
        );
      })}
    </svg>
  );
}

// ... somewhere else, render it ...
// <BarGraph />

For more examples using visx, check out the gallery.

Motivation

Goal

The goal is to create a library of components you can use to make both your own reusable chart library or your slick custom one-off chart. visx is largely unopinionated and is meant to be built upon. Keep your bundle sizes down and use only the packages you need.

How?

Under the hood, visx is using d3 for the calculations and math. If you're creating your own awesome chart library on top of visx, it's easy to create a component api that hides d3 entirely. Meaning your team could create charts as easily as using reusable react components.

But why?

Mixing two mental models for updating the DOM is never a good time. Copy and pasting d3 code into componentDidMount() is just that. This collection of components lets you easily build your own reusable visualization charts or library without having to learn d3. No more selections or enter()/exit()/update().

Roadmap

Lots coming soon, check out the roadmap.

In the wild

Have a project that's using visx? Open a pull request and we'll add it to the list.

FAQ

  1. What does visx stand for?

    visx stands for visualization components.

  2. Do you plan on supporting animation/transitions?

    A common criticism of visx is it doesn't have animation baked in, but this was a conscious choice. It's a powerful feature to not bake it in.

    Imagine your app already bundles react-motion, adding a hypothetical @visx/animation is bloat. Since visx is react, it already supports all react animation libs.

    Charting libraries are like style guides. Each org or app will eventually want full control over their own implementation.

    visx makes this easier for everyone. No need to reinvent the wheel each time.

    more info: https://github.com/airbnb/visx/issues/6

    examples:

  3. Do I have to use every package to make a chart?

    nope! pick and choose the packages you need.

  4. Can I use this to create my own library of charts for my team?

    Please do.

  5. Does visx work with preact?

    yup! need to alias react + react-dom and use preact-compat.

  6. I like using d3.

    Me too.

Development

Please see CONTRIBUTING.md

✌️

MIT

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].