| |||||
Introducing SharpPlot Your First Chart Recent Updates Tutorials General Tutorials Chart Tutorials Reference SharpPlot Class Properties Methods Structures Enumerations Style examples Glossaries Active Charts VectorMath Class DBUtil Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Home > Sample Charts > TraceChart > Inventory Projection for a Tank Farm Inventory Projection for a Tank FarmTrace 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 between the various vessels. SharpPlot sp = new SharpPlot; sp.Heading = "Inventory in Processing Vessels"; raw = VectorMath.RunningTotal(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 = VectorMath.RunningTotal(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 = VectorMath.RunningTotal(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); trace = new int[][]{raw,part,done}; sp.DrawTraceChart(trace); Worked Examples |