Skip to content

Commit 5dfea19

Browse files
committed
Updated README
1 parent b829fe2 commit 5dfea19

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

Diff for: README.md

+30-7
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,23 @@ Dygraphs-GWT is a wrapper for the [dygraphs][0] chart library.
55
The wrapper makes it easy to use dygraphs in any GWT application by providing a
66
type-safe abstraction of the dygraphs API.
77

8+
89
## How do I use it?
910

10-
TODO
11+
Following steps are required:
1112

13+
```JAVA
14+
GeneViewer geneviewer = new GeneViewer();
15+
geneviewer.load(new Runnable() {
16+
@Override
17+
public void run() {
18+
GWT.log("GeneViewer loaded");
19+
// Interact with sketch
20+
JsArrayMixed data = getData();
21+
geneviewer.setGeneData(data);
22+
}
23+
});
24+
```
1225

1326

1427
## How do I install it?
@@ -24,7 +37,16 @@ section:
2437
</dependency>
2538
```
2639

27-
You can also download the [jar][1] directly or check out the source using git
40+
GeneViewer uses [GWT 2.8's][1] new [JSInterop feature][2] and thus it has to be enabled in the GWT compiler args.
41+
For maven:
42+
```xml
43+
<compilerArgs>
44+
<compilerArg>-generateJsInteropExports</compilerArg>
45+
</compilerArgs>
46+
```
47+
or passing it to the compiler via `-generateJsInteropExports`
48+
49+
You can also download the [jar][3] directly or check out the source using git
2850
from <https://github.com/timeu/dygraphs-gwt.git> and build it yourself. Once
2951
you've installed Dygraphs-GWT, be sure to inherit the module in your .gwt.xml
3052
file like this:
@@ -35,10 +57,11 @@ file like this:
3557

3658
## Where can I learn more?
3759

38-
* For more details on the Dygraphs-GWT API, consult the [Javadoc][2].
39-
* Check out the [sample app][3] for a full example of using Dygraphs-GWT.
60+
* Check out the [sample app][4] ([Source Code][5]) for a full example of using GeneViewer.
4061

4162
[0]: https://http://dygraphs.com/
42-
[1]: http://search.maven.org/remotecontent?filepath=com/github/timeu/dygraphs-gwt/dygraphs-gwt/1.0.0/dygraphs-gwt-1.0.0.jar
43-
[2]: http://timeu.github.io/dygraphs-gwt/javadoc/
44-
[3]: https://github.com/timeu/dygraphs-gwt/tree/master/dygraphs-gwt-sample/src/main/java/sample/client
63+
[1]: http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0_BETA1
64+
[2]: https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit#heading=h.o7amqk9edhb9
65+
[3]: https://github.com/timeu/dygraphs-gwt/releases
66+
[4]: http://timeu.github.io/dygraphs-gwt
67+
[5]: https://github.com/timeu/dygraphs-gwt/tree/master/dygraphs-gwt-sample/src/main/java/sample/client

0 commit comments

Comments
 (0)