Skip to content

Commit a9a6805

Browse files
committed
Changed example
1 parent 5dfea19 commit a9a6805

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

Diff for: README.md

+25-11
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,34 @@ type-safe abstraction of the dygraphs API.
88

99
## How do I use it?
1010

11-
Following steps are required:
11+
Following dygraphjs example:
1212

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-
}
13+
```Javascript
14+
new Dygraph(div, "ny-vs-sf.txt", {
15+
legend: 'always',
16+
title: 'NYC vs. SF',
17+
showRoller: true,
18+
rollPeriod: 14,
19+
customBars: true,
20+
ylabel: 'Temperature (F)',
2321
});
2422
```
23+
can be done with the wrapper this way:
24+
25+
```JAVA
26+
27+
DygraphsOptions options = new DygraphsOptions();
28+
options.legend='always'
29+
options.title='NYC vs. SF'
30+
options.showRoller = true;
31+
options.rollPeriod = 14;
32+
options.customBars = true;
33+
options.ylabel = 'Temperature (F)'
34+
35+
Dygraphs dygraphs = new Dygraphs("ny-vs-sf.txt",options);
36+
somePanel.add(dygraphs);
37+
38+
```
2539

2640

2741
## How do I install it?

0 commit comments

Comments
 (0)