Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
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
Last updated on Jun, 9th 2012
You cannot reply to this thread.