Skip to content

Commit

Permalink
Added new Simple color ramp
Browse files Browse the repository at this point in the history
* fixed ExtendColorRamp
* new color palette in Simple color ramp
  • Loading branch information
allyoucanmap committed Jan 26, 2017
1 parent 4a7c283 commit 51d1801
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
5 changes: 1 addition & 4 deletions web/client/components/style/EqualInterval.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ const {NumberPicker} = require('react-widgets');

const ColorRampItem = require('./EqualIntervalComponents/ColorRampItem');
const colorsSchema = require("./EqualIntervalComponents/ColorRamp");
const colors = require("colorbrewer");
const extendColorBrewer = require("./EqualIntervalComponents/ExtendColorBrewer");
const assign = require('object-assign');
assign(colors, extendColorBrewer);
const colors = require("./EqualIntervalComponents/ExtendColorBrewer");

const Message = require('../I18N/Message');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const React = require('react');
const colors = require("colorbrewer");
const colors = require("./ExtendColorBrewer");

const ColorRampItem = React.createClass({
propTypes: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ const extendColorBrewer = {
12: ["#18c6ca", "#97fe96", "#c5fea5", "#f0feb8", "#fef9bc", "#feee9b", "#f7d580", "#e7cf96", "#d8c9a8", "#c4c1b9", "#e1dfdb", "#ffffff"]
},
Simple: {
3: ["#000000", "#ffd400", "#000000"],
4: ["#000000", "#38ff00", "#e27f1b", "#000000"],
5: ["#000000", "#38ff38", "#ffd400", "#bf7f3f", "#000000"],
6: ["#000000", "#71ff71", "#aaff00", "#ff7f00", "#986532", "#000000"],
7: ["#000000", "#AAFFAA", "#00FF00", "#FFFF00", "#FF7F00", "#BF7F3F", "#000000"]
3: ["#000000", "#7fff00", "#bf7f3f"],
4: ["#000000", "#38ff38", "#ffd400", "#bf7f3f"],
5: ["#000000", "#7fff7f", "#7fff00", "#ff9f00", "#bf7f3f"],
6: ["#000000", "#aaffaa", "#00ff00", "#ffff00", "#ff7f00", "#bf7f3f"],
7: ["#000000", "#8dd48d", "#38ff38", "#7fff00", "#ffd400", "#f47f0a", "#bf7f3f"]
}
};

module.exports = extendColorBrewer;
const assign = require('object-assign');

module.exports = assign({}, require("colorbrewer"), extendColorBrewer);

0 comments on commit 51d1801

Please sign in to comment.