Skip to content

Commit

Permalink
Fix YAxisLabels formatting example (#271)
Browse files Browse the repository at this point in the history
The current example did not demonstrate label color/weight change, since the final label (`label.text`) never was `20.00`.
  • Loading branch information
mbonaci authored Dec 4, 2020
1 parent 8609370 commit c777d0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/docs/YAxisLabels/examples/YAxisLabels.js.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const YAxisLabelsExample = (props) => {
position="right"
tickCount={5}
labelStyle={(label) => {
const is20 = label.text === "20.00"
const is20 = Math.abs(label.value) === 20;
return {
fill: is20 ? "green" : "black",
fontWeight: is20 ? 900 : 400
Expand Down

0 comments on commit c777d0c

Please sign in to comment.