Has anyone successfully used JsniBundle to include d3.js?
public interface D3Bundle extends JsniBundle {
@LibrarySource("d3.js")
public void initD3();
}
I get the following exception:
15:23:06.029 [ERROR] [showcase] Line 1199: illegal character
> var π = Math.PI, τ = 2 * π, halfπ = π / 2, ε = 1e-6, ε2 = ε * ε, d3_radians = π / 180, d3_degrees = 180 / π;
Which is due to an encoding issue. But I'm not sure how to resolve it.
The JsniBundle looks like a great tool, wish there was a little more documentation around it. I'm not completely sure how to call methods on the D3 library once I get it loaded - is the only way to use JsUtils.runJavascriptFunction ?.