fix: синтаксис script.js (строка 213)
This commit is contained in:
parent
68c2f4a156
commit
1abf431ed7
17
script.js
17
script.js
@ -160,6 +160,17 @@ function toneArrow(p) {
|
||||
|
||||
/* ---------- Отрисовка ---------- */
|
||||
|
||||
function tipForMonth(mi, g, f, p) {
|
||||
return {
|
||||
title: MONTHS_FULL[mi] + " 2026",
|
||||
rows: [
|
||||
[g.name, "факт " + fmt(f)],
|
||||
["План", fmt(p) + (g.unit ? " " + g.unit : "")],
|
||||
["Выполнение плана", Math.round((f / p) * 100) + "%"]
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
function tipAttr(item) {
|
||||
var json;
|
||||
try {
|
||||
@ -207,10 +218,14 @@ function renderTrendChart() {
|
||||
for (var fr = 0; fr <= 2; fr++) {
|
||||
grid += '<line x1="' + x0 + '" y1="' + (y0 + hh * fr * 0.5).toFixed(1) + '" x2="' + (x0 + w) + '" y2="' + (y0 + hh * fr * 0.5).toFixed(1) + '" stroke="var(--kt-ai-border)" stroke-width="1" stroke-dasharray="2 3"/>';
|
||||
}
|
||||
function factTip(mi) {
|
||||
var g = activeGroup();
|
||||
return '<circle cx="' + px(mi).toFixed(1) + '" cy="' + py(factVals[mi]).toFixed(1) + '" r="3.4" fill="var(--kt-ai-chart-blue)" tabindex="0" data-kt-tip="' + esc(JSON.stringify(tipForMonth(mi, g, factVals[mi], planVals[mi]))) + '"/>';
|
||||
}
|
||||
var dots = "";
|
||||
for (var i = 0; i < n; i++) {
|
||||
dots += '<circle cx="' + px(i).toFixed(1) + '" cy="' + py(planVals[i]).toFixed(1) + '" r="3" fill="var(--kt-ai-fg-muted)" opacity="0.55"/>';
|
||||
dots += '<circle cx="' + px(i).toFixed(1) + '" cy="' + py(factVals[i]).toFixed(1) + '" r="3.4" fill="var(--kt-ai-chart-blue)" tabindex="0" data-kt-tip="' + esc(JSON.stringify({ title: MONTHS_FULL[ms[i]] + " 2026", rows: [[activeGroup().name, "факт " + fmt(factVals[i])], ["План", fmt(planVals[i]) + (activeGroup().unit ? " " + activeGroup().unit : "")], ["Выполнение плана", Math.round((factVals[i] / planVals[i]) * 100) + "%"] })) + '"/>';
|
||||
dots += factTip(i);
|
||||
}
|
||||
var labels = "";
|
||||
for (var j = 0; j < n; j++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user