Code Monkey home page Code Monkey logo

react-composable-charts's Introduction

react-composable-charts

yarn add react-composable-charts react d3

๐Ÿšจ ๐Ÿšง This library is WORK IN PROGRESS and there can be a lot of breaking changes.

Examples

Docs

Components

  • <Chart />: sets the dimensions and position of the chart
  • <Cartesian />: sets the data domain and scales for a XY chart
  • <Grid />: draws the chart grid. Can be composed by <Grid.XAxes />, <Grid.YAxes />,<Grid.XLines />,<Grid.YLines />,<Grid.XLabels />,<Grid.YLabels />
  • <PointData />: draws a point for every value in the dataset
  • <BarData />: draws a bar for every value in the dataset
  • <RectData />: draws a rect for every value in the dataset
  • <LineData />: draws a line passing through every value in the dataset
  • <AreaData />: draws an area bounded by the dataset
  • <LabelsData />: draws a text for every value in the dataset
  • <LineFunction />: draws a line defined by the given function
  • <AreaFunction />: draws an area bounded by the lines defined by the given functions
  • <ClipRect />: clips children in the given dimensions
  • <ClipChart />: clips children in the chart dimensions
  • <Style />: sets svg attributes to every children. Styles can be nested
  • <Animation />: sets animation properties to every children. Styles can be nested
  • <element. ... />: draws a svg element. The drawn element inherits existing animations and styles

Hooks

  • useChartContext: returns chart dimensions and position
  • useCartesianContext: returns chart scales
  • useCascadingStyle: returns svg attributes defined by all nested Style components
  • useComputableStyle: returns svg attributes defined by all nested Style components and preserves given getters
  • useCascadingAnimation: returns animation properties defined by all nested Animation components

Utilities

  • Range: exports utility functions to work with ranges (tuples)
  • wideToNarrow: convert dataset from wide to narrow format
  • stackNarrow: stacks a narrow format dataset

TODO

  • Complete documentation
  • <Polar /> component (radar chart)
  • <Treemap /> component
  • Interactivity (hover, click)
  • ... more to come

Contributing

If you want to contrigute with new features or a bug fix, read this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.