Invient charts tooltip format

For any of those interested in customizing the a shared tool tip using a NumberXAxis (Note, this is the only one I’ve tried), here’s a snippet that seems to work pretty well:


        InvientChartsConfig chartConfig = new InvientChartsConfig();
        // Tooltip formatter
        chartConfig.getTooltip().setShared(true);
        chartConfig.getTooltip().setCrosshairs(true);
			chartConfig.getTooltip().setFormatterJsFunc(
					"function() {" +
							"                var s = '<b>'+ ( this.x / 1000000 ) +'MHz</b>';" +
							"				 var len = this.points.length; " +
							"                for (var i = 0; i < len; i++) { " +
							"					var point = this.points[ i ]
; " +
							"                    s += '<br/><br/><span style=\"color: ' + point.series.color + '; font-weight:bold;\">' + point.series.name  +':</span> '+" +
							"                        point.y +'dB ';" +
							"                }   " +
							"                return s;" +
							"            }");

Example of similar functionality
here
Modify as you see fit.
HighChart Reference