Could you please show me an example how to use the following ToolTipData info to get points[] in shared tooltip?
Available data provided in the given "ToolTipData" object are:
percentage (not shared) or points[i].percentage (shared) : Stacked series and pies only. The point's percentage of the total.
point.name (not shared) or points[i].point.name (shared) : The "name" property of the point object that hte tooltip is hovering over.
series.name (not shared) or points[i].series.name (shared) : The name of the series that the point is a part of.
total (not shared) or points[i].total (shared) : Stacked series only. The total value at this point's x value.
x : The x value. This property is the same regardless of the tooltip being shared or not.
y (not shared) or points[i].y (shared) : The y value.
Thanks,
Zhong
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A wrapper method to retrieve and convert the "points" array that Highcharts provides for shared tool tips is not available in the GWT Highcharts 1.1.2 release (only custom formatters for non-shared tooltips were supported in the 1.1.2 release).
However, the good news is that support for custom formatters for shared tooltips has been added and will be available in the upcoming release (likely 1.1.3), which will allow you to create your tool tip formatter like the following:
final Chart chart = new Chart()
.setToolTip(new ToolTip()
.setShared(true)
.setCrosshairs(true)
.setFormatter(new ToolTipFormatter() {
public String format(ToolTipData toolTipData) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < toolTipData.getPointsLength();i++){sb.append("<b>")
.append(toolTipData.getSeriesName(i))
.append("</b>:")
.append(toolTipData.getXAsString(i))
.append(", ")
.append(toolTipData.getYAsDouble(i))
.append(" degrees<br/>");
}
return sb.toString();
}
})
);
If you don't want to have to wait for the next release, I've attached to this message the updated "ToolTipData" class that you would need to replace in the jar in order to support that functionality (which should be compatible with the 1.1.2 release as well).
Hope that helps, but just let us know if you run into any trouble with that updated class.
Could you please show me an example how to use the following ToolTipData info to get points[] in shared tooltip?
Available data provided in the given "ToolTipData" object are:
Thanks,
Zhong
A wrapper method to retrieve and convert the "points" array that Highcharts provides for shared tool tips is not available in the GWT Highcharts 1.1.2 release (only custom formatters for non-shared tooltips were supported in the 1.1.2 release).
However, the good news is that support for custom formatters for shared tooltips has been added and will be available in the upcoming release (likely 1.1.3), which will allow you to create your tool tip formatter like the following:
If you don't want to have to wait for the next release, I've attached to this message the updated "ToolTipData" class that you would need to replace in the jar in order to support that functionality (which should be compatible with the 1.1.2 release as well).
Hope that helps, but just let us know if you run into any trouble with that updated class.