Created
April 28, 2011 18:19
-
-
Save jacobian/946927 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| max = Math.max.apply.bind(Math.max, {}); | |
| min = Math.min.apply.bind(Math.min, {}); | |
| // Plot symbols just for the first, last, highest, and lowest values. | |
| // gRaphael wants symbols to be an array of characters to write for | |
| // each point. E.g. ['o', '', '', ..., 'o', ..., '', '', 'o'] | |
| var symbols = data.values.map(function() { return '' }); | |
| symbols[0] = 'o'; | |
| symbols[symbols.length-1] = 'o'; | |
| symbols[symbols.lastIndexOf(max(data.values))] = 'o'; | |
| symbols[symbols.lastIndexOf(min(data.values))] = 'o'; | |
| console.log(symbols); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment