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 @@
  • Baseball chart
  • Stock chart
  • Options Reference
  • +
  • GWT Compatibility
  • Data Policy
  • @@ -57,7 +58,7 @@
  • Negative Numbers
  • Noisy Data
  • Multiple Series
  • -
  • Custom Underlay / background
  • +
  • Custom Underlay / background
  • @@ -474,7 +475,7 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high)

    Other Options

    -

    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.

    @@ -507,7 +508,7 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) @@ -699,6 +700,23 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) + + + + + + + + + + + + @@ -752,7 +770,7 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) @@ -761,16 +779,25 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) - + + + + + + + + @@ -779,7 +806,7 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) @@ -788,7 +815,7 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) @@ -796,6 +823,46 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high) + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    boolean false If the rolling average period text box should be shown. - +
    xAxisLabelFormatterfunction(date, granularity)Dygraph.dateAxisFormatterFunction to call to format values along the x axis. + +
    yAxisLabelFormatterfunction(x)yValueFormatter + Function used to format values along the Y axis. By default it uses the same as the yValueFormatter unless specified. + +
    rightGap integer 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
    +
    red, blue rgb(128,128,128) The color of the gridlines. -
    Tests: grid_dot
    +
    Tests: grid_dot
    highlightCallback function(event, x, points)nullnull 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
    + +
    unhighlightCallbackfunction(event)nullWhen 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
    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
    stepPlotbooleanfalse + When set, display the graph as a step plot instead of a line plot. +
    Tests: steps
    +
    xValueFormatterfunction(x) + Function to provide a custom display format the X value for mouseover. +
    yValueFormatterfunction(x)(Round to 2 decimal places) + Function to provide a custom display format for the Y value for mouseover. + +
    avoidMinZerobooleanfalse + 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. + +
    @@ -812,6 +879,26 @@ perl -ne 'BEGIN{print "Month,Nominal,Real\n"} chomp; ($m,$cpi,$low,$close,$high)
  • Make sure you don't have any trailing commas in your call to the Dygraph constructor or in the options parameter. Firefox, Chrome and Safari ignore these but they can cause a graph to not display in Internet Explorer.
  • +

    GWT Compatibility

    +

    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;
    +  }-*/;
    +
    +

    Data Policy

    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.