       if d.visible
         @addNodeData d
 
-    # Setup color ordinal scale domain
-    @colorQualitativeScale.domain   data.nodes.map( (d) -> d.node_type )
-    @colorQuantitativeScale.domain  data.nodes.map( (d) -> d.node_type )
+    # Setup color scale
+    @setColorScale()
 
     # Setup Relations: change relations source & target N based id to 0 based ids & setup linkedByIndex object
     data.relations.forEach (d) =>

      @COLORS['quantitative-10']
    ]

    # Setup color scale
    @colorQualitativeScale  = d3.scaleOrdinal().range @COLOR_QUALITATIVE
    @colorQuantitativeScale = d3.scaleOrdinal().range @COLOR_QUANTITATIVE

  setup: (_data, _parameters) ->


    return parseInt(@nodes_cont.select('#node-'+d.id).attr('r'))+13

  getNodeColor: (d) =>
    if @parameters.nodesColor == 'qualitative' or @parameters.nodesColor == 'quantitative'
      color = @colorScale d.node_type  
    else
      color = @COLORS[@parameters.nodesColor]
    return color

  getNodeFill: (d) =>
