diff --git a/src/lib/series/SARSeries.js b/src/lib/series/SARSeries.js index 09c39414c..7f9e10a86 100644 --- a/src/lib/series/SARSeries.js +++ b/src/lib/series/SARSeries.js @@ -49,7 +49,7 @@ class SARSeries extends Component { }); } renderSVG(moreProps) { - const { className, yAccessor } = this.props; + const { className, yAccessor, fill } = this.props; const { xAccessor, plotData, xScale, chartConfig: { yScale } } = moreProps; // console.log(moreProps); @@ -57,8 +57,11 @@ class SARSeries extends Component { {plotData .filter(each => isDefined(yAccessor(each))) .map((each, idx) => { + const color = yAccessor(each) > each.close + ? fill.falling + : fill.rising; return ; + cy={yScale(yAccessor(each))} r={3} fill={color} />; })} ; }