Inventory Projection for a Tank Farm

Trace charts are a slightly specialist style of plot, originally designed for data from devices like seismographs and EEGs where multiple pens trace out (almost) parallel lines. Each pen is allocated a tickmark on the Y-axis and then an ‘inner axis’ is created for it (naturally these inner axes are all scaled identically).

An excellent use of the trace-chart is to show the inventory of various liquids as they move through some production process. This gives a very clear picture of what materials are available at each production stage.

This variant of the chart is normally surface-shaded and scaled from ‘empty’ to ‘full’ for each vessel. The example would be a typical display from a production-planning system where the planner was scheduling the processes which moved liquids bwteen the various vessels.

TraceChart2
SharpPlot sp = new SharpPlot();
sp.Heading = "Inventory in Processing Vessels";

raw = Vector.SumScan(new int[] {0,0,0,0,1,1,1,1,0,0,0,0,-1,-1,-1,0,0,0,0,1,1,1,1,1,0,0,0,0});
part = Vector.SumScan(new int[] {4,0,0,0,-1,-1,-1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,-1,-1,-1,0});
done = Vector.SumScan(new int[] {2,0,0,0,1,1,1,0,0,0,0,0,-1,0,-1,-1,-1,0,0,0,0,0,0,0,1,1,1,0});

sp.IIntercept = 0;
sp.TraceChartStyle = TraceChartStyles.SurfaceShading;
sp.SetYLabels(new string[]{"Raw","Part\nDone","Finished"});
sp.SetXTickMarks(1);

sp.XAxisStyle = XAxisStyles.ArrowedAxis|XAxisStyles.CenteredCaption;
sp.XCaption = "Days forward from today";
sp.YCaption = "Vessel";
sp.YAxisStyle = YAxisStyles.AtEndCaption;

sp.SetFillStyles(FillStyle.GradientBottom);

sp.DrawTraceChart(new int[][]{raw,part,done});

See also

TraceChart1 TraceChart2 TraceChart3 TraceChart4