Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions archaeology/visualization/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,10 @@ <h3 id="modal-title"></h3>
}));
const width = el.clientWidth, height = 320;
const svg = d3.select(el).append('svg').attr('role','img').attr('viewBox', `0 0 ${width} ${height}`);
if (!modules.length) {
svg.append('text').attr('x', width/2).attr('y', height/2).attr('text-anchor','middle').attr('fill',COLORS.text2).text('No source structure data available');
return;
}
const root = d3.hierarchy({ children: modules }).sum(d => d.value);
d3.treemap().size([width, height]).padding(2).round(true)(root);
const leaves = root.leaves();
Expand Down Expand Up @@ -2206,8 +2210,12 @@ <h3 id="modal-title"></h3>
if (!el) return;
const dna = D.derived_patterns.creative_dna_flow_map;
if (!dna) return;
const sourceDomains = dna.source_domains || [];
const targetModules = dna.target_modules || [];
const sourceDomains = (dna.source_domains || []).map(d =>
typeof d === 'string' ? { domain: d, repo_count: 0, total_files: 0 } : d
);
const targetModules = (dna.target_modules || []).map(m =>
typeof m === 'string' ? { label: m, domain: m } : m
);
const flows = dna.flows || [];
if (!sourceDomains.length || !targetModules.length) {
const width = el.clientWidth, height = 180;
Expand Down
Loading