From 97ef7a5346d29c55d6f332886c150c2d015620c5 Mon Sep 17 00:00:00 2001 From: AlexC <40072887+alexdcrane@users.noreply.github.com> Date: Fri, 12 Nov 2021 12:55:07 -0700 Subject: [PATCH] Update index.php (#6125) --- core/dashboard/index.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/dashboard/index.php b/core/dashboard/index.php index 7a08776885..dfd95cbeef 100644 --- a/core/dashboard/index.php +++ b/core/dashboard/index.php @@ -116,6 +116,19 @@ ctx.save(); } }; + + const chart_counter_2 = { + id: 'chart_counter_2', + beforeDraw(chart, args, options){ + const {ctx, chartArea: {top, right, bottom, left, width, height} } = chart; + ctx.font = (chart_font_size - 7) + 'px ' + chart_font_family; + ctx.textBaseline = 'middle'; + ctx.textAlign = 'center'; + ctx.fillStyle = chart_font_color; + ctx.fillText(options.chart_text + '%', width / 2, top + (height / 2) + 35); + ctx.save(); + } + };