X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=docs%2Findex.html;h=c5917cedee136866367fd732a290d21bf8ce71d3;hb=606568fef36a321148399da4c58a05e2753ac2f9;hp=b0a1fc5cfd0cf588a72e110c79ea3b3a276a261b;hpb=116bd1421f6277f40a26cff94bb2ff384b42d8f4;p=dygraphs.git diff --git a/docs/index.html b/docs/index.html index b0a1fc5..c5917ce 100644 --- a/docs/index.html +++ b/docs/index.html @@ -19,25 +19,37 @@
In order to keep this example self-contained, the second parameter is raw CSV data. The dygraphs library parses this data (including column headers), resizes the its container to a reasonable default, calculates appropriate axis ranges and tick marks and draws the graph.
+In order to keep this example self-contained, the second parameter is raw CSV data. The dygraphs library parses this data (including column headers), resizes its container to a reasonable default, calculates appropriate axis ranges and tick marks and draws the graph.
In most applications, it makes more sense to include a CSV file instead. If the second parameter to the constructor doesn't contain a newline, it will be interpreted as the path to a CSV file. The Dygraph will perform an XMLHttpRequest to retrieve this file and display the data when it becomes available. Make sure your CSV file is readable and serving from a place that understands XMLHttpRequest's! In particular, you cannot specify a CSV file using "file:///"
. Here's an example: (data from Weather Underground)
The dygraphs library relies heavily on HTML's <canvas>
tag, which Microsoft Internet Explorer does not support. Fortunately, some clever engineers created the excanvas library, which implements the <canvas>
tag in IE using VML.
The dygraphs library relies heavily on the HTML5 <canvas>
tag, which Microsoft Internet Explorer did not traditionally support. To use Microsoft's native canvas implementation in IE9, you need to set an HTML5 doctype on your page:
+ <!DOCTYPE html> +-
You can add IE support to any page using dygraphs by including the following in your page:
+When IE9 is in HTML5 mode, dygraphs works just like in other modern browsers.
+ +If you want to support previous versions of Internet Explorer (IE6–IE8), you'll need to include the excanvas library, which emulates the <canvas>
tag using VML. You can add excanvas by including this snippet:
<head> @@ -352,7 +374,7 @@ </head>-
This works quite well in practice. Charts are responsive, even under VML emulation.
+While this sounds like it would be slow, it works well in practice for most charts.
One common gotcha to look out for: make sure you don't have any trailing commas in parameter lists, e.g.
@@ -365,7 +387,15 @@ new Dygraph(el, data, {The Google Visualization API provides a standard interface for describing data. Once you've specified your data using this API, you can plug in any GViz-compatible visualization. dygraphs is such a visualization.
+The Google + Visualization API provides a standard interface for describing data. + Once you've specified your data using this API, you can plug in any + GViz-compatible visualization. dygraphs is such a visualization. In + particular, it can be used as a drop-in replacement for the + AnnotatedTimeline visualization used on Google Finance and other sites. To + see how this works, check out the gviz + annotation demo.
For a simple demonstration of how to use dygraphs a GViz visualization, see http://danvk.org/dygraphs/tests/gviz.html. dygraphs can also be used as a GViz gadget. This allows it to be embedded inside of a Google Spreadsheet. For a demonstration of this, see this spreadsheet. The URL for the gadget is http://danvk.org/dygraphs/gadget.xml
.
This chart shows monthly closes of the Dow Jones Industrial Average, both in nominal and real (i.e. adjusted for inflation) dollars. The shaded areas show its monthly high and low. CPI values with a base from 1982-84 are used to adjust for inflation.
+Display: + + + + + + +
+