Skip to content

Commit

Permalink
refactor(examples): update svg text arg order (hiccup-svg update)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 14, 2018
1 parent f45f4ff commit a00761b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/crypto-chart/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ const chart = sync({
theme.chart.gridMinor,
"stroke-dasharray": 2
}),
text(price.toFixed(4), [MARGIN_X - 15, y + 4], { stroke: "none" })
text([MARGIN_X - 15, y + 4], price.toFixed(4), { stroke: "none" })
];
},
range(Math.ceil(data.min / tickY) * tickY, data.max, tickY)
Expand All @@ -297,7 +297,7 @@ const chart = sync({
return [
line([x, by], [x, by + 10]),
line([x, MARGIN_Y], [x, by], { stroke: theme.chart.gridMinor, "stroke-dasharray": 2 }),
text(fmtTime(t), [x, by + 20], { stroke: "none", "text-anchor": "middle" })
text([x, by + 20], fmtTime(t), { stroke: "none", "text-anchor": "middle" })
];
},
range(Math.ceil(data.tbounds[0] / tickX) * tickX, data.tbounds[1], tickX)
Expand Down Expand Up @@ -334,7 +334,7 @@ const chart = sync({
[[closeX, closeY], [closeX + 10, closeY - 8], [width, closeY - 8], [width, closeY + 8], [closeX + 10, closeY + 8]],
{ fill: theme.chart.price }
),
text(lastPrice.toFixed(4), [closeX + 12, closeY + 4], { fill: theme.chart.pricelabel }),
text([closeX + 12, closeY + 4], lastPrice.toFixed(4), { fill: theme.chart.pricelabel }),
)
})
});
Expand Down

0 comments on commit a00761b

Please sign in to comment.