From 314307ed2db949536f9a4e2b09cc1042bfca5dee Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Tue, 26 May 2026 14:54:34 +0300 Subject: [PATCH] luci-mod-dsl: correctness fixes Signed-off-by: Paul Donald --- .../luci-static/resources/view/status/dsl/graph.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/luci-mod-dsl/htdocs/luci-static/resources/view/status/dsl/graph.js b/modules/luci-mod-dsl/htdocs/luci-static/resources/view/status/dsl/graph.js index fb87b37de7..7a4b0a41ae 100644 --- a/modules/luci-mod-dsl/htdocs/luci-static/resources/view/status/dsl/graph.js +++ b/modules/luci-mod-dsl/htdocs/luci-static/resources/view/status/dsl/graph.js @@ -113,9 +113,9 @@ let bitsChart = { }, "dataSet" : [ { - "data" :usBitsData.data, - "color":"YellowGreen", - "title": ("Upstream bits allocation") + "data" : usBitsData.data, + "color": "YellowGreen", + "title": _("Upstream bits allocation") }, { "data" : dsBitsData.data, @@ -261,7 +261,7 @@ function drawData(config, dataPoints, color) { let minY = config.minY; let maxY = config.maxY; let startX = (dataPoints[0].x - config.minX) / (config.maxX - config.minX) - let startY = (config.minY - config.minY) / (config.maxY - config.minY) + let startY = (dataPoints[0].y - config.minY) / (config.maxY - config.minY) ctx.fillStyle = color; ctx.beginPath(); @@ -378,9 +378,9 @@ function drawAxisY(config, minValue, maxValue, step, title) { ctx.font = "12px Arial"; ctx.textAlign = "center"; ctx.translate(marginX/3, marginY + graphHeight / 2); - ctx.rotate(-3.14 /2); + ctx.rotate(-Math.PI /2); ctx.fillText(title, 0, 0); - ctx.rotate(3.14 /2) + ctx.rotate(Math.PI /2) ctx.translate(-marginX/3,-(marginY + graphHeight / 2)); }