问题
I want to create dynamically line chart (svg format).
But svg coordinate system works inverse. Like this:
When I have points like (0,9),(1,3),(2,6), graph will be drawing top to bottom. But svg has rotate function. But when it turned to left (- direction) last value will be first point.
I need to draw line chart like mirroring it. But there is mirror function like roate or scale function :(
Is there any way to draw line chart on simple x y coordinates like :
回答1:
Mirroring is scaling by a negative amount. If you scale the y-axis by -1 you should get what you want.
来源:https://stackoverflow.com/questions/4403345/svg-line-chart-on-known-axes