       @$el.find('.visualization-graph-legend-color').hide()
 
 
+  formatNumber: (number) ->
+    number = parseFloat(number)
+    return if number%1 != 0 then number.toFixed(1) else number
+
   String.prototype.capitalize = () ->
     return this.charAt(0).toUpperCase() + this.slice(1)
 


      # Insert values inside domain for quantitative scales
      if @parameters.nodesColor == 'quantitative'
        items = items.reverse()
        steps = (items[1] - items[0]) / 5
        max = items.pop()
        items.push Math.round(items[0]+steps)
        items.push Math.round(items[1]+steps)
        items.push Math.round(items[2]+steps)
        items.push Math.round(items[3]+steps)
        items.push max

      # loop through all colors
      items.forEach (item, i) =>

      lg_size = scale_size.domain()[1]
      md_size = sm_size + ((lg_size - sm_size)*0.5)
      
      legend_size.find('.visualization-graph-legend-lg .visualization-graph-legend-size-amount').html( @formatNumber(lg_size) )
      legend_size.find('.visualization-graph-legend-md .visualization-graph-legend-size-amount').html( @formatNumber(md_size) )
      legend_size.find('.visualization-graph-legend-sm .visualization-graph-legend-size-amount').html( @formatNumber(sm_size) )
    else
      @$el.find('.visualization-graph-legend-size').hide()

    # Setup color legend
    if ( @parameters.nodesColor == 'qualitative' or @parameters.nodesColor == 'quantitative' ) and scale_color.domain().length > 1

      # Avoid quantitative scales with same values
      if scale_color.domain().length == 2 and scale_color.domain()[0] == scale_color.domain()[1]
