2013-06-05 25 views
0

我的節點包含一個屬性「classid」。對於每個classid我都想使用特定的背景圖片。 如何將數據映射到節點屬性,例如通過使用descretemapper(http://cytoscapeweb.cytoscape.org/documentation/mappers#section/DiscreteMapper)可以在cytoscapeweb上執行?如何使用像cytoscapeweb一樣的descreteMapper?

這裏我的代碼從cytoscapeweb:

var iconMapper = { 
     defaultValue: "icons/BMC_BASEELEMENT.png", 
     discreteMapper: { 
      attrName: "classid", 
      entries: [ 
       { attrValue: "BMC_CHASSIS", value: "icons/BMC_CHASSIS.png" }, 
       { attrValue: "BMC_CLUSTER", value: "icons/BMC_CLUSTER.png" }, 
       { attrValue: "BMC_ACTIVITY", value: "icons/BMC_ACTIVITY.png" }, 
       (...) 
       { attrValue: "BMC_COMPUTERSYSTEM", value: "icons/BMC_COMPUTERSYSTEM.png" } 

      ] 
     } 
    }; 

回答

相關問題