diff --git a/_ruby_libs/pages.rb b/_ruby_libs/pages.rb index 7508df15..8464201c 100644 --- a/_ruby_libs/pages.rb +++ b/_ruby_libs/pages.rb @@ -262,14 +262,15 @@ def initialize(site, package_names, all_repos, errors) self.data['n_errors'] = errors.length # compute venn diagram model - distro_counts = Hash[$all_distros.collect { |d| [d, 0] }] - distro_overlaps = Hash[(2..$all_distros.length).flat_map{|n| (0..$all_distros.length-1).to_a.combination(n).to_a}.collect { |s| [s, 0] }] + distro_counts = Hash[$recent_distros.collect { |d| [d, 0] }] + distro_overlaps = Hash[(2..$recent_distros.length).flat_map{|n| (0..$recent_distros.length-1).to_a.combination(n).to_a}.collect { |s| [s, 0] }] package_names.each do |package_name, package_instances| overlap = [] #package_instances.snapshots.reject.with_index{|dr, i| dr[1].nil? || dr[1].version.nil? } package_instances.snapshots.each.with_index do |s,i| - if not s[1].nil? and not s[1].version.nil? + puts "s: " + s.to_s + if not s[1].nil? and not s[1].version.nil? and not distro_counts[s[0]].nil? overlap << i distro_counts[s[0]] = distro_counts[s[0]] + 1 end @@ -277,7 +278,7 @@ def initialize(site, package_names, all_repos, errors) dputs package_name.to_s + " " + overlap.to_s - package_overlaps = (2..$all_distros.length).flat_map{|n| overlap.combination(n).to_a} + package_overlaps = (2..$recent_distros.length).flat_map{|n| overlap.combination(n).to_a} package_overlaps.each do |o| distro_overlaps[o] = distro_overlaps[o] + 1 diff --git a/js/venn.js/venn.js b/js/venn.js/venn.js index fbb16033..12d5a4ee 100644 --- a/js/venn.js/venn.js +++ b/js/venn.js/venn.js @@ -718,9 +718,11 @@ } } } - arcs.push(arc); - arcArea += venn.circleArea(arc.circle.radius, arc.width); - p2 = p1; + if (arc !== null) { + arcs.push(arc); + arcArea += venn.circleArea(arc.circle.radius, arc.width); + p2 = p1; + } } } else { // no intersection points, is either disjoint - or is completely