@plotdb/chart 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/package.json +3 -1
  2. package/CHANGELOG.md +0 -29
  3. package/build +0 -45
  4. package/doc/charts.md +0 -58
  5. package/doc/config.md +0 -44
  6. package/doc/draft/chart.md +0 -146
  7. package/doc/draft/data.md +0 -8
  8. package/doc/draft/definition.md +0 -0
  9. package/doc/draft/events.md +0 -0
  10. package/doc/draft/filter.md +0 -0
  11. package/doc/draft/lifecycle.md +0 -89
  12. package/doc/spec.md +0 -89
  13. package/doc/todo.md +0 -27
  14. package/doc/utils/tip.md +0 -84
  15. package/src/data/en-US/category +0 -20
  16. package/src/data/en-US/fruit +0 -39
  17. package/src/data/en-US/movie +0 -125
  18. package/src/data/en-US/name +0 -58
  19. package/src/data/index.ls +0 -34
  20. package/src/data/zh-TW/category +0 -20
  21. package/src/data/zh-TW/fruits +0 -38
  22. package/src/data/zh-TW/movie +0 -125
  23. package/src/data/zh-TW/names +0 -105
  24. package/src/index.ls +0 -323
  25. package/src/index.styl +0 -6
  26. package/src/utils/axis.ls +0 -229
  27. package/src/utils/config.ls +0 -11
  28. package/src/utils/data.ls +0 -104
  29. package/src/utils/format.ls +0 -30
  30. package/src/utils/legend.ls +0 -134
  31. package/src/utils/legend.styl +0 -37
  32. package/src/utils/tint.ls +0 -66
  33. package/src/utils/tip.ls +0 -97
  34. package/web/src/pug/base.pug +0 -21
  35. package/web/src/pug/block/axis/0.0.1/index.ls +0 -32
  36. package/web/src/pug/block/axis/0.0.1/index.pug +0 -1
  37. package/web/src/pug/block/axis-bubble/0.0.1/index.ls +0 -137
  38. package/web/src/pug/block/axis-bubble/0.0.1/index.pug +0 -1
  39. package/web/src/pug/block/bar/0.0.1/index.ls +0 -270
  40. package/web/src/pug/block/bar/0.0.1/index.pug +0 -35
  41. package/web/src/pug/block/bar-list/0.0.1/index.ls +0 -81
  42. package/web/src/pug/block/bar-list/0.0.1/index.pug +0 -30
  43. package/web/src/pug/block/bar-race/0.0.1/index.ls +0 -79
  44. package/web/src/pug/block/bar-race/0.0.1/index.pug +0 -21
  45. package/web/src/pug/block/base/0.0.1/index.ls +0 -66
  46. package/web/src/pug/block/base/0.0.1/index.pug +0 -5
  47. package/web/src/pug/block/blank/0.0.1/index.ls +0 -21
  48. package/web/src/pug/block/blank/0.0.1/index.pug +0 -1
  49. package/web/src/pug/block/bubble/0.0.1/index.ls +0 -218
  50. package/web/src/pug/block/bubble/0.0.1/index.pug +0 -42
  51. package/web/src/pug/block/curve-bar/0.0.1/index.ls +0 -85
  52. package/web/src/pug/block/curve-bar/0.0.1/index.pug +0 -16
  53. package/web/src/pug/block/curve-bar/0.0.1/sample.js +0 -338
  54. package/web/src/pug/block/dumbbell/0.0.1/index.ls +0 -86
  55. package/web/src/pug/block/dumbbell/0.0.1/index.pug +0 -1
  56. package/web/src/pug/block/empty/0.0.1/index.ls +0 -28
  57. package/web/src/pug/block/empty/0.0.1/index.pug +0 -2
  58. package/web/src/pug/block/gauge/0.0.1/index.ls +0 -96
  59. package/web/src/pug/block/gauge/0.0.1/index.pug +0 -31
  60. package/web/src/pug/block/gauge/0.0.1/sample.js +0 -338
  61. package/web/src/pug/block/line/0.0.1/index.ls +0 -297
  62. package/web/src/pug/block/line/0.0.1/index.pug +0 -33
  63. package/web/src/pug/block/number/0.0.1/index.ls +0 -65
  64. package/web/src/pug/block/number/0.0.1/index.pug +0 -20
  65. package/web/src/pug/block/percent-list/0.0.1/index.ls +0 -161
  66. package/web/src/pug/block/percent-list/0.0.1/index.pug +0 -34
  67. package/web/src/pug/block/pie/0.0.1/index.ls +0 -121
  68. package/web/src/pug/block/pie/0.0.1/index.pug +0 -19
  69. package/web/src/pug/block/pie/0.0.1/sample.js +0 -338
  70. package/web/src/pug/block/pie-bubble/0.0.1/index.ls +0 -181
  71. package/web/src/pug/block/pie-bubble/0.0.1/index.pug +0 -40
  72. package/web/src/pug/block/radar/0.0.1/index.ls +0 -109
  73. package/web/src/pug/block/radar/0.0.1/index.pug +0 -1
  74. package/web/src/pug/block/radar/0.0.1/xx +0 -285
  75. package/web/src/pug/block/scatter/0.0.1/index.ls +0 -124
  76. package/web/src/pug/block/scatter/0.0.1/index.pug +0 -30
  77. package/web/src/pug/block/sheet/0.0.1/index.ls +0 -34
  78. package/web/src/pug/block/sheet/0.0.1/index.pug +0 -5
  79. package/web/src/pug/block/table/0.0.1/index.ls +0 -36
  80. package/web/src/pug/block/table/0.0.1/index.pug +0 -3
  81. package/web/src/pug/block/taiwancounty/0.0.1/index.ls +0 -70
  82. package/web/src/pug/block/taiwancounty/0.0.1/index.pug +0 -64
  83. package/web/src/pug/block/taiwantown/0.0.1/index.ls +0 -44
  84. package/web/src/pug/block/taiwantown/0.0.1/index.pug +0 -52
  85. package/web/src/pug/block/taiwanvillage/0.0.1/index.ls +0 -49
  86. package/web/src/pug/block/taiwanvillage/0.0.1/index.pug +0 -52
  87. package/web/src/pug/block/treemap/0.0.1/index.ls +0 -168
  88. package/web/src/pug/block/treemap/0.0.1/index.pug +0 -42
  89. package/web/src/pug/block/voronoi-treemap/0.0.1/index.ls +0 -170
  90. package/web/src/pug/block/voronoi-treemap/0.0.1/index.pug +0 -17
  91. package/web/src/pug/block/voronoi-treemap/0.0.1/sample.js +0 -241
  92. package/web/src/pug/block/wordcloud/0.0.1/index.ls +0 -57
  93. package/web/src/pug/block/wordcloud/0.0.1/index.pug +0 -1
  94. package/web/src/pug/block/worldmap/0.0.1/index.ls +0 -77
  95. package/web/src/pug/block/worldmap/0.0.1/index.pug +0 -12
  96. package/web/src/pug/index.ls +0 -72
  97. package/web/src/pug/index.pug +0 -51
  98. package/web/src/styl/index.styl +0 -6
  99. package/web/static/assets/block/cache.js +0 -4
  100. package/web/static/assets/custom-lib/d3/d3-array.v2.js +0 -1182
  101. package/web/static/assets/custom-lib/d3/d3-array.v2.min.js +0 -2
  102. package/web/static/assets/custom-lib/d3/d3-array.v3.js +0 -1273
  103. package/web/static/assets/custom-lib/d3/d3-array.v3.min.js +0 -1273
  104. package/web/static/assets/custom-lib/d3/d3-axis.v2.min.js +0 -2
  105. package/web/static/assets/custom-lib/d3/d3-brush.v2.min.js +0 -2
  106. package/web/static/assets/custom-lib/d3/d3-color.v2.min.js +0 -2
  107. package/web/static/assets/custom-lib/d3/d3-dispatch.v2.min.js +0 -2
  108. package/web/static/assets/custom-lib/d3/d3-drag.v2.min.js +0 -2
  109. package/web/static/assets/custom-lib/d3/d3-ease.v2.min.js +0 -2
  110. package/web/static/assets/custom-lib/d3/d3-force-boundary.v0.0.1.min.js +0 -2
  111. package/web/static/assets/custom-lib/d3/d3-force.v2.min.js +0 -2
  112. package/web/static/assets/custom-lib/d3/d3-format.v2.min.js +0 -2
  113. package/web/static/assets/custom-lib/d3/d3-geo.v2.js +0 -3127
  114. package/web/static/assets/custom-lib/d3/d3-geo.v2.min.js +0 -2
  115. package/web/static/assets/custom-lib/d3/d3-hierarchy.v2.min.js +0 -2
  116. package/web/static/assets/custom-lib/d3/d3-interpolate.v2.min.js +0 -2
  117. package/web/static/assets/custom-lib/d3/d3-path.v2.min.js +0 -2
  118. package/web/static/assets/custom-lib/d3/d3-quadtree.v2.min.js +0 -2
  119. package/web/static/assets/custom-lib/d3/d3-random.v2.min.js +0 -2
  120. package/web/static/assets/custom-lib/d3/d3-scale-chromatic.v1.min.js +0 -2
  121. package/web/static/assets/custom-lib/d3/d3-selection.v2.min.js +0 -2
  122. package/web/static/assets/custom-lib/d3/d3-shape.v2.min.js +0 -2
  123. package/web/static/assets/custom-lib/d3/d3-timer.v2.min.js +0 -2
  124. package/web/static/assets/custom-lib/d3/d3-transition.v2.min.js +0 -2
  125. package/web/static/assets/custom-lib/d3/d3.v4.js +0 -17178
  126. package/web/static/assets/custom-lib/d3/d3.v4.min.js +0 -2
  127. package/web/static/assets/custom-lib/d3/d3.v6.js +0 -19708
  128. package/web/static/assets/data/countrycode.json +0 -1
  129. package/web/static/assets/data/world-110m.json +0 -1
  130. package/web/static/assets/data/zh-to-alpha2.json +0 -1
  131. package/web/static/assets/img/fluid.svg +0 -16
  132. package/web/static/block/axis/0.0.1/index.html +0 -74
  133. package/web/static/block/axis-bubble/0.0.1/index.html +0 -217
  134. package/web/static/block/bar/0.0.1/index.html +0 -576
  135. package/web/static/block/bar-list/0.0.1/index.html +0 -226
  136. package/web/static/block/bar-race/0.0.1/index.html +0 -179
  137. package/web/static/block/base/0.0.1/index.html +0 -197
  138. package/web/static/block/blank/0.0.1/index.html +0 -37
  139. package/web/static/block/bubble/0.0.1/index.html +0 -422
  140. package/web/static/block/bubble/0.0.1/test.html +0 -0
  141. package/web/static/block/curve-bar/0.0.1/index.html +0 -143
  142. package/web/static/block/dumbbell/0.0.1/index.html +0 -173
  143. package/web/static/block/empty/0.0.1/index.html +0 -76
  144. package/web/static/block/gauge/0.0.1/index.html +0 -145
  145. package/web/static/block/line/0.0.1/index.html +0 -566
  146. package/web/static/block/number/0.0.1/index.html +0 -147
  147. package/web/static/block/percent-list/0.0.1/index.html +0 -311
  148. package/web/static/block/pie/0.0.1/index.html +0 -276
  149. package/web/static/block/pie-bubble/0.0.1/index.html +0 -353
  150. package/web/static/block/radar/0.0.1/index.html +0 -144
  151. package/web/static/block/scatter/0.0.1/index.html +0 -246
  152. package/web/static/block/sheet/0.0.1/index.html +0 -98
  153. package/web/static/block/table/0.0.1/index.html +0 -67
  154. package/web/static/block/taiwancounty/0.0.1/index.html +0 -197
  155. package/web/static/block/taiwantown/0.0.1/index.html +0 -205
  156. package/web/static/block/taiwanvillage/0.0.1/index.html +0 -215
  157. package/web/static/block/treemap/0.0.1/index.html +0 -355
  158. package/web/static/block/voronoi-treemap/0.0.1/index.html +0 -345
  159. package/web/static/block/wordcloud/0.0.1/index.html +0 -87
  160. package/web/static/block/worldmap/0.0.1/index.html +0 -202
  161. package/web/static/css/index.css +0 -6
  162. package/web/static/css/index.min.css +0 -1
  163. package/web/static/favicon.ico +0 -0
  164. package/web/static/index.html +0 -153
