Ishikawa / Cause-and-Effect Diagram · Root Cause Analysis
Fishbone Diagram Tool Build a fishbone diagram — also known as an Ishikawa diagram or cause-and-effect diagram — to map root causes of a problem by category instantly. Pro Mode adds custom category frameworks, colour coding, root-cause highlighting and SVG/PDF export.
● Pro Version is Free for now
Simple
(All Base Features)
Pro
(Unlock All Features)
Pro Mode active — custom frameworks, colour coding, root-cause highlighting, notes & SVG/PDF export unlocked
Type your problem statement, then add causes under each category Quick-Start Templates
🏭
Manufacturing Defect
6 Ms framework example
📞
Customer Complaint
4 Ps framework example
🐛
Software Bug
Custom categories example
🦴 Categories: 0
📌 Total Causes: 0
⭐ Flagged Root Causes: 0
Categories & Causes
+ Add Category
Outline (TXT)
PNG
SVG
PDF
`;
const blob = new Blob([html],{type:'text/html'});
const a=document.createElement('a'); a.download='smallstudytools-fishbone-print.html'; a.href=URL.createObjectURL(blob); a.click();
toast('Print-ready file downloaded — open it to save as PDF');
}function downloadOutlineTXT() {
const lines = ['=== FISHBONE / ISHIKAWA DIAGRAM — SmallStudyTools.com','', 'EFFECT: '+(effect||'(not set)'), ''];
categories.forEach(cat => {
lines.push(cat.name.toUpperCase());
cat.causes.filter(c=>c.text&&c.text.trim()).forEach(c => lines.push(' - '+(c.flagged?'[ROOT CAUSE] ':'')+c.text));
if (!cat.causes.some(c=>c.text&&c.text.trim())) lines.push(' (no causes listed)');
lines.push('');
});
lines.push('Generated by SmallStudyTools.com');
const blob = new Blob([lines.join('\n')],{type:'text/plain'});
const a=document.createElement('a'); a.download='smallstudytools-fishbone-outline.txt'; a.href=URL.createObjectURL(blob); a.click();
toast('Downloaded outline as TXT!');
}// ── MODE ──────────────────────────────────────────────────────
function setMode(mode) {
isPro = mode==='pro';
document.getElementById('btnSimple').classList.toggle('active',!isPro);
document.getElementById('btnPro').classList.toggle('active',isPro);
document.body.classList.toggle('pro-mode',isPro);
document.getElementById('proModeBar').style.display=isPro?'flex':'none';
document.getElementById('modeHint').textContent=isPro
?'Custom frameworks, colour coding, root-cause flags, notes & SVG/PDF export'.replace('&','&')
:'Type your problem statement, then add causes under each category';
renderAll();
try{localStorage.setItem(SK+'_mode',mode);}catch(e){}
}function toast(msg){const t=document.getElementById('toast');t.textContent=msg;t.classList.add('show');setTimeout(()=>t.classList.remove('show'),2400);}
function save(){
try{
const notes = isPro ? {
team: document.getElementById('noteTeam')?.value || '',
date: document.getElementById('noteDate')?.value || '',
ref: document.getElementById('noteRef')?.value || '',
} : {};
localStorage.setItem(SK, JSON.stringify({effect, categories, nextId, notes}));
}catch(e){}
}// ── INIT ──────────────────────────────────────────────────────
try{
const saved=JSON.parse(localStorage.getItem(SK)||'{}');
if(saved.categories && saved.categories.length){
effect = saved.effect || '';
categories = saved.categories;
nextId = saved.nextId || 1;
document.getElementById('effectInput').value = effect;
if (saved.notes) {
setTimeout(()=>{
if(document.getElementById('noteTeam')) document.getElementById('noteTeam').value = saved.notes.team||'';
if(document.getElementById('noteDate')) document.getElementById('noteDate').value = saved.notes.date||'';
if(document.getElementById('noteRef')) document.getElementById('noteRef').value = saved.notes.ref||'';
}, 0);
}
} else {
initDefault();
}
const savedMode=localStorage.getItem(SK+'_mode');
if(savedMode==='pro') setMode('pro'); else renderAll();
}catch(e){ initDefault(); renderAll(); }