gwtd3 / gwt-d3

A GWT wrapper library around the d3.js library
Other
131 stars 53 forks source link

Adding tree layout and collapsible tree demo #65

Closed evshi closed 11 years ago

evshi commented 11 years ago

Transitions should also include a function that takes in a PathDataGenerator as an argument, as seen in M. Bostock demo: http://bl.ocks.org/mbostock/4339083. The function I've written is below, but I had trouble integrating it due to line ending issues.

/**
 * Transitions the attributes with the specified name to the value returned
 * by the {@link PathDataGenerator} for each selected element.
 * <p>
 * This method should always been used with a selection containing a svg
 * &lt;path&gt; element by specifying "d" for the name argument.
 * <p>
 * The specified name may have a namespace prefix, such as xlink:href, to
 * specify an "href" attribute in the XLink namespace. By default, D3
 * supports svg, xhtml, xlink, xml, and xmlns namespaces. Additional
 * namespaces can be registered by adding to d3.ns.prefix.
 * <p>
 * 
 * @param name
 * the name of the attribute
 * @param value
 * the {@link PathDataGenerator} used to compute the new value of the
 * attribute
 * @return the current transition
 */
public native final Transition attr(final String name,/PathDataGenerator value) /*-{
    return this.attr(name, value);
}-*/;
anthonime commented 11 years ago

Good work, Evan, I integrate that ! Thank you for your work.