Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

Add color management to Radar chart #67

Merged
merged 1 commit into from
Feb 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ export default class RadarChart extends Component
})
const self = this
const colors = styleSvg({}, self.props.options)
const colorsFill = self.props.options.fill
const curves = chart.curves.map(function (c, i) {
return (<Path key={i} d={c.polygon.path.print()} fill={colors.fill} fillOpacity={0.6} />)
const color = colorsFill instanceof Array ? colorsFill[i] : colorsFill;
return (<Path key={i} d={c.polygon.path.print()} fill={color} fillOpacity={0.6} />)
})

const length = chart.rings.length
Expand Down