Skip to content
Browse files

website update

  • Loading branch information...
1 parent 59ff008 commit e71d89742b0cbd9fa272a1a2a83fff9fa255e6ae @gka gka committed Mar 22, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 showcase/animated-symbols/index.html
View
10 showcase/animated-symbols/index.html
@@ -3,6 +3,8 @@
title: Animated Symbols
---
+<script type="text/javascript" src="/js/chroma.min.js"></script>
+
<script type="text/javascript">
$(function() {
@@ -36,16 +38,14 @@
});
scale = $K.scale.linear(crimeCities, key);
- colscale = new chroma.ColorScale({
- colors: chroma.brewer.PiYG.slice().reverse()
- });
+ colscale = chroma.scale(chroma.brewer.PiYG.slice().reverse());
function symbolAttrs(d) {
return {
r: Math.sqrt(scale(d[key]))*maxRad,
stroke: '#fff',
'stroke-width': scale(d[key])*1,
- fill: colscale.getColor(scale(d[key])),
+ fill: colscale(scale(d[key])),
'fill-opacity': 0.5
};
}
@@ -111,7 +111,7 @@
function symbolAttrs(city) {
return {
r: Math.sqrt(scale(city[key])) * 30, // radius in pixel
- fill: colscale.getColor(scale(city[key])) // color using chroma.js
+ fill: colscale(scale(city[key])) // color using chroma.js
};
}

0 comments on commit e71d897

Please sign in to comment.
Something went wrong with that request. Please try again.