@@ -1,205 +0,0 @@
1
- <div><script type="@plotdb/block">var mod;
2
- module.exports = {
3
- pkg: {
4
- name: 'taiwantown',
5
- version: '0.0.1',
6
- extend: {
7
- name: "base",
8
- version: "0.0.1"
9
- },
10
- dependencies: [
11
- {
12
- url: "https://d3js.org/topojson.v2.min.js",
13
- async: false
14
- }, {
15
- url: "/js/work/map.list.js",
16
- async: false
17
- }, {
18
- url: "https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist/pdmaptw.min.js"
19
- }
20
- ]
21
- },
22
- init: function(arg$){
23
- var root, context, pubsub;
24
- root = arg$.root, context = arg$.context, pubsub = arg$.pubsub;
25
- return pubsub.fire('init', {
26
- mod: mod({
27
- context: context
28
- })
29
- }).then(function(it){
30
- return it[0];
31
- });
32
- }
33
- };
34
- mod = function(arg$){
35
- var context, d3, forceBoundary, ldColor, repeatString$, pdmaptw, counties, towns;
36
- context = arg$.context;
37
- d3 = context.d3, forceBoundary = context.forceBoundary, ldColor = context.ldColor, repeatString$ = context.repeatString$, pdmaptw = context.pdmaptw, counties = context.counties, towns = context.towns;
38
- return {
39
- sample: function(){
40
- var val;
41
- val = {
42
- counties: counties.map(function(d, i){
43
- return {
44
- val: Math.random(),
45
- county: d
46
- };
47
- }),
48
- towns: towns.map(function(d, i){
49
- return {
50
- val: Math.random(),
51
- town: d
52
- };
53
- })
54
- };
55
- return {
56
- raw: val.towns,
57
- binding: {
58
- color: {
59
- key: 'val'
60
- },
61
- name: {
62
- key: 'town'
63
- }
64
- }
65
- };
66
- },
67
- config: {},
68
- dimension: {
69
- name: {
70
- type: 'N',
71
- name: "國家"
72
- },
73
- color: {
74
- type: 'R',
75
- name: "顏色"
76
- }
77
- },
78
- init: function(){
79
- var this$ = this;
80
- this.obj = pdmaptw.create({
81
- root: this.svg,
82
- type: 'town',
83
- baseurl: 'https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist'
84
- });
85
- return this.obj.init().then(function(){
86
- return this$.obj.fit();
87
- });
88
- },
89
- parse: function(){
90
- var this$ = this;
91
- return d3.select(this.svg).selectAll('path').each(function(d, i){
92
- return d.data = this$.data.filter(function(it){
93
- return it.name === d.properties.name;
94
- })[0] || {};
95
- });
96
- },
97
- resize: function(){},
98
- render: function(){
99
- var this$ = this;
100
- this.color = d3.interpolateTurbo;
101
- if (this.cfg != null && this.cfg.palette) {
102
- this.color = d3.interpolateDiscrete(this.cfg.palette.colors.map(function(it){
103
- return ldColor.web(it.value || it);
104
- }));
105
- }
106
- return d3.select(this.svg).selectAll('path').transition().duration(350).attr('fill', function(d, i){
107
- return this$.color(d.data.color);
108
- });
109
- }
110
- };
111
- };</script></div><div><script type="@plotdb/block">({
112
- pkg: {
113
- name: 'taiwantown',
114
- version: '0.0.1',
115
- dependencies: [
116
- {
117
- url: "https://d3js.org/d3.v4.js",
118
- async: false
119
- }, "https://d3js.org/d3-format.v2.min.js", "https://d3js.org/d3-array.v2.min.js", "https://d3js.org/topojson.v2.min.js", {
120
- url: "https://d3js.org/d3-color.v1.min.js",
121
- async: false
122
- }, {
123
- url: "https://d3js.org/d3-interpolate.v1.min.js",
124
- async: false
125
- }, {
126
- url: "https://d3js.org/d3-scale-chromatic.v1.min.js",
127
- async: false
128
- }, "/js/map.list.js", "https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist/pdmaptw.min.js"
129
- ]
130
- },
131
- init: function(arg$){
132
- var root, context, counties, towns, c;
133
- root = arg$.root, context = arg$.context;
134
- counties = context.counties.map(function(d, i){
135
- return {
136
- val: Math.random(),
137
- county: d
138
- };
139
- });
140
- towns = context.towns.map(function(d, i){
141
- return {
142
- val: Math.random(),
143
- town: d
144
- };
145
- });
146
- c = new chart({
147
- root: root,
148
- raw: towns,
149
- mod: this.mod({
150
- context: context
151
- }),
152
- binding: {
153
- color: {
154
- name: 'val'
155
- },
156
- name: {
157
- name: 'town'
158
- }
159
- }
160
- });
161
- c.init().then(function(){
162
- return c.render();
163
- });
164
- return this.c = c;
165
- },
166
- 'interface': function(){
167
- return this.c;
168
- },
169
- mod: function(arg$){
170
- var context;
171
- context = arg$.context;
172
- return {
173
- init: function(){
174
- var this$ = this;
175
- this.obj = context.pdmaptw.create({
176
- root: this.svg,
177
- type: 'town',
178
- baseurl: 'https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist'
179
- });
180
- return this.obj.init().then(function(){
181
- return this$.obj.fit();
182
- });
183
- },
184
- parse: function(){
185
- var this$ = this;
186
- return d3.select(this.svg).selectAll('path').each(function(d, i){
187
- return d.data = this$.data.filter(function(it){
188
- return it.name === d.properties.name;
189
- })[0] || {};
190
- });
191
- },
192
- resize: function(){},
193
- render: function(){
194
- var this$ = this;
195
- this.color = d3.interpolateTurbo;
196
- if (config.pal) {
197
- this.color = d3.interpolateDiscrete(config.pal);
198
- }
199
- return d3.select(this.svg).selectAll('path').transition().duration(350).attr('fill', function(d, i){
200
- return this$.color(d.data.color);
201
- });
202
- }
203
- };
204
- }
205
- });</script></div>
@@ -1,215 +0,0 @@
1
- <div><script type="@plotdb/block">var mod;
2
- module.exports = {
3
- pkg: {
4
- name: 'taiwanvillage',
5
- version: '0.0.1',
6
- extend: {
7
- name: "base",
8
- version: "0.0.1"
9
- },
10
- dependencies: [
11
- {
12
- url: "https://d3js.org/topojson.v2.min.js",
13
- async: false
14
- }, {
15
- url: "/js/work/map.list.js",
16
- async: false
17
- }, {
18
- url: "https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist/pdmaptw.min.js"
19
- }
20
- ]
21
- },
22
- init: function(arg$){
23
- var root, context, pubsub;
24
- root = arg$.root, context = arg$.context, pubsub = arg$.pubsub;
25
- return pubsub.fire('init', {
26
- mod: mod({
27
- context: context
28
- })
29
- }).then(function(it){
30
- return it[0];
31
- });
32
- }
33
- };
34
- mod = function(arg$){
35
- var context, d3, forceBoundary, ldColor, repeatString$, pdmaptw, counties, towns, villages;
36
- context = arg$.context;
37
- d3 = context.d3, forceBoundary = context.forceBoundary, ldColor = context.ldColor, repeatString$ = context.repeatString$, pdmaptw = context.pdmaptw, counties = context.counties, towns = context.towns, villages = context.villages;
38
- return {
39
- sample: function(){
40
- var val;
41
- val = {
42
- counties: counties.map(function(d, i){
43
- return {
44
- val: Math.random(),
45
- county: d
46
- };
47
- }),
48
- towns: towns.map(function(d, i){
49
- return {
50
- val: Math.random(),
51
- town: d
52
- };
53
- }),
54
- villages: villages.map(function(d, i){
55
- return {
56
- val: Math.random(),
57
- village: d
58
- };
59
- })
60
- };
61
- return {
62
- raw: val.villages,
63
- binding: {
64
- color: {
65
- key: 'val'
66
- },
67
- name: {
68
- key: 'village'
69
- }
70
- }
71
- };
72
- },
73
- config: {},
74
- dimension: {
75
- name: {
76
- type: 'N',
77
- name: "國家"
78
- },
79
- color: {
80
- type: 'R',
81
- name: "顏色"
82
- }
83
- },
84
- init: function(){
85
- var this$ = this;
86
- this.obj = pdmaptw.create({
87
- root: this.svg,
88
- type: 'village',
89
- baseurl: 'https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist'
90
- });
91
- return this.obj.init().then(function(){
92
- return this$.obj.fit();
93
- });
94
- },
95
- parse: function(){
96
- var this$ = this;
97
- d3.select(this.svg).selectAll('path').each(function(d, i){
98
- return d.data = this$.data.filter(function(it){
99
- return it.name === d.properties.name;
100
- })[0] || {};
101
- });
102
- d3.select(this.svg).selectAll('path').filter(function(d, i){
103
- return !/彰化縣/.exec(d.properties.name);
104
- }).remove();
105
- return this.obj.fit();
106
- },
107
- resize: function(){},
108
- render: function(){
109
- var this$ = this;
110
- this.color = d3.interpolateTurbo;
111
- if (this.cfg != null && this.cfg.palette) {
112
- this.color = d3.interpolateDiscrete(this.cfg.palette.colors.map(function(it){
113
- return ldColor.web(it.value || it);
114
- }));
115
- }
116
- return d3.select(this.svg).selectAll('path').transition().duration(350).attr('fill', function(d, i){
117
- return this$.color(d.data.color);
118
- });
119
- }
120
- };
121
- };</script></div><div><script type="@plotdb/block">({
122
- pkg: {
123
- name: 'taiwantown',
124
- version: '0.0.1',
125
- dependencies: [
126
- {
127
- url: "https://d3js.org/d3.v4.js",
128
- async: false
129
- }, "https://d3js.org/d3-format.v2.min.js", "https://d3js.org/d3-array.v2.min.js", "https://d3js.org/topojson.v2.min.js", {
130
- url: "https://d3js.org/d3-color.v1.min.js",
131
- async: false
132
- }, {
133
- url: "https://d3js.org/d3-interpolate.v1.min.js",
134
- async: false
135
- }, {
136
- url: "https://d3js.org/d3-scale-chromatic.v1.min.js",
137
- async: false
138
- }, "/js/map.list.js", "https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist/pdmaptw.min.js"
139
- ]
140
- },
141
- init: function(arg$){
142
- var root, context, counties, towns, c;
143
- root = arg$.root, context = arg$.context;
144
- counties = context.counties.map(function(d, i){
145
- return {
146
- val: Math.random(),
147
- county: d
148
- };
149
- });
150
- towns = context.towns.map(function(d, i){
151
- return {
152
- val: Math.random(),
153
- town: d
154
- };
155
- });
156
- c = new chart({
157
- root: root,
158
- raw: towns,
159
- mod: this.mod({
160
- context: context
161
- }),
162
- binding: {
163
- color: {
164
- name: 'val'
165
- },
166
- name: {
167
- name: 'town'
168
- }
169
- }
170
- });
171
- c.init().then(function(){
172
- return c.render();
173
- });
174
- return this.c = c;
175
- },
176
- 'interface': function(){
177
- return this.c;
178
- },
179
- mod: function(arg$){
180
- var context;
181
- context = arg$.context;
182
- return {
183
- init: function(){
184
- var this$ = this;
185
- this.obj = context.pdmaptw.create({
186
- root: this.svg,
187
- type: 'town',
188
- baseurl: 'https://cdn.jsdelivr.net/npm/pdmaptw@0.0.2/dist'
189
- });
190
- return this.obj.init().then(function(){
191
- return this$.obj.fit();
192
- });
193
- },
194
- parse: function(){
195
- var this$ = this;
196
- return d3.select(this.svg).selectAll('path').each(function(d, i){
197
- return d.data = this$.data.filter(function(it){
198
- return it.name === d.properties.name;
199
- })[0] || {};
200
- });
201
- },
202
- resize: function(){},
203
- render: function(){
204
- var this$ = this;
205
- this.color = d3.interpolateTurbo;
206
- if (config.pal) {
207
- this.color = d3.interpolateDiscrete(config.pal);
208
- }
209
- return d3.select(this.svg).selectAll('path').transition().duration(350).attr('fill', function(d, i){
210
- return this$.color(d.data.color);
211
- });
212
- }
213
- };
214
- }
215
- });</script></div>