code: function (chart, series) {
              var returnXGap = 0;
              if ((series.x.measure === null || series.x.measure === undefined) && series.barGap > 0) {
                  returnXGap = ((chart._widthPixels() / series.x._max) * (series.barGap > 0.99 ? 0.99 : series.barGap)) / 2;
              }
              return returnXGap;
          }
docs: Calculate the x gap for bar type charts