AX

Axis

@visx/axis

visx axis

Charts
visx
react
d3
visualizations
charts
@visx/axis
javascript
npm
frontend
open source
Stars
358
Weekly
1.2M
Open issues
4
Bundle
~25 kB

Installation

npm install @visx/axis

Code example

import { Axis } from "@visx/axis";

const data = [
  { name: "Jan", value: 12 },
  { name: "Feb", value: 18 },
];

export function Example() {
  return (
    <Axis data={data} width={420} height={240}>
      {/* series / axes from Axis */}
    </Axis>
  );
}

Pros & cons

Pros

  • Actively maintained by @hshoff
  • 1.2M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 4 open issues on GitHub

FAQs

Alternatives & similar libraries