diff --git a/packages/react-financial-charts/src/series/SARSeries.tsx b/packages/react-financial-charts/src/series/SARSeries.tsx index 6c40ca27a..abc3fef65 100644 --- a/packages/react-financial-charts/src/series/SARSeries.tsx +++ b/packages/react-financial-charts/src/series/SARSeries.tsx @@ -58,20 +58,25 @@ export class SARSeries extends React.Component { } private readonly renderSVG = (moreProps) => { - const { className, yAccessor } = this.props; + const { className, yAccessor, fill } = this.props; const { xAccessor, plotData, xScale, chartConfig: { yScale } } = moreProps; return {plotData .filter((each) => isDefined(yAccessor(each))) .map((each, idx) => { + + const color = yAccessor(each) > each.close + ? fill.falling + : fill.rising; + return ( + fill={color} /> ); })} ;