From 8e43f572c764faa0c19641b3f6ded81efc6ea36f Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Fri, 11 Apr 2025 17:00:57 +1000 Subject: [PATCH] made tooltip smarter for when comparing --- templates/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 01e981d..35141a7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -261,7 +261,13 @@ plotBands: plotBands // Alternating background for years }, yAxis: { title: { text: 'Amount ($)' } }, - tooltip: { pointFormat: '{point.x:%Y-%m-%d}: {point.y:.2f}' }, + tooltip: { + pointFormatter: function () + { + if( this.series.symbol == 'circle' ) { s='\u25CF' } else { s='\u2B25' } + return '' + s + ' ' + this.point.y + ': ' + this.series.name + '
' + }, shared:true + }, annotations: annotations, // Add annotations series: [ { name: "Savings", data: chartData, marker: { radius: 2 } }