SVG已知轴上的折线图 [英] SVG Line chart on known axes
问题描述
我想动态创建线形图(svg格式)。
I want to create dynamically line chart (svg format).
但是svg坐标系统工作反。像这样:
But svg coordinate system works inverse. Like this:
当我有(0,9),(1,3),(2,6)这样的点时,图形将从上到下绘制。
但是svg具有轮换功能。但是当它转向左( - 方向)的最后一个值将是第一个点。
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.
我需要绘制折线图,如同镜像一样。但是有像roate或scale函数的镜像函数:(
I need to draw line chart like mirroring it. But there is mirror function like roate or scale function :(
有任何方法在简单的xy坐标上绘制线图,如:
Is there any way to draw line chart on simple x y coordinates like :
推荐答案
镜像缩放为负值。如果你将y轴缩放-1,你应该得到你想要的。
Mirroring is scaling by a negative amount. If you scale the y-axis by -1 you should get what you want.
这篇关于SVG已知轴上的折线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!