lucified/lucify-bar-chart-range-selector

Name: lucify-bar-chart-range-selector

Owner: Lucify

Description: A selectable stacked bar chart React component

Created: 2016-03-29 10:46:00.0

Updated: 2018-02-06 15:08:57.0

Pushed: 2016-06-09 18:52:59.0

Homepage: null

Size: 362

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

A selectable stacked bar chart React component

A controlled stacked bar chart React component that allows users to select a range of the stacked bars. Built using React and D3.js.

Animated GIF of component

This is a pre-release of a package belonging to the Lucify platform. It has been published to satisfy dependencies of other packages. Any APIs may change without notice.

Installation

Add lucify-bar-chart-range-selector along with its dependencies (React.js and D3.js) to your project's dependencies:

m install react d3 lucify-bar-chart-range-selector --save

Require it in your Javascript:

ES5
LucifyBarChartRangeSelector = require('lucify-bar-chart-range-selector').default;
ES6
rt LucifyBarChartRangeSelector from 'lucify-bar-chart-range-selector';

Now you can use it like any other React component.

Props
CSS classes

TODO

Development

Build the Javascript files into lib/ with:

m run build

Or build the development version and start watching for changes with:

m run dev

To serve the example page on port 3000 and see changes live, start Gulp:

lp

Then point your browser to http://localhost:3000/

Developing as part of a project

To develop this component in tandem with a parent project using npm link, first link this project to the parent project:

 path_to_this_project
m link
 path_to_parent_project
m link lucify-bar-chart-range-selector

Then link the parent project's React folder to this project:

 path_to_parent_project
 node_modules/react
m link
 path_to_this_project
m link react

This is needed in order to prevent React from being loaded twice.

Note that if you do not use Webpack to build your parent project, the development build will likely not work. You can build the production version while watching for changes by running node_modules/.bin/webpack -p --watch.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.