diff --git a/static/chart.js b/static/chart.js index 4748c2b..cf4f382 100644 --- a/static/chart.js +++ b/static/chart.js @@ -713,11 +713,13 @@ class ConfluenceChart { for (const level of ConfluenceChart.fibPrices(fib)) { const id = `${fib.id}:${level.r}`; wanted.add(id); + const width = Math.max(1, Number(fib.line_width) || 2); + const major = level.r === 0 || level.r === 0.5 || level.r === 0.618 || level.r === 1; const options = { price: level.price, color: fib.color || '#c8992f', - lineWidth: level.r === 0 || level.r === 0.618 || level.r === 1 ? 2 : 1, - lineStyle: level.r === 0.618 ? LightweightCharts.LineStyle.Solid : LightweightCharts.LineStyle.Dashed, + lineWidth: width, + lineStyle: major ? LightweightCharts.LineStyle.Solid : LightweightCharts.LineStyle.Dashed, axisLabelVisible: true, title: `${level.label} ${level.price.toFixed(2)}`, }; @@ -1952,10 +1954,11 @@ class ConfluenceChart { line.setAttribute('x2', width); line.setAttribute('y1', y); line.setAttribute('y2', y); + const major = item.r === 0 || item.r === 0.5 || item.r === 0.618 || item.r === 1; line.setAttribute('stroke', '#c8992f'); - line.setAttribute('stroke-width', item.r === 0 || item.r === 0.618 || item.r === 1 ? 1.5 : 1); - if (item.r !== 0.618) line.setAttribute('stroke-dasharray', '4 4'); - line.setAttribute('opacity', '0.75'); + line.setAttribute('stroke-width', 2); + if (!major) line.setAttribute('stroke-dasharray', '4 4'); + line.setAttribute('opacity', '0.9'); this.fibPreview.appendChild(line); } }