Fix linear yscale
This commit is contained in:
parent
4380210c34
commit
f62816a250
|
@ -164,7 +164,7 @@ class TimeSeries(Widget):
|
|||
/ math.log(max_value / min_value)
|
||||
) * 200
|
||||
elif self.yscale == "linear":
|
||||
return (1 - v/max_value) * 200,
|
||||
return (1 - v/max_value) * 200
|
||||
else:
|
||||
raise ValueError(f"Unknown yscale {self.yscale}")
|
||||
|
||||
|
@ -413,6 +413,7 @@ class TimeSeries(Widget):
|
|||
html += f"<line x1={tm['x']} y1=0 x2={tm['x']} y2=200 stroke='#CCC' />"
|
||||
html += f"<text transform='translate({tm['x']}, 210) rotate(30)' fill='#888'>{tm['t_h']}</text>"
|
||||
for tm in self.y_tickmarks:
|
||||
log.debug("tm = %s", tm)
|
||||
html += f"<line x1=0 y1={tm['y']} x2=1000 y2={tm['y']} stroke='#CCC' />"
|
||||
html += f"<text x=1005 y={tm['y']} fill='#888'>{tm['v_h']}</text>"
|
||||
for v in v_data:
|
||||
|
|
Loading…
Reference in New Issue