reduce jqplot js