krzysu/flot.tooltip — Issue #3: tooltip shows incorrect y value for stacked bar charts
Author: estollnitz
Created: 2011-11-04 00:47:27+00:00
State: open

I used flot.stack to create a stacked bar chart. It stacks the bars by changing the data points. The flot.tooltip plugin displayed the modified data point's y value (which is the sum of the heights of the stacked bars) when formatting "%y". Instead, it should show the original data point's y value (the height of a single bar within the stack).

Looks like flot.tooltip is getting the x and y values from item.datapoint, which is the modified data point. The original data point is available in item.series.data[item.dataIndex].