Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Created February 9, 2018 21:45
Show Gist options
  • Save ramiroaznar/2524aecbe7404f9b9cef478b737da8cd to your computer and use it in GitHub Desktop.
Save ramiroaznar/2524aecbe7404f9b9cef478b737da8cd to your computer and use it in GitHub Desktop.
Style by value / Torque
Map {
-torque-frame-count: 256;
-torque-animation-duration: 80;
-torque-time-attribute: "date";
-torque-aggregation-function: "avg(avail_ratio*100)";
-torque-resolution: 4;
-torque-data-aggregation: linear;
}
#layer {
marker-width: 7;
marker-fill: #FFB927;
marker-fill-opacity: 0.5;
marker-line-width: 1;
marker-line-color: #FFF;
marker-line-opacity: 0.7;
comp-op: lighter;
}
#layer {
[ value <= 100] {
marker-fill: #B10026;
}
[ value <= 70] {
marker-fill: #E31A1C;
}
[ value <= 60] {
marker-fill: #FC4E2A;
}
[ value <= 40] {
marker-fill: #FD8D3C;
}
[ value <= 30] {
marker-fill: #FEB24C;
}
[ value <= 20] {
marker-fill: #FED976;
}
[ value <= 10] {
marker-fill: #FFFFB2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment