diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-01-23 22:22:02 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-01-23 22:22:02 +0000 |
| commit | 7523fb951aabc24bf290028c348cbe46bd846f86 (patch) | |
| tree | fc28172683d16b59ecfa1070fa7a8188952803a7 /test/g.raphael/examples/linechart/linechart_interactive.html | |
| parent | 9af0f832607e626d22c4205a3ed21ad105fdc042 (diff) | |
graphing with raphael
Diffstat (limited to 'test/g.raphael/examples/linechart/linechart_interactive.html')
| -rw-r--r-- | test/g.raphael/examples/linechart/linechart_interactive.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/g.raphael/examples/linechart/linechart_interactive.html b/test/g.raphael/examples/linechart/linechart_interactive.html new file mode 100644 index 0000000..824d969 --- /dev/null +++ b/test/g.raphael/examples/linechart/linechart_interactive.html @@ -0,0 +1,27 @@ +<html> + <head> + <title>gRaphaël Line Chart - line chart interaction example</title> + <script type="text/javascript" src="../raphael-min.js"></script> + <script type="text/javascript" src="../../g.raphael-min.js"></script> + <script type="text/javascript" src="../../g.line-min.js"></script> + <script type="text/javascript"> + window.onload = function() { + // Creates canvas 320 × 300 at 10, 50 + var r = Raphael('holder'); + + // Creates a simple line chart at 10, 10 + // width 300, height 220 + // x-values: [1,2,3,4,5], y-values: [10,20,15,35,30] + var linec = r.g.linechart(10,10,300,220,[1,2,3,4,5],[10,20,15,35,30], {"colors":["#444"], "symbol":"s", axis:"0 0 1 1"}); + linec.hover(function() { + this.symbol.attr({'fill':'#CCC'}); + }, function() { + this.symbol.attr({'fill':'#444'}); + }); + } + </script> + </head> + <body> + <div id="holder" style="width:320px;height:300px;border:1px dashed #CCC;"> + </body> +</html> |
