»
EnglishFrenchVietnamese

Print - JavaScript Graphing Utility - JavaScriptBank.com

Full version: jsB@nk » Graphic » JavaScript Graphing Utility
URL: https://www.javascriptbank.com/javascript-graphing-utility-index.html

JavaScript Graphing Utility © JavaScriptBank.comThis is a graphing utility created using JavaScript. Depending upon the range and the increments, it can be slow at times, but it gets the job done. There are places for improvements; feel free to contact me with suggestions.

Full version: jsB@nk » Graphic » JavaScript Graphing Utility
URL: https://www.javascriptbank.com/javascript-graphing-utility-index.html



CSS
<STYLE type=text/css>BODY {FONT: 12px verdana,arial,helvetica,sans-serif; WIDTH: auto; COLOR: #000000; HEIGHT: 100%; BACKGROUND-COLOR: #ffffff}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT src="JavascriptGraph.js" type=text/javascript></SCRIPT><SCRIPT language=javascript type=text/javascript>// author: Lokesh Gyanwali        function GetValue(id, isNumber)        {            var val = document.getElementById(id).value;            return isNumber ? parseFloat(val) : val;        }        function TryGraph()        {            var Gphs = new GraphObj(GetValue("func", false), GetValue("xMin", true), GetValue("xMax", true), GetValue("yMin", true), GetValue("yMax", true), GetValue("scale", true), document.body.clientWidth /2, document.body.clientHeight /2, GetValue("increment", true));            Gphs.Draw();        }        </SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
Funct: <INPUT id=func value=5*Math.cos(x)*Math.sin(x)/x>       xMin: <INPUT id=xMin size=3 value=-10> xMax: <INPUT id=xMax size=3       value=10> yMin: <INPUT id=yMin size=3 value=-1.5> yMax: <INPUT id=yMax       size=3 value=5.5> scale: <INPUT id=scale size=3 value=20> increment:       <INPUT id=increment size=3 value=0.01> <INPUT onclick=TryGraph() type=button value=Draw><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/graphic/JavaScript_Graphing_Utility/JavascriptGraph.js