Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add color schemes for OKAY, WARNING and CRITICAL #177

Closed
wants to merge 1 commit into from

1 participant

@andreas-marschke

Hi shutterstock,

I thought it'd be a cool addition to the normal color palettes in order to visualize things like the state of a runnin service.

It is similar to the colors used in minitoring systems like Nagios and Icinga to describe the state of certain monitored elements.

Hope you like it.

Thanks!

nagios-color-palettes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 6, 2013
  1. @andreas-marschke
This page is out of date. Refresh to see the latest.
Showing with 34 additions and 3 deletions.
  1. +6 −2 examples/colors.html
  2. +28 −1 src/js/Rickshaw.Fixtures.Color.js
View
8 examples/colors.html
@@ -4,8 +4,9 @@
<script src="../vendor/d3.v2.js"></script>
-<script src="../rickshaw.min.js"></script>
+<script src="../rickshaw.min.js"></script>
+<script src="../src/js/Rickshaw.Fixtures.Color.js"></script>
<style>
section {
width: 300px;
@@ -35,7 +36,10 @@
'cool',
'spectrum2000',
'spectrum2001',
- 'classic9'
+ 'classic9',
+ 'warning',
+ 'okay',
+ 'critical'
];
schemes.forEach( function(name) {
View
29 src/js/Rickshaw.Fixtures.Color.js
@@ -156,4 +156,31 @@ Rickshaw.Fixtures.Color = function() {
'#cc6699',
'#999900'
];
-};
+
+ this.schemes.okay = [
+ '#00AA00',
+ '#00FF00',
+ '#2AFF2A',
+ '#55FF55',
+ '#80FF80',
+ '#AAFFAA'
+ ];
+
+ this.schemes.warning = [
+ '#D4AA00',
+ '#FFCC00',
+ '#FFD42A',
+ '#FFDD55',
+ '#FFE680',
+ '#FFEEAA'
+ ];
+
+ this.schemes.critical = [
+ '#AA0000',
+ '#FF0000',
+ '#FF2A2A',
+ '#FF5555',
+ '#FF8080',
+ '#FFAAAA'
+ ];
+};
Something went wrong with that request. Please try again.