Search
FishboneDiagram Class
Remarks See Also
 





Creates Ishikawa diagrams (a.k.a. fishbone or cause-and-effect diagrams) from specified data source.

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public class FishboneDiagram : Diagram

Visual Basic  Copy Code

Public Class FishboneDiagram
    Inherits Diagram

 Remarks

Fishbone diagrams are used to display causes of manufacturing effect / defect / event, grouped in categories, and arranged as ribs around a backbone. The FishboneDiagram control creates a category branch (rib) for each item specified in the ItemsSource property. Category labels are obtained from the items' property specified by LabelPath.

The causes in a category are obtained from the collection-property of items specified via CausesPath. If the collection contains strings, they are displayed directly as labels in respective branch. If causes are data objects, their labels are obtained through CauseLabelPath.

The overall defect or event described by the diagram is specified via its Title property and displayed on the right side. The diagram appearance can be customized through properties such as LabelBrush, StemStroke and BranchStroke.

Internally, FishboneDiagram creates DiagramLink and LinkLabel objects representing the model data, so you can customize appearance further via respective objects' properties, and handle events such as LinkClicked to detect user interaction. Note that these objects are available only after the DiagramGenerated event is raised.

 Example

The following code builds a fishbone diagram from a simple model (reproducing respective Wikipedia example):

C#  Copy Code

var c1 = new FBCategory { Label = "Measurements" };
c1.Causes = new List<string>
    { "Inspectors", "Microscopes", "Calibration" };
var c2 = new FBCategory { Label = "Materials" };
c2.Causes = new List<string>
    { "Suppliers", "Lubricants", "Alloys" };
var c3 = new FBCategory { Label = "Personnel" };
c3.Causes = new List<string>
    { "Operators", "Training", "Shifts" };

var c4 = new FBCategory { Label = "Environment" };
c4.Causes = new List<string>
    { "Temperature", "Humidity" };
var c5 = new FBCategory { Label = "Methods" };
c5.Causes = new List<string>
    { "Brake", "Engager", "Angle" };
var c6 = new FBCategory { Label = "Machines" };
c6.Causes = new List<string>
    { "Speed", "Blade wear" };

var model = new List<FBCategory>
    { c1, c2, c3, c4, c5, c6 };

fdiag.Title = "Defect XXX";
fdiag.LabelPath = "Label";
fdiag.CausesPath = "Causes";
fdiag.ItemsSource = model;

fdiag.StemStroke = Brushes.Red;
fdiag.BranchStroke = Brushes.Green;

fdiag.DiagramGenerated +=
    (s, args) => fdiag.ResizeToFitItems(30);

....

public class FBCategory
{
 public FBCategory()
 {
  Causes = new List<string>();
 }
 public string Label { get; set; }
 public List<string> Causes { get; set; }
}

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        System.Windows.Controls.Control
                            MindFusion.Diagramming.Wpf.DiagramBase
                                MindFusion.Diagramming.Wpf.Diagram
                                    MindFusion.Diagramming.Wpf.FishboneDiagram

 See Also