Hi guys,

I'd like to know how to translate below piece code into typescript:

this.nodes = svg.selectAll(".node")
                        .data(this.forceLayout.nodes()) //<-- get all nodes 
in data
                        .enter().append("path")
                        .attr("class", "node")
                        .attr("d", function (d) { return d3.svg.symbol()
                                                 .size(d.size); })


I tried this:

.attr("d", (d) => { d3.svg.symbol()

                    .size(d.size)})


it turned out to be below, which doesn't work.
                    .attr("d", function (d) {
                                d3.svg.symbol()
                                    .size(d.size);})


Thanks,
M

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/00621ddb-321b-4464-b2e7-1b5dead24c5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to