var table; var xaxis = []; var yaxis = [0]; //The bar chart always start with 0 var maxx = 0; var minx = 0; function preload() { //my table is comma separated value "csv“ and has a header specifying the columns labels table = loadTable('billionaires.csv', 'csv','header'); } function setup() { //count the columns var width = 800, height = 800, margin = 20, w = width - 2 * margin, h = height - 2 * margin; var columnforx = 22, columnfory = 20; createCanvas(width, height); sumarray = {}; allxaxis = table.getColumn('age'); allyaxis = table.getColumn('worth in billions'); //Unique x axis values totalcount = allxaxis.length; for (i=0,j=1;iposx && mouseX