Skip to content

Commit

Permalink
The decimalPlaces property was not fixed, rather the hardcoded 2 was …
Browse files Browse the repository at this point in the history
…used for decimalPlaces (#60)
  • Loading branch information
tkayfun authored and Hermanya committed Nov 13, 2018
1 parent 6819266 commit ff79df5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/abstract-chart.js
Expand Up @@ -41,7 +41,7 @@ class AbstractChart extends Component {
y={(height * 3 / 4) - ((height - paddingTop) / count * i) + 12}
fontSize={12}
fill={this.props.chartConfig.color(0.5)}
>{count === 1 ? data[0].toFixed(2) : ((this.calcScaler(data) / (count - 1)) * i + Math.min(...data)).toFixed(2)}
>{count === 1 ? data[0].toFixed(decimalPlaces) : ((this.calcScaler(data) / (count - 1)) * i + Math.min(...data)).toFixed(decimalPlaces)}
</Text>
)
})
Expand Down

0 comments on commit ff79df5

Please sign in to comment.