Commit 5e2c3234 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not call axis formatter for ordinate values.

parent fe5d3fbe
function formatValue(axis, value) {
var result = "";
if (axis.options.axisLabel) {
result = axis.options.axisLabel + " : ";
}
return result + axis.tickFormatter(value, axis);
}
function updateGraphTooltip(event, pos, item, previousIndex, tooltip, plot) {
if (item) {
if (previousIndex != item.dataIndex) {
previousIndex = item.dataIndex;
var plot_offset = plot.getPlotOffset();
var offset = plot.offset();
tooltip.find(".x").html(formatValue(
item.series.xaxis, item.datapoint[0]));
tooltip.find(".y").html(formatValue(
item.series.yaxis, item.datapoint[1]));
tooltip.find(".x").html(item.series.xaxis.tickFormatter(
item.datapoint[0], item.series.xaxis));
tooltip.find(".y").html(item.series.yaxis.options.axisLabel + " : " +
item.datapoint[1]);
tooltip.css("left", item.pageX - offset.left + plot_offset.left + 5
+ "px");
tooltip.show();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment