I have a graph with timeseries data that looks something like this.
Now, in our data the y-value of 5 indicates a failure in the system, and as a result I would like the second line of the tooltip on my graph to be replaced by something like System failure on every point equal to 5. I know that the structure will be something like
tooltip : {
formatter: function() {
var tooltip;
if (this.y == 5) {
tooltip = "specification with system failure"
} else {
tooltip = "regular specification"
}
return tooltip;
}
}
and I've battled with the date-formatting enough (using Highcharts' date formatting as in the example here) to get the first line looking reasonable, however I am now struggling to also get the chart color circle and second line looking appropriate, as outlined in this question.
With a bit more work I'm sure I can get something looking okay, but this has begged the question - is there a default formatting specification (or collection of them) for Highcharts which I can reference/modify for things like this and put in a formatter
function?
I'd just resign myself to building my own tooltip which looks a bit different, but there are a collection of graphs together on the same page and I think it is strange if there are any noticeable differences in the tooltips besides this, so then I'd have to change them all to my customized tooltip.