Added better logic to dc.utils.createLegendable