1.26.0 • Published 2 years ago

carbon-addons-data-viz-react v1.26.0

Weekly downloads
418
License
Apache-2.0
Repository
github
Last release
2 years ago

carbon-addons-data-viz-react

The React version of carbon-addons-data-viz (currently the only version).

Getting Started

Install:

npm install -S carbon-addons-data-viz-react

Import the graph:

import { LineGraph } from 'carbon-addons-data-viz-react';

Import the styles:

@import 'carbon-addons-data-viz-react/sass/index.scss';

Here is a link to a Code Sandbox example in which you can play around: https://codesandbox.io/s/ov4169pq36

Current Components

Bar Graph

Bar Graph

Bar Graph

Grouped Bar Graph

Grouped Bar Graph

Line graph

Line graphs connect individual data values together to show the continuity from one value to the next, making it a great way to display the shape of values as they change over time.

Line Graph

Gauge graph

Gauge graphs show the part-to-whole relationship of one value compared to its total.

Gauge Graph

Half-gauge graph

Like theGauge graph, half-gauge graphs show the part-to-whole relationship of one value compared to its total.

Half-gauge graph

Pie Chart

Pie charts show individual values that make up a whole data set so users can compare the values to each other and see how each value compares to the whole.

pie-chart

Graph Props

Bar Graph

nametypeexample
dataarray[[214, 0], [369, 1]
heightnumber300
widthnumber800
idstring'graph'
containerIdstring'graph-container'
marginobject{ top: 30, right: 20, bottom: 70, left: 65 }
labelOffsetXnumber65
labelOffsetYnumber55
axisOffsetnumber16
timeFormatstring%I:%M:%S
xAxisLabelstringX Axis
yAxisLabelstringY Axis
emptyTextstringThere is currently no data available
onHoverfunc() => {}
colorarray'#00a68f', '#3b1a40', '#473793', '#3c6df0', '#56D2BB'
maxValueYnumber1500

Line Graph

nametypeexample
dataarray[25, 1507563000000, 100, 1507563900000
heightnumber300
widthnumber800
idstring'graph'
containerIdstring'graph-container'
marginobject{ top: 30, right: 20, bottom: 70, left: 65 }
labelOffsetXnumber65
labelOffsetYnumber55
axisOffsetnumber16
timeFormatstring%I:%M:%S
xAxisLabelstringX Axis
yAxisLabelstringY Axis
emptyTextstringThere is currently no data available
onHoverfunc() => {}
onMouseOutfunc() => {}
isUTCboolfalse
colorarray'#00a68f', '#3b1a40', '#473793', '#3c6df0', '#56D2BB'
drawLinebooltrue
animateAxesbooltrue

Gauge Graph

nametypeexample
radiusnumber80
paddingnumber30
amountnumber75
totalnumber100
sizestringfull
gaugePercentagesarray{ low: 0, high: 50, color: '#4B8400' },{ low: 50, high: 75, color: '#EFC100' },{ low: 75, high: 100, color: '#FF5050' }
idstringgauge
tooltipIdstringtooltip-container
taunumber2 * Math.PI
valueTextstring75 out of 100GB
labelTextstring75%

Pie Chart

nametypeexample
dataarray["Gryffindor", 21, "Slytherin", 37, "Ravenclaw", 84]
radiusnumber96
formatFunctionfunc(value) => value
idstringpie-chart
colorarray'#00a68f', '#3b1a40', '#473793', '#3c6df0', '#56D2BB'
1.25.0

2 years ago

1.26.0

2 years ago

1.24.0

4 years ago

1.23.0

5 years ago

6.11.2

5 years ago

1.22.0

5 years ago

1.2.2

5 years ago

1.21.0

6 years ago

1.20.5

6 years ago

1.20.4

6 years ago

1.20.3

6 years ago

1.20.2

6 years ago

1.20.1

6 years ago

1.20.0

6 years ago

1.19.4

6 years ago

1.19.3

6 years ago

1.19.2

6 years ago

1.19.1

6 years ago

1.19.0

6 years ago

1.18.0

6 years ago

1.17.4

6 years ago

1.17.3

6 years ago

1.17.2

6 years ago

1.17.1

6 years ago

1.17.0

6 years ago

1.16.1

6 years ago

1.16.0

6 years ago

1.15.0

6 years ago

1.14.1

6 years ago

1.14.0

6 years ago

1.13.0

6 years ago

1.12.1

6 years ago

1.12.0

6 years ago

1.11.1

6 years ago

1.11.0

7 years ago

1.10.5

7 years ago

1.10.4

7 years ago

1.10.3

7 years ago

1.10.2

7 years ago

1.10.1

7 years ago

1.10.0

7 years ago

1.9.0

7 years ago

1.8.0

7 years ago

1.7.7

7 years ago

1.7.6

7 years ago

1.7.5

7 years ago

1.7.4

7 years ago

1.7.3

7 years ago

1.7.2

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.6.3

7 years ago

1.6.2

7 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago