Closed AnSavvides closed 9 years ago
Currently, we do the following in BaseChart:
BaseChart
this.showTooltips = this.props.showTooltips ? true : false; this.transitionDuration = this.props.transitionDuration || 1000;
Let's instead move this information to an object like this:
const customisableProps = { showTooltips: true, transitionDuration: 1000 };
This way we'll have a default value per customisable prop and we can just add to that object when we want to add another prop.
We can then just iterate through each key and make the necessary assignments in the BaseChart constructor.
Currently, we do the following in
BaseChart
:Let's instead move this information to an object like this:
This way we'll have a default value per customisable prop and we can just add to that object when we want to add another prop.
We can then just iterate through each key and make the necessary assignments in the
BaseChart
constructor.