GithubHelp home page GithubHelp logo

miukimiu / carbon-addons-data-viz-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carbon-design-system/carbon-addons-data-viz-react

0.0 1.0 0.0 236 KB

Carbon Data Visualization components built in React

JavaScript 97.41% CSS 2.59%

carbon-addons-data-viz-react's Introduction

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';

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

name type example
data array [[[214], 0], [[369], 1]
height number 300
width number 800
id string 'graph'
containerId string 'graph-container'
margin object { top: 30, right: 20, bottom: 70, left: 65 }
labelOffsetX number 65
labelOffsetY number 55
axisOffset number 16
timeFormat string %I:%M:%S
xAxisLabel string X Axis
yAxisLabel string Y Axis
emptyText string There is currently no data available
onHover func () => {}
color array ['#00a68f', '#3b1a40', '#473793', '#3c6df0', '#56D2BB']

Line Graph

name type example
data array [[25, 1507563000000], [100, 1507563900000]
height number 300
width number 800
id string 'graph'
containerId string 'graph-container'
margin object { top: 30, right: 20, bottom: 70, left: 65 }
labelOffsetX number 65
labelOffsetY number 55
axisOffset number 16
timeFormat string %I:%M:%S
xAxisLabel string X Axis
yAxisLabel string Y Axis
emptyText string There is currently no data available
onHover func () => {}
onMouseOut func () => {}
isUTC bool false
color array ['#00a68f', '#3b1a40', '#473793', '#3c6df0', '#56D2BB']
drawLine bool true
animateAxes bool true

Gauge Graph

name type example
radius number 80
padding number 30
amount number 75
total number 100
size string full
gaugePercentages array [{ low: 0, high: 50, color: '#4B8400' },{ low: 50, high: 75, color: '#EFC100' },{ low: 75, high: 100, color: '#FF5050' }]
id string gauge
tooltipId string tooltip-container
tau number 2 * Math.PI
valueText string 75 out of 100GB
labelText string 75%

Pie Chart

name type example
data array [["Gryffindor", 21], ["Slytherin", 37], ["Ravenclaw", 84]]
radius number 96
formatFunction func (value) => value
id string pie-chart
color array ['#00a68f', '#3b1a40', '#473793', '#3c6df0', '#56D2BB']

carbon-addons-data-viz-react's People

Contributors

amortiz avatar andyseymour2904 avatar davidicus avatar dmitriwolf avatar joker23 avatar tay-aitken avatar tw15egan avatar

Watchers

 avatar

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.