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) { function updateGraphTooltip(event, pos, item, previousIndex, tooltip, plot) {
if (item) { if (item) {
if (previousIndex != item.dataIndex) { if (previousIndex != item.dataIndex) {
previousIndex = item.dataIndex; previousIndex = item.dataIndex;
var plot_offset = plot.getPlotOffset(); var plot_offset = plot.getPlotOffset();
var offset = plot.offset(); var offset = plot.offset();
tooltip.find(".x").html(formatValue( tooltip.find(".x").html(item.series.xaxis.tickFormatter(
item.series.xaxis, item.datapoint[0])); item.datapoint[0], item.series.xaxis));
tooltip.find(".y").html(formatValue( tooltip.find(".y").html(item.series.yaxis.options.axisLabel + " : " +
item.series.yaxis, item.datapoint[1])); item.datapoint[1]);
tooltip.css("left", item.pageX - offset.left + plot_offset.left + 5 tooltip.css("left", item.pageX - offset.left + plot_offset.left + 5
+ "px"); + "px");
tooltip.show(); 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