1
1
( function ( global , factory ) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory ( exports , require ( 'd3' ) ) :
3
- typeof define === 'function' && define . amd ? define ( [ 'exports' , 'd3' ] , factory ) :
4
- ( factory ( ( global . g3utils = global . g3utils || { } ) , global . d3 ) ) ;
5
- } ( this , ( function ( exports , d3 ) { 'use strict' ;
6
-
7
- d3 = d3 && d3 . hasOwnProperty ( 'default' ) ? d3 [ 'default' ] : d3 ;
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory ( exports ) :
3
+ typeof define === 'function' && define . amd ? define ( [ 'exports' ] , factory ) :
4
+ ( factory ( ( global . g3utils = global . g3utils || { } ) ) ) ;
5
+ } ( this , ( function ( exports ) { 'use strict' ;
8
6
9
7
function getTextWidth ( text , font ) {
10
8
var canvas = document . getElementById ( "canvas" ) || document . createElement ( "canvas" ) ;
@@ -21,7 +19,8 @@ function getUniqueID(left, right) {
21
19
22
20
var palettes = {
23
21
bottlerocket1 : [ "#A42820" , "#5F5647" , "#9B110E" , "#3F5151" , "#4E2A1E" ,
24
- "#550307" , "#0C1707" ] ,
22
+ "#550307" , "#0C1707"
23
+ ] ,
25
24
bottlerocket2 : [ "#FAD510" , "#CB2314" , "#273046" , "#354823" , "#1E1E1E" ] ,
26
25
rushmore1 : [ "#E1BD6D" , "#F2300F" , "#35274A" , "#EABE94" , "#0B775E" ] ,
27
26
royal1 : [ "#899DA4" , "#C93312" , "#FAEFD1" , "#DC863B" ] ,
@@ -40,38 +39,49 @@ var palettes = {
40
39
google16 : [ "#3366cc" , "#dc3912" , "#ff9900" , "#109618" , "#990099" ,
41
40
"#0099c6" , "#dd4477" , "#66aa00" , "#b82e2e" , "#316395" ,
42
41
"#994499" , "#22aa99" , "#aaaa11" , "#6633cc" , "#e67300" ,
43
- "#8b0707" , "#651067" , "#329262" , "#5574a6" , "#3b3eac" ] ,
42
+ "#8b0707" , "#651067" , "#329262" , "#5574a6" , "#3b3eac"
43
+ ] ,
44
44
google5 : [ "#008744" , "#0057e7" , "#d62d20" , "#ffa700" , "#ffffff" ] ,
45
45
material1 : [ "#263238" , "#212121" , "#3e2723" , "#dd2c00" , "#ff6d00" ,
46
46
"#ffab00" , "#ffd600" , "#aeea00" , "#64dd17" , "#00c853" ,
47
47
"#00bfa5" , "#00b8d4" , "#0091ea" , "#2962ff" , "#304ffe" ,
48
- "#6200ea" , "#aa00ff" , "#c51162" , "#d50000" ] ,
48
+ "#6200ea" , "#aa00ff" , "#c51162" , "#d50000"
49
+ ] ,
49
50
pie1 : [ "#a6cee3" , "#1f78b4" , "#b2df8a" , "#33a02c" , "#fb9a99" ] ,
50
51
pie2 : [ "#e41a1c" , "#377eb8" , "#4daf4a" , "#984ea3" , "#ff7f00" ] ,
51
52
pie3 : [ "#495769" , "#A0C2BB" , "#F4A775" , "#F4C667" , "#F37361" ] ,
52
53
pie4 : [ "#FA7921" , "#E55934" , "#9BC53D" , "#FDE74C" , "#5BC0EB" ] ,
53
54
pie5 : [ "#5DA5DA" , "#4D4D4D" , "#60BD68" , "#B2912F" , "#B276B2" ,
54
- "#F15854" , "#FAA43A" ] ,
55
+ "#F15854" , "#FAA43A"
56
+ ] ,
55
57
pie6 : [ "#537ea2" , "#42a593" , "#9f1a1a" , "#7c5f95" , "#61a070" ] ,
56
58
pie7 : [ "#bddff9" , "#1e72bf" , "#ead1ab" , "#a2dbc5" , "#c7ae7d" ] ,
57
59
breakfast : [ "#b6411a" , "#eec3d8" , "#4182dd" , "#ecf0c8" , "#2d6328" ] ,
58
60
set1 : [ "#e41a1c" , "#377eb8" , "#4daf4a" , "#984ea3" , "#ff7f00" ,
59
- "#ffff33" , "#a65628" , "#f781bf" , "#999999" ] ,
61
+ "#ffff33" , "#a65628" , "#f781bf" , "#999999"
62
+ ] ,
60
63
set2 : [ "#66c2a5" , "#fc8d62" , "#8da0cb" , "#e78ac3" , "#a6d854" ,
61
- "#ffd92f" , "#e5c494" , "#b3b3b3" ] ,
64
+ "#ffd92f" , "#e5c494" , "#b3b3b3"
65
+ ] ,
62
66
set3 : [ "#8dd3c7" , "#ffffb3" , "#bebada" , "#fb8072" , "#80b1d3" ,
63
67
"#fdb462" , "#b3de69" , "#fccde5" , "#d9d9d9" , "#bc80bd" ,
64
- "#ccebc5" , "#ffed6f" ] ,
68
+ "#ccebc5" , "#ffed6f"
69
+ ] ,
65
70
category10 : [ "#1f77b4" , "#2ca02c" , "#d62728" , "#ff7f0e" , "#9467bd" ,
66
- "#8c564b" , "#e377c2" , "#7f7f7f" , "#bcbd22" , "#17becf" ] ,
71
+ "#8c564b" , "#e377c2" , "#7f7f7f" , "#bcbd22" , "#17becf"
72
+ ] ,
67
73
pastel1 : [ "#fbb4ae" , "#b3cde3" , "#ccebc5" , "#decbe4" , "#fed9a6" ,
68
- "#ffffcc" , "#e5d8bd" , "#fddaec" , "#f2f2f2" ] ,
74
+ "#ffffcc" , "#e5d8bd" , "#fddaec" , "#f2f2f2"
75
+ ] ,
69
76
pastel2 : [ "#b3e2cd" , "#fdcdac" , "#cbd5e8" , "#f4cae4" , "#e6f5c9" ,
70
- "#fff2ae" , "#f1e2cc" , "#cccccc" ] ,
77
+ "#fff2ae" , "#f1e2cc" , "#cccccc"
78
+ ] ,
71
79
accent : [ "#7fc97f" , "#beaed4" , "#fdc086" , "#ffff99" , "#bf5b17" ,
72
- "#386cb0" , "#f0027f" , "#666666" ] ,
80
+ "#386cb0" , "#f0027f" , "#666666"
81
+ ] ,
73
82
dark2 : [ "#1b9e77" , "#d95f02" , "#7570b3" , "#e7298a" , "#66a61e" ,
74
- "#e6ab02" , "#a6761d" , "#666666" ] ,
83
+ "#e6ab02" , "#a6761d" , "#666666"
84
+ ] ,
75
85
} ;
76
86
77
87
function defaultPalette ( ) {
@@ -86,10 +96,6 @@ function listPalettes() {
86
96
return Object . keys ( palettes ) ;
87
97
}
88
98
89
- function scaleOrdinal ( paletteName ) {
90
- return d3 . scaleOrdinal ( getPalette ( paletteName ) ) ;
91
- }
92
-
93
99
/* FileSaver.js
94
100
* A saveAs() FileSaver implementation.
95
101
* 1.3.8
@@ -405,7 +411,6 @@ exports.palettes = palettes;
405
411
exports . defaultPalette = defaultPalette ;
406
412
exports . getPalette = getPalette ;
407
413
exports . listPalettes = listPalettes ;
408
- exports . scaleOrdinal = scaleOrdinal ;
409
414
exports . output = output ;
410
415
411
416
Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
0 commit comments