X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=docs%2Findex.html;h=aba5380acb9d776674f51cd7f39be74fbaa70796;hb=00c281d4b022a47936132bd04784db2e59dbc3fa;hp=77879cef6ac7a67361a503b553e6ae190bff87b6;hpb=85cda1ca16a0e2af35c880e3e40230a8b637c017;p=dygraphs.git diff --git a/docs/index.html b/docs/index.html index 77879ce..aba5380 100644 --- a/docs/index.html +++ b/docs/index.html @@ -19,6 +19,7 @@
These are the options that can be passed in through the optional third parameter of the Dygraph constructor. Under each option is a set of links to tests which demonstrate its use.
+These are the options that can be passed in through the optional third parameter of the Dygraph constructor. Under each option is a set of links to tests which demonstrate its use. While we attempt to keep this list up-to-date, a more complete list can be found in the Dygraph.DEFAULT_ATTRS
map in dygraph.js
and the this.options
map in dygraph-canvas.js
.
boolean |
false |
If the rolling average period text box should be shown. - + | |||
xAxisLabelFormatter | +function(date, granularity) |
+ Dygraph.dateAxisFormatter |
+ Function to call to format values along the x axis.
+ Tests: xAxisLabelFormatter
+ |
+ ||
yAxisLabelFormatter | +function(x) |
+ yValueFormatter |
+
+ Function used to format values along the Y axis. By default it uses the same as the yValueFormatter unless specified.
+ Tests: yAxisLabelFormatter
+ |
+ ||
rightGap | integer |
|
@@ -752,7 +770,7 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high)
function(dygraph, is_initial) |
null |
When set, this callback gets called every time the dygraph is drawn. This includes the initial draw, after zooming and repeatedly while panning. The first parameter is the dygraph being drawn. The second is a boolean value indicating whether this is the initial draw.
- Tests: callback synchronize
+ Tests: callback synchronize
|
red, blue |
rgb(128,128,128) |
The color of the gridlines.
- Tests: grid_dot
+ Tests: grid_dot
|
highlightCallback | function(event, x, points) |
- null |
+ null |
When set, this callback gets called every time a new point is highlighted. The parameters are the JavaScript mousemove event, the x-coordinate of the highlighted points and an array of highlighted points: [ {name: 'series', yval: y-value}, … ]
- Tests: callback crosshair
+
+ |
+ |
unhighlightCallback | +function(event) |
+ null |
+ When set, this callback gets called every time the user stops highlighting any point by mousing out of the graph. The parameter is the mouseout event. + | 0.5, 2.0 |
1.0 |
The width of the lines connecting data points.
- Tests: grid_dot
+ Tests: grid_dot
|
@@ -788,7 +815,7 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high)
integer |
480 |
Width/Height (in pixels) of the chart. If the container div has been explicitly sized, these attributes will be ignored.
- Tests: demo link-interaction no-range
+
|
320 |
|||||
stepPlot | +boolean |
+ false |
+
+ When set, display the graph as a step plot instead of a line plot.
+ Tests: steps
+ |
+ ||
xValueFormatter | +function(x) |
+ + | + Function to provide a custom display format the X value for mouseover. + | +||
yValueFormatter | +function(x) |
+ (Round to 2 decimal places) | +
+ Function to provide a custom display format for the Y value for mouseover.
+ Tests: yAxisLabelFormatter
+ |
+ ||
avoidMinZero | +boolean |
+ false |
+
+ When set, the heuristic that fixes the Y axis at zero for a data set with the minimum Y value of zero is disabled.
+ This is particularly useful for data sets that contain many zero values, especially for step plots which may otherwise have lines not visible running along the bottom axis.
+ Tests: avoidMinZero
+ |
+
There is currently no GWT wrapper around Dygraphs, however there is a class that can be used to easily load Dygraphs into the browser. To use it, include the generated dygraph-gwt.jar file in your classpath and add the following line to your GWT module:
+ ++<inherits name="org.danvk.dygraphs"/> ++ +
Call org.danvk.Dygraphs.install() when your application starts to install the JavaScript code into the browser. You can use JSNI to call Dygraphs from your GWT code, as in the example below. The example uses the Visualization API for GWT and the Dygraphs GViz API.
+ ++ public static native JavaScriptObject drawDygraph(Element element, DataTable dataTable, double minY, double maxY) /*-{ + var chart = new $wnd.Dygraph.GVizChart(element); + chart.draw(dataTable, + { + valueRange: [minY, maxY] + }); + return chart; + }-*/; ++
dygraphs is purely client-side JavaScript. It does not send your data to any servers – the data is processed entirely in the client's browser.