|
|
|
@ -834,8 +834,8 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
countries = []; |
|
|
|
|
map; |
|
|
|
|
|
|
|
|
|
mapInit() { |
|
|
|
|
var T = window['T']; |
|
|
|
|
var d3 = window['d3']; |
|
|
|
@ -855,6 +855,31 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
function init(sel, transform) { |
|
|
|
|
let colors = [ |
|
|
|
|
{h:'319',s:0.85,l:0.56}, |
|
|
|
|
{h:'268',s:0.79,l:0.71}, |
|
|
|
|
{h:'287',s:0.79,l:0.54}, |
|
|
|
|
{h:'247',s:0.80,l:0.67}, |
|
|
|
|
{h:'206',s:0.85,l:0.57}, |
|
|
|
|
{h:'220',s:0.43,l:0.64}, |
|
|
|
|
{h:'176',s:0.86,l:0.89}, |
|
|
|
|
{h:'186',s:0.72,l:0.57}, |
|
|
|
|
{h:'200',s:0.8,l:0.69}, |
|
|
|
|
{h:'319',s:0.85,l:0.56}, |
|
|
|
|
{h:'268',s:0.79,l:0.71}, |
|
|
|
|
{h:'287',s:0.79,l:0.54}, |
|
|
|
|
]; |
|
|
|
|
// let colors = [
|
|
|
|
|
// '#EE30B3',
|
|
|
|
|
// '#B37CF0',
|
|
|
|
|
// '#BD2CE6',
|
|
|
|
|
// '#7768EE',
|
|
|
|
|
// '#359EEF',
|
|
|
|
|
// '#7B95CA',
|
|
|
|
|
// '#CAFBF8',
|
|
|
|
|
// '#43D0E1',
|
|
|
|
|
// '#72C6EF',
|
|
|
|
|
// ];
|
|
|
|
|
var upd = sel.selectAll('path.geojson').data(countries); |
|
|
|
|
upd |
|
|
|
|
.enter() |
|
|
|
@ -862,7 +887,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
.attr('class', 'geojson') |
|
|
|
|
.attr('stroke', 'black') |
|
|
|
|
.attr('fill', function (d, i) { |
|
|
|
|
return d3.hsl(Math.random() * 360, 0.9, 0.5); |
|
|
|
|
return d3.hsl(colors[i].h, colors[i].s, colors[i].l); |
|
|
|
|
}) |
|
|
|
|
.attr('fill-opacity', '0.5'); |
|
|
|
|
} |
|
|
|
|