Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Allow custom chart types. #12

Merged
merged 1 commit into from
Mar 26, 2015
Merged

Allow custom chart types. #12

merged 1 commit into from
Mar 26, 2015

Conversation

tcard
Copy link
Contributor

@tcard tcard commented Mar 20, 2015

This changeset exposes the createClass method in lib/core, and adds a third argument to it so that you can pass the dataKey value that was previously fixed in the dataKeys variable.

E. g. if you want to use https://github.com/Regaddi/Chart.StackedBar.js, you would do something like var StackedBarChart = require('react-chartjs').createClass('StackedBar', ['getBarsAtEvent'], 'bars'); (provided you previously registered StackedBar with Chart.js, of course).

This changeset exposes the `createClass` method in `lib/core`, and adds a third argument to it so that you can pass the `dataKey` value that was previously fixed in the `dataKeys` variable.

E. g. if you want to use https://github.com/Regaddi/Chart.StackedBar.js, you would do something like `var StackedBarChart = require('react-chartjs').createClass('StackedBar', ['getBarsAtEvent'], 'bars');` (provided you previously registered `StackedBar` with Chart.js, of course).
jhudson8 added a commit that referenced this pull request Mar 26, 2015
Allow custom chart types.
@jhudson8 jhudson8 merged commit afac2df into reactjs:master Mar 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants