Commit 14449d39 authored by Elango Bharathi's avatar Elango Bharathi Committed by Elango Dhandapani
Browse files

hexpack facets included in tc360 example

parent b4a5c581
Pipeline #47437 passed with stage
in 2 minutes and 5 seconds
......@@ -118,22 +118,17 @@
.attr('stroke', 'white')
.attr('cx', 0)
.attr('cy', 0)
.on('mouseover', function(d) { console.log(d.Country, ',', d.Region) })
state(
{
name: 'spiral',
sel_x: 'Innovation',
sel_y: 'Availability of latest technologies'
},
{
r: 7
},
{},
{
layout: 'spiral',
data: data,
sort: 'age',
duration: duration,
ascending: true,
spiral_size: 1,
spiral_angle: 15,
width: 200,
......@@ -141,6 +136,37 @@
}
)
state(
{
name: 'hexpack',
sel_size: 'Availability of latest technologies'
},
{},
{
layout: 'hexpack',
data: data,
duration: duration,
// filter: function(d) { return d['Business and Innovation Environment'] > 5 },
group: function (d) { return d.Region === 'East Asia & Pacific' ? 0 :
d.Region === 'Europe & Central Asia' ? 1 :
d.Region === 'Latin America & Caribbean' ? 2 :
d.Region === 'Middle East & North Africa' ? 3 :
d.Region === 'North America' ? 4 :
d.Region === 'South Asia' ? 5 :
d.Region === 'Sub-Saharan Africa' ? 6 : 7
},
facets: [
{ x: 0, y: 0, width: 100, height: 100 },
{ x: 110, y: 0, width: 100, height: 100 },
{ x: 220, y: 0, width: 100, height: 100 },
{ x: 0, y: 110, width: 100, height: 100 },
{ x: 110, y: 110, width: 100, height: 100 },
{ x: 220, y: 110, width: 100, height: 100 },
{ x: 0, y: 220, width: 100, height: 100 },
],
}
)
state(
{
name: 'scatter 1',
......@@ -237,7 +263,7 @@
if (d3.select('.legendgroup').empty())
generate_color_legend(region_color_dict)
if (name !== 'spiral')
if (name !== 'spiral' && name !== 'hexpack')
show_scatter(sel_x, sel_y, sel_size)
else
hide_scatter()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment