I d like to use the discreteMapper of CytoscapeWeb 2.0 (that is, the jQuery-based CytoscapeWeb) but need some example code showing what exactly I have to do.
I already tried with some code taken from the Flash-based CytoscapeWeb and tried
var entityColorMapper = { attrName: "etype", entries: [ { attrValue: "protein", value: "#ff0000" }, { attrValue: "compound", value: "#00ff00" }, { attrValue: "group", value: "#0000ff" } ] };
and then in the "style" structure I have
"node.E": { fillColor: { discreteMapper: entityColorMapper } }
but this does not seem to work.