fix: colorize curve
This commit is contained in:
@@ -29,6 +29,7 @@ def calculate_dxrating(music: dict):
|
|||||||
logger.warning(f"unknown level: {music_id} - {level_id}", file=stderr)
|
logger.warning(f"unknown level: {music_id} - {level_id}", file=stderr)
|
||||||
return music | {"dxRating": 0}
|
return music | {"dxRating": 0}
|
||||||
|
|
||||||
|
|
||||||
data = json.loads(stdin.buffer.read())
|
data = json.loads(stdin.buffer.read())
|
||||||
user_id = data["userId"]
|
user_id = data["userId"]
|
||||||
music_list: list[dict[str, dict]] = data["userMusicList"]
|
music_list: list[dict[str, dict]] = data["userMusicList"]
|
||||||
@@ -75,7 +76,7 @@ def init_chart(
|
|||||||
max_=330,
|
max_=330,
|
||||||
),
|
),
|
||||||
tooltip_opts=opts.TooltipOpts(is_show=False),
|
tooltip_opts=opts.TooltipOpts(is_show=False),
|
||||||
visualmap_opts=opts.VisualMapOpts(max_=16400),
|
visualmap_opts=opts.VisualMapOpts(max_=330),
|
||||||
)
|
)
|
||||||
.add_xaxis(xaxis_data=x_data)
|
.add_xaxis(xaxis_data=x_data)
|
||||||
.add_yaxis(
|
.add_yaxis(
|
||||||
@@ -87,6 +88,6 @@ def init_chart(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
x_max = (y_data[-1] // 50 * 50) + 50
|
x_max = (x_data[-1] // 50 * 50) + 50
|
||||||
init_chart("value", 1, x_max).render(f"{user_id}-pc-rating-linear.html")
|
init_chart("value", 1, x_max).render(f"{user_id}-pc-rating-linear.html")
|
||||||
init_chart("log", 1, x_max).render(f"{user_id}-pc-rating-log.html")
|
init_chart("log", 1, x_max).render(f"{user_id}-pc-rating-log.html")
|
||||||
|
|||||||
Reference in New Issue
Block a user