Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update: Remove points from wheel
Browse files- lib/wheel.py +1 -13
lib/wheel.py
CHANGED
|
@@ -75,9 +75,6 @@ SVG_BASE = """
|
|
| 75 |
|
| 76 |
<!-- Fläche -->
|
| 77 |
<polyline class="graph" points="{POINTS}" style="fill:rgb(250,208,72); fill-opacity:0.9" />
|
| 78 |
-
|
| 79 |
-
<!-- Punkte -->
|
| 80 |
-
{POINT_CIRCLES}
|
| 81 |
|
| 82 |
</svg>
|
| 83 |
"""
|
|
@@ -112,14 +109,6 @@ def compute_wheel_points(
|
|
| 112 |
|
| 113 |
###################################################################################
|
| 114 |
|
| 115 |
-
def build_point_circles(points: List[Tuple[float, float]]) -> str:
|
| 116 |
-
return "\n ".join(
|
| 117 |
-
f'<circle class="point" style="stroke:rgb(120, 120, 120); fill:rgb(255, 255, 255)" cx="{x:.2f}" cy="{y:.2f}" r="3.5" />'
|
| 118 |
-
for x, y in points
|
| 119 |
-
)
|
| 120 |
-
|
| 121 |
-
###################################################################################
|
| 122 |
-
|
| 123 |
def build_svg_with_values(
|
| 124 |
vals: List[float],
|
| 125 |
segments: int = 8,
|
|
@@ -137,7 +126,6 @@ def build_svg_with_values(
|
|
| 137 |
input_ratio=input_ratio,
|
| 138 |
)
|
| 139 |
points_attr = " ".join(f"{x:.2f},{y:.2f}" for x, y in pts)
|
| 140 |
-
circles = build_point_circles(pts)
|
| 141 |
|
| 142 |
-
return SVG_BASE.format(POINTS=points_attr
|
| 143 |
|
|
|
|
| 75 |
|
| 76 |
<!-- Fläche -->
|
| 77 |
<polyline class="graph" points="{POINTS}" style="fill:rgb(250,208,72); fill-opacity:0.9" />
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
</svg>
|
| 80 |
"""
|
|
|
|
| 109 |
|
| 110 |
###################################################################################
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
def build_svg_with_values(
|
| 113 |
vals: List[float],
|
| 114 |
segments: int = 8,
|
|
|
|
| 126 |
input_ratio=input_ratio,
|
| 127 |
)
|
| 128 |
points_attr = " ".join(f"{x:.2f},{y:.2f}" for x, y in pts)
|
|
|
|
| 129 |
|
| 130 |
+
return SVG_BASE.format(POINTS=points_attr)
|
| 131 |
|