You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/08/14 06:37:21 UTC
[incubator-superset] branch master updated: Add additional heatmap
schemas (#5549)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new a39dfb9 Add additional heatmap schemas (#5549)
a39dfb9 is described below
commit a39dfb9ff918e507f8b9317344a1103063cd7836
Author: Jillian Rowe <ji...@gmail.com>
AuthorDate: Tue Aug 14 02:37:17 2018 -0400
Add additional heatmap schemas (#5549)
* got skeleton started
* added d3-scale-chromatic to package.json
* got hex values instead of calling from a function
* got rid of d3-scale-chromatic - no longer needed
* added schemas to controls
* damn editor broken some line spacing
* commit
* fix style issues
* whyyyyy won't this build
* whyyyyy won't this build
* damn typo
* hahaha got editor to deal with style configs
* no i guess i didn't
* gotta get them all
* again
* trying to get docker build ot work
* updated installation docs with some osx instructions
* restoring yarn.lock not sure why it changed
* trying to fix indent
* trying again
* CODE STYLE CHANGES WORK
* removing some colors that are too close to white
* human readable labels for names
* human readable labels for names
---
docs/installation.rst | 3 +
superset/assets/src/explore/controls.jsx | 33 +++
superset/assets/src/modules/colors.js | 366 ++++++++++++++++++++++++++++++-
3 files changed, 401 insertions(+), 1 deletion(-)
diff --git a/docs/installation.rst b/docs/installation.rst
index ce97dbd..008a264 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -53,6 +53,9 @@ initialize development environment: ::
After several minutes for superset initialization to finish, you can open
a browser and view `http://localhost:8088` to start your journey.
+If you are attempting to build on a Mac and it exits with 137 you need to increase your docker resources.
+OSX instructions: https://docs.docker.com/docker-for-mac/#advanced (Search for memory)
+
Or if you're curious and want to install superset from bottom up, then go
ahead.
diff --git a/superset/assets/src/explore/controls.jsx b/superset/assets/src/explore/controls.jsx
index 50fe3bf..241852a 100644
--- a/superset/assets/src/explore/controls.jsx
+++ b/superset/assets/src/explore/controls.jsx
@@ -325,6 +325,39 @@ export const controls = {
['red_yellow_blue', 'red/yellowish/blue'],
['brown_white_green', 'brown/white/green'],
['purple_white_green', 'purple/white/green'],
+ ['schemeBrBG', 'brown/green'],
+ ['schemePRGn', 'purple/green'],
+ ['schemePiYG', 'pink/green'],
+ ['schemePuOr', 'purple/orange'],
+ ['schemeRdBu', 'red/blue'],
+ ['schemeRdGy', 'red/gray/black'],
+ ['schemeRdYlBu', 'red/yellow/blue'],
+ ['schemeRdYlGn', 'red/yellow/green'],
+ ['schemeSpectral', 'rainbow'],
+ ['schemeBlues', 'd3/blues'],
+ ['schemeGreens', 'd3/greens'],
+ ['schemeGrays', 'd3/grays'],
+ ['schemeOranges', 'd3/oranges'],
+ ['schemePurples', 'd3/purples'],
+ ['schemeReds', 'd3/reds'],
+ ['schemeViridis', 'd3/purple/blue/green/yellow'],
+ ['schemeInferno', 'd3/purple/red/orange/yellow'],
+ ['schemeMagma', 'd3/purple/pink/peach'],
+ ['schemeWarm', 'd3/warm/purple/pink/yellow/green'],
+ ['schemeCool', 'd3/cool/blue/green'],
+ ['schemeCubehelixDefault', 'd3/black/green/brown/pink/blue'],
+ ['schemeBuGn', 'd3/blue/green'],
+ ['schemeBuPu', 'd3/blue/purple'],
+ ['schemeGnBu', 'd3/green/blue'],
+ ['schemeOrRd', 'd3/orange/red'],
+ ['schemePuBuGn', 'd3/purple/blue/green'],
+ ['schemePuBu', 'd3/purple/blue'],
+ ['schemePuRd', 'd3/purple/red'],
+ ['schemeRdPu', 'd3/red/purple'],
+ ['schemeYlGnBu', 'd3/yellow/green/blue'],
+ ['schemeYlGn', 'd3/yellow/green'],
+ ['schemeYlOrBr', 'd3/yellow/brown'],
+ ['schemeYlOrRd', 'd3/yellow/orange/red'],
],
default: 'blue_white_yellow',
clearable: false,
diff --git a/superset/assets/src/modules/colors.js b/superset/assets/src/modules/colors.js
index 8825a7a..0bb3221 100644
--- a/superset/assets/src/modules/colors.js
+++ b/superset/assets/src/modules/colors.js
@@ -159,6 +159,370 @@ export const spectrums = {
'#a6dba0',
'#008837',
],
+ schemeBrBG: [
+ '#543005',
+ '#8c510a',
+ '#bf812d',
+ '#dfc27d',
+ '#f6e8c3',
+ '#c7eae5',
+ '#80cdc1',
+ '#35978f',
+ '#01665e',
+ '#003c30',
+ ],
+ schemePRGn: [
+ '#40004b',
+ '#762a83',
+ '#9970ab',
+ '#c2a5cf',
+ '#e7d4e8',
+ '#d9f0d3',
+ '#a6dba0',
+ '#5aae61',
+ '#1b7837',
+ '#00441b',
+ ],
+ schemePiYG: [
+ '#8e0152',
+ '#c51b7d',
+ '#de77ae',
+ '#f1b6da',
+ '#fde0ef',
+ '#e6f5d0',
+ '#b8e186',
+ '#7fbc41',
+ '#4d9221',
+ '#276419',
+ ],
+ schemePuOr: [
+ '#2d004b',
+ '#542788',
+ '#8073ac',
+ '#b2abd2',
+ '#d8daeb',
+ '#fee0b6',
+ '#fdb863',
+ '#e08214',
+ '#b35806',
+ '#7f3b08',
+ ],
+ schemeRdBu: [
+ '#67001f',
+ '#b2182b',
+ '#d6604d',
+ '#f4a582',
+ '#fddbc7',
+ '#d1e5f0',
+ '#92c5de',
+ '#4393c3',
+ '#2166ac',
+ '#053061',
+ ],
+ schemeRdGy: [
+ '#67001f',
+ '#b2182b',
+ '#d6604d',
+ '#f4a582',
+ '#fddbc7',
+ '#e0e0e0',
+ '#bababa',
+ '#878787',
+ '#4d4d4d',
+ '#1a1a1a',
+ ],
+ schemeRdYlBu: [
+ '#a50026',
+ '#d73027',
+ '#f46d43',
+ '#fdae61',
+ '#fee090',
+ '#e0f3f8',
+ '#abd9e9',
+ '#74add1',
+ '#4575b4',
+ '#313695',
+ ],
+ schemeRdYlGn: [
+ '#a50026',
+ '#d73027',
+ '#f46d43',
+ '#fdae61',
+ '#fee08b',
+ '#d9ef8b',
+ '#a6d96a',
+ '#66bd63',
+ '#1a9850',
+ '#006837',
+ ],
+ schemeSpectral: [
+ '#9e0142',
+ '#d53e4f',
+ '#f46d43',
+ '#fdae61',
+ '#fee08b',
+ '#e6f598',
+ '#abdda4',
+ '#66c2a5',
+ '#3288bd',
+ '#5e4fa2',
+ ],
+ schemeBlues: [
+ '#b5d4e9',
+ '#93c3df',
+ '#6daed5',
+ '#4b97c9',
+ '#2f7ebc',
+ '#1864aa',
+ '#0a4a90',
+ '#08306b',
+ ],
+ schemeGreens: [
+ '#b7e2b1',
+ '#97d494',
+ '#73c378',
+ '#4daf62',
+ '#2f984f',
+ '#157f3b',
+ '#036429',
+ '#00441b',
+ ],
+ schemeGrays: [
+ '#cecece',
+ '#b4b4b4',
+ '#979797',
+ '#7a7a7a',
+ '#5f5f5f',
+ '#404040',
+ '#1e1e1e',
+ '#000000',
+ ],
+ schemeOranges: [
+ '#fdc28c',
+ '#fda762',
+ '#fb8d3d',
+ '#f2701d',
+ '#e25609',
+ '#c44103',
+ '#9f3303',
+ '#7f2704',
+ ],
+ schemePurples: [
+ '#cecee5',
+ '#b6b5d8',
+ '#9e9bc9',
+ '#8782bc',
+ '#7363ac',
+ '#61409b',
+ '#501f8c',
+ '#3f007d',
+ ],
+ schemeReds: [
+ '#fcaa8e',
+ '#fc8a6b',
+ '#f9694c',
+ '#ef4533',
+ '#d92723',
+ '#bb151a',
+ '#970b13',
+ '#67000d',
+ ],
+ schemeViridis: [
+ '#482475',
+ '#414487',
+ '#355f8d',
+ '#2a788e',
+ '#21918c',
+ '#22a884',
+ '#44bf70',
+ '#7ad151',
+ '#bddf26',
+ '#fde725',
+ ],
+ schemeInferno: [
+ '#160b39',
+ '#420a68',
+ '#6a176e',
+ '#932667',
+ '#bc3754',
+ '#dd513a',
+ '#f37819',
+ '#fca50a',
+ '#f6d746',
+ '#fcffa4',
+ ],
+ schemeMagma: [
+ '#140e36',
+ '#3b0f70',
+ '#641a80',
+ '#8c2981',
+ '#b73779',
+ '#de4968',
+ '#f7705c',
+ '#fe9f6d',
+ '#fecf92',
+ '#fcfdbf',
+ ],
+ schemeWarm: [
+ '#963db3',
+ '#bf3caf',
+ '#e4419d',
+ '#fe4b83',
+ '#ff5e63',
+ '#ff7847',
+ '#fb9633',
+ '#e2b72f',
+ '#c6d63c',
+ '#aff05b',
+ ],
+ schemeCool: [
+ '#6054c8',
+ '#4c6edb',
+ '#368ce1',
+ '#23abd8',
+ '#1ac7c2',
+ '#1ddfa3',
+ '#30ef82',
+ '#52f667',
+ '#7ff658',
+ '#aff05b',
+ ],
+ schemeCubehelixDefault: [
+ '#1a1530',
+ '#163d4e',
+ '#1f6642',
+ '#54792f',
+ '#a07949',
+ '#d07e93',
+ '#cf9cda',
+ '#c1caf3',
+ '#d2eeef',
+ '#ffffff',
+ ],
+ schemeBuGn: [
+ '#b7e4da',
+ '#8fd3c1',
+ '#68c2a3',
+ '#49b17f',
+ '#2f9959',
+ '#157f3c',
+ '#036429',
+ '#00441b',
+ ],
+ schemeBuPu: [
+ '#b2cae1',
+ '#9cb3d5',
+ '#8f95c6',
+ '#8c74b5',
+ '#8952a5',
+ '#852d8f',
+ '#730f71',
+ '#4d004b',
+ ],
+ schemeGnBu: [
+ '#bde5bf',
+ '#9ed9bb',
+ '#7bcbc4',
+ '#58b7cd',
+ '#399cc6',
+ '#1d7eb7',
+ '#0b60a1',
+ '#084081',
+ ],
+ schemeOrRd: [
+ '#fdca94',
+ '#fdb07a',
+ '#fa8e5d',
+ '#f16c49',
+ '#e04530',
+ '#c81d13',
+ '#a70403',
+ '#7f0000',
+ ],
+ schemePuBuGn: [
+ '#bec9e2',
+ '#98b9d9',
+ '#69a8cf',
+ '#4096c0',
+ '#19879f',
+ '#037877',
+ '#016353',
+ '#014636',
+ ],
+ schemePuBu: [
+ '#bfc9e2',
+ '#9bb9d9',
+ '#72a8cf',
+ '#4394c3',
+ '#1a7db6',
+ '#0667a1',
+ '#045281',
+ '#023858',
+ ],
+ schemePuRd: [
+ '#d0aad2',
+ '#d08ac2',
+ '#dd63ae',
+ '#e33890',
+ '#d71c6c',
+ '#b70b4f',
+ '#8f023a',
+ '#67001f',
+ ],
+ schemeRdPu: [
+ '#fbb5bc',
+ '#f993b0',
+ '#f369a3',
+ '#e03e98',
+ '#c01788',
+ '#99037c',
+ '#700174',
+ '#49006a',
+ ],
+ schemeYlGnBu: [
+ '#d5eeb3',
+ '#a9ddb7',
+ '#73c9bd',
+ '#45b4c2',
+ '#2897bf',
+ '#2073b2',
+ '#234ea0',
+ '#1c3185',
+ '#081d58',
+ ],
+ schemeYlGn: [
+ '#e4f4ac',
+ '#c7e89b',
+ '#a2d88a',
+ '#78c578',
+ '#4eaf63',
+ '#2f944e',
+ '#15793f',
+ '#036034',
+ '#004529',
+ ],
+ schemeYlOrBr: [
+ '#feeaa1',
+ '#fed676',
+ '#feba4a',
+ '#fb992c',
+ '#ee7918',
+ '#d85b0a',
+ '#b74304',
+ '#8f3204',
+ '#662506',
+ ],
+ schemeYlOrRd: [
+ '#fee087',
+ '#fec965',
+ '#feab4b',
+ '#fd893c',
+ '#fa5c2e',
+ '#ec3023',
+ '#d31121',
+ '#af0225',
+ '#800026',
+ ],
};
/**
@@ -170,7 +534,7 @@ export const spectrums = {
* @param {string} s - The label for which we want to get a color
* @param {string} scheme - The palette name, or "scheme"
* @param {string} forcedColor - A color that the caller wants to
- forcibly associate to a label.
+ forcibly associate to a label.
*/
export const getColorFromScheme = (function () {
const seen = {};