Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

composed-chart

v1.6.2arrow_drop_down
v1.6.2
STATUS
Passing
DOWNLOADS
461
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
2 years ago
SIZE
125 KB
Composed chart React component is used to combine multiple chart types like bar and line
1 contributor
Install composed-chart as a package?
Copied
npm i @bit/recharts.recharts.composed-chart
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
chart/ComposedChart.js
23 Lines(19 sloc)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
 * @fileOverview Composed Chart
 */
import generateCategoricalChart from './generateCategoricalChart';
import Area from '../cartesian/Area';
import Bar from '../cartesian/Bar';
import Line from '../cartesian/Line';
import Scatter from '../cartesian/Scatter';
import XAxis from '../cartesian/XAxis';
import YAxis from '../cartesian/YAxis';
import ZAxis from '../cartesian/ZAxis';
import { formatAxisMap } from '../util/CartesianUtils';

export default generateCategoricalChart({
  chartName: 'ComposedChart',
  GraphicalChild: [Line, Area, Bar, Scatter],
  axisComponents: [
    { axisType: 'xAxis', AxisComp: XAxis },
    { axisType: 'yAxis', AxisComp: YAxis },
    { axisType: 'zAxis', AxisComp: ZAxis },
  ],
  formatAxisMap,
});