All Projects → shauns → react-d3-axis

shauns / react-d3-axis

Licence: MIT License
React-based Axis component for D3

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-d3-axis

React D3 Components
D3 Components for React
Stars: ✭ 1,599 (+6050%)
Mutual labels:  d3, chart
Reaviz
📊 Data visualization library for React based on D3
Stars: ✭ 215 (+726.92%)
Mutual labels:  d3, chart
Sunburstr
R htmlwidget for interactive sunburst plots
Stars: ✭ 177 (+580.77%)
Mutual labels:  d3, chart
D3.chart.sankey
Reusable D3 Sankey diagram using d3.Chart
Stars: ✭ 103 (+296.15%)
Mutual labels:  d3, chart
datart
Datart is a next generation Data Visualization Open Platform
Stars: ✭ 1,042 (+3907.69%)
Mutual labels:  d3, chart
Just Dashboard
📊 📋 Dashboards using YAML or JSON files
Stars: ✭ 1,511 (+5711.54%)
Mutual labels:  d3, chart
V Chart Plugin
Easily bind a chart to the data stored in your Vue.js components.
Stars: ✭ 188 (+623.08%)
Mutual labels:  d3, chart
Ember C3
📈 Ember addon library for C3, a D3-based reusable chart library.
Stars: ✭ 81 (+211.54%)
Mutual labels:  d3, chart
multi-chart
lit-element building blocks for charts and visualization (based on d3.js v5)
Stars: ✭ 24 (-7.69%)
Mutual labels:  d3, chart
Chart Tool
A responsive charting application
Stars: ✭ 244 (+838.46%)
Mutual labels:  d3, chart
C3
📊 A D3-based reusable chart library
Stars: ✭ 9,163 (+35142.31%)
Mutual labels:  d3, chart
vue-d3-chart
A interactive chart library based on vue and d3
Stars: ✭ 38 (+46.15%)
Mutual labels:  d3, chart
React Charts
⚛️ Simple, immersive & interactive charts for React
Stars: ✭ 1,302 (+4907.69%)
Mutual labels:  d3, chart
Markvis
make visualization in markdown. 📊📈
Stars: ✭ 1,509 (+5703.85%)
Mutual labels:  d3, chart
Diffract
A set of d3 based visualization components built for React
Stars: ✭ 87 (+234.62%)
Mutual labels:  d3, chart
Visx
🐯 visx | visualization components
Stars: ✭ 14,544 (+55838.46%)
Mutual labels:  d3, chart
D3.js Network Topology
网络拓扑图
Stars: ✭ 60 (+130.77%)
Mutual labels:  d3, chart
Ac D3
Javascript Library for building Audiovisual Charts in D3
Stars: ✭ 76 (+192.31%)
Mutual labels:  d3, chart
Visavail
A D3.js Time Data Availability Visualization
Stars: ✭ 245 (+842.31%)
Mutual labels:  d3, chart
Simple-charts
Simple responsive charts
Stars: ✭ 15 (-42.31%)
Mutual labels:  d3, chart

react-d3-axis

Build Status

React-based Axis component for D3

What is this?

D3v4's modular structure means you can pull in things like the scaling or colour logic, and leave out DOM functionality if you're using D3 in an environment that 'owns' the DOM -- such as React.

This is a port of the d3-axis module into a React component and helper functions.

Examples

import {Axis, axisPropsFromTickScale, LEFT} from 'react-d3-axis';
import {scaleLinear} from 'd3-scale';

const scale = scaleLinear().domain([0, 100]).range([0, 500]);
<Axis {...axisPropsFromTickScale(scale, 10)} style={{orient: LEFT}}/>

API

<Axis />

Renders an Axis in SVG (so it expects to be within an svg element).

values: Array<T>

The values corresponding to where the ticks on the axis will be made.

position: (d: T) => number

A function converting a tick value to an offset along the axis.

format: (d: T) => string

A function rendering a tick value to a string, for its label.

range: Array<number>

The numerical range of the rendered axis. So, if an axis runs 1000px wide, this would be [0, 1000].

style: AxisStyle

This is optional -- by default the axis is rendered with 'bottom' alignment (left-to-right, ticks below the line).

axisPropsFromTickScale(scale, tickCount)

Creates props for an <Axis /> component from a tick-based D3 scale, such as scaleLinear.

axisPropsFromBandedScale(scale)

Creates props for an <Axis /> component from a banded D3 scale, such as scaleBand.

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].