Custom Point Label Formatter.

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.8/jquery.jqplot.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.8/plugins/jqplot.barRenderer.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.8/plugins/jqplot.pieRenderer.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.8/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.8/jquery.jqplot.min.css">
<div id="bar-graph"></div>
<div id="pie-graph"></div>

JavaScript

//Using custom jqplot.pointLabels.js as otherwise it was failing in the below place where we added 'if (this._barPoints[i])' inside the 'if (this.barDirection === "vertical")' 

(function($) {

  $.jqplot.PointLabels = function(options) {
    // Group: Properties
    //
    // prop: show
    // show the labels or not.
    this.show = $.jqplot.config.enablePlugins;
    // prop: location
    // compass location where to position the label around the point.
    // 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw'
    this.location = 'n';
    // prop: labelsFromSeries
    // true to use labels within data point arrays.
    this.labelsFromSeries = false;
    // prop: seriesLabelIndex
    // array index for location of labels within data point arrays.
    // if null, will use the last element of the data point array.
    this.seriesLabelIndex = null;
    // prop: labels
    // array of arrays of labels, one array for each series.
    this.labels = [];
    // actual labels that will get displayed.
    // needed to preserve user specified labels in labels array.
    this._labels = [];
    // prop: stackedValue
    // true to display value as stacked in a stacked plot.
    // no effect if labels is specified.
    this.stackedValue = false;
    // prop: ypadding
    // vertical padding in pixels between point and label
    this.ypadding = 6;
    // prop: xpadding
    // horizontal padding in pixels between point and label
    this.xpadding = 6;
    // prop: escapeHTML
    // true to escape html entities in the labels.
    // If you want to include markup in the labels, set to false.
    this.escapeHTML = true;
    // prop: edgeTolerance
    // Number of pixels that the label must be away from an axis
    // boundary in order to be drawn.  Negative values will allow overlap
    // with the grid boundaries.
    this.edgeTolerance = -5;
    // prop: formatter
    // A class of a formatter for the tick text.  sprintf by default.
    this.formatter = $.jqplot.DefaultTickFormatter;
   ...