zLCChart

zLCChart is one of the more than 126 objects included in zObjects.

zLCChart leverages the power of the Sharpplot product.

With zLCChart you can create all the charts that SharpPlot can build. A few examples are displayed in the carousel below.

Note: to get the full power of zLCChart it is recommended to acquire SharpPlot.

Example

To build the following chart with zLCChart:


all you need to write the following APL+Win code:

←'lcc'⎕wi'*zSetBackground' Color.White FillStyle.Solid
←'lcc'⎕wi'*zMarginLeft' 72
←'lcc'⎕wi'*zHeading' 'Yields by Farm'
←'lcc'⎕wi'*zSetColors' Color.Orange
←'lcc'⎕wi'*zXAxisStyle' XAxisStyles.ForceZero
←'lcc'⎕wi'*zBoxPlotStyle' BoxPlotStyles.Horizontal
←'lcc'⎕wi'*zDrawBoxPlot' yield farms
←'lcc'⎕wi'*zDrawChart'

assuming that you have the data saved in variables yield and farms and that lcc is the zLCChart object instance name.

The complete APL function creating the above chart reads:

      ∇ zzlcchart101;a;farms;yield
[1]   ⍝ Create the User Interface
[2]   ←'ff'⎕wi'*Create' 'zForm'('*caption' 'zLCChart Example')('*size'570 750)
[3]   ←'ff'⎕wi'*.fr.Create' 'zLabel'('wherelc'0 0'>>' '>>')('anchor'1 2 3 4)
[4]   ←'ff'⎕wi'*.fr.lcc.Create' 'zLCChart'('wherelc'0 0'>>' '>>')('anchor'1 2 3 4)
[5]
[6]   ⍝ Create some data for the chart
[7]   farms←'University Farm' 'Waseca' 'Morris'
[8]   farms,←'Crookston' 'Grand Rapids' 'Duluth'
[9]   farms←farms[a←?100⍴6]
[10]  yield←10 100 40 90 50 80[a]+.01×?1000×3 5 8 12 16 17[a]
[11]
[12]  ⍝ Create the zLCChart chart
[13]  ←'lcc'⎕wi'*zSetBackground' Color.White FillStyle.Solid
[14]  ←'lcc'⎕wi'*zMarginLeft' 72
[15]  ←'lcc'⎕wi'*zHeading' 'Yields by Farm'
[16]  ←'lcc'⎕wi'*zSetColors' Color.Orange
[17]  ←'lcc'⎕wi'*zXAxisStyle' XAxisStyles.ForceZero
[18]  ←'lcc'⎕wi'*zBoxPlotStyle' BoxPlotStyles.Horizontal
[19]  ←'lcc'⎕wi'*zDrawBoxPlot' yield farms
[20]  ←'lcc'⎕wi'*zDrawChart'
[21]
[22]  ⍝ Show the form
[23]  ←'ff'⎕wi'Show'
    ∇