Simple Graphics Calculator Using the Visualization API and the Scatterchart
September 25th, 2008 | Published in Google Code
We recently came across a great use of the Visualization Platform. In fact, this is something that we never thought the platform would be used for.
Steve Aitken, a developer contributing to the Visualization Developer Group, created a simple graphics calculator for Javascript-supported math functions that plots functions using the Google Visualization Scatter Chart. Here is a screenshot of a simple calculation of -sin(2x):
Steve has been kind enough to share the code with us (even though it was originally written for his girlfriend). A slightly modified version is pasted below:
equation:
minimum value(x):
maximum value(x):
Precision (number of points):
Point size:
onclick="javascript:drawChart(
document.getElementById('txteq').value,
parseFloat(document.getElementById('txtmin').value, 10),
parseFloat(document.getElementById('txtmax').value, 10),
parseInt(document.getElementById('precision').value, 10),
parseInt(document.getElementById('pointSize').value, 10))" />
We thank Steve for the inspiration and would love to see more creative uses of the platform from you.
The Visualization Team