diff options
Diffstat (limited to 'test/g.raphael/examples/linechart')
4 files changed, 98 insertions, 0 deletions
diff --git a/test/g.raphael/examples/linechart/linechart_basic.html b/test/g.raphael/examples/linechart/linechart_basic.html new file mode 100644 index 0000000..4527f12 --- /dev/null +++ b/test/g.raphael/examples/linechart/linechart_basic.html @@ -0,0 +1,21 @@ +<html> + <head> + <title>gRaphaël Line Chart - a simple line chart 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 640 × 480 at 10, 50 + var r = Raphael(10, 50, 640, 480); + + // 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] + r.g.linechart(10,10,300,220,[1,2,3,4,5],[10,20,15,35,30]); + } + </script> + </head> + <body> + </body> +</html>
\ No newline at end of file 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> diff --git a/test/g.raphael/examples/linechart/linechart_opts.html b/test/g.raphael/examples/linechart/linechart_opts.html new file mode 100644 index 0000000..ac14e24 --- /dev/null +++ b/test/g.raphael/examples/linechart/linechart_opts.html @@ -0,0 +1,22 @@ +<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] + r.g.linechart(10,10,300,220,[1,2,3,4,5],[10,20,15,35,30], {"colors":["#444"], "symbol":"s", axis:"0 0 0 1", smooth: true, gutter:35}); + } + </script> + </head> + <body> + <div id="holder" style="width:320px;height:300px;border:1px dashed #CCC;"> + </body> +</html> diff --git a/test/g.raphael/examples/linechart/linechart_shading.html b/test/g.raphael/examples/linechart/linechart_shading.html new file mode 100644 index 0000000..c429d8c --- /dev/null +++ b/test/g.raphael/examples/linechart/linechart_shading.html @@ -0,0 +1,28 @@ +<html> + <head> + <title>gRaphaël Line Chart - a line chart with shading 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 640 × 480 at 10, 50 + var r = Raphael(10, 50, 640, 480); + + // 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] + // shade is set to true (fill color opacity will be .3) + r.g.linechart(10,10,300,220,[1,2,3,4,5],[10,20,15,35,30], {shade:true, "colors":["#F44"]}); + + // Creates a simple line chart at 10, 10 + // width 300, height 220 + // x-values: [1,2,3,4,5], y-values: [5,10,5,15,20] + // shade is set to true, nostroke is set to true (fill color opacity will be 1) + r.g.linechart(10,10,300,220,[1,2,3,4,5],[5,10,5,15,20], {shade:true, "colors":["#44F"], nostroke:true}); + } + </script> + </head> + <body> + </body> +</html>
\ No newline at end of file |
