SVG Line chart on known axes

倖福魔咒の 提交于 2019-12-11 02:44:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!