Commits

Bobby Cahill committed b839372

Fixed bug causing custom pointLabels passed with plot data to be ignored for horizontal bar graphs.

Comments (0)

Files changed (1)

src/plugins/jqplot.pointLabels.js

             labelIdx = p.seriesLabelIndex;
         }
         else if (this.renderer.constructor === $.jqplot.BarRenderer && this.barDirection === 'horizontal') {
-            labelIdx = 0;
+           labelIdx = (this._plotData[0].length < 3) ? 0 : this._plotData[0].length -1;
         }
         else {
             labelIdx = (this._plotData.length === 0) ? 0 : this._plotData[0].length -1;