Vote for this Product at ClarionShop
 
Buy now at ClarionShop
Version Gold

www.capesoft.com
Updated 22 January 2008
c3pa approved
     

 

Contents Page


Documentation Guide
 
User Guide
Template Guide
Technical Guide
 
     


Technical Guide

 

Contents: Technical Guide
Insight Class Properties  
  General Properties Legend & Header Properties Zooming Properties
  Data Display Properties X-Axis Properties Set Properties
  Data Label Properties Y-Axis Properties Data Properties
  Grid Properties Shading Properties Label Properties
       
Insight Class Methods
  General Methods Informational Methods Rendering Methods
  AddSpecialAxis GetPoint Draw
  GetWindowsColors GetPointName PrintGraph
  Init GetPointValue Resize
  Kill GetPointSummary SaveAs
  SetMouseMoveParameters GetMousePos SetStyle
  ToClipBoard GetSetDescription Zoom
  SwitchControls    
  SetMirrorText    
       
  Populating Data Methods Set Manipulation Methods Label Methods
  AddItem GetSet AddDataLabel
  AddSetQ SetSetColors AddXLabel
  ClearData SetSetDataLabels AddXLabels
  ClearSetQ SetSetDescription AddYLabels
  Data SetSetType ClearLabelData
  DataTime SetSetVisible ClearLabelX
  DeleteItem SetSetYAxis ClearLabelY
  Reset SetSetYLabels GetLabel
  ResetQueue SortSets  
  ScaleYAxis SwapSets  
       
  Low Level Drawing Methods
  Display DrawLine SetFont
  DrawArc DrawPixel SetPen
  DrawEllipse DrawPolygon Show
       

Embed Points

  SetLabelFonts SetRecordClose SetReportProperties
  SetPropSQL SetRecordHigh SetSetNumber
  SetPoint SetRecordLow ValidateRecord
  SetPointName SetRecordOpen  
 
     

 

Insight Class Properties

 

General Properties

 

ActiveInvisible Byte Usually the graph does not load data or draw if it cannot be seen. However, if you need it to draw regardless (typically so you can save it to a file), then set this property to 1.
BackgroundColor Long The color to use as the wallpaper for the graph. Defaults to COLOR:Silver. This property is ignored if the BlackAndWhite property is set.
BackgroundShadeColor String(255) If this is set to a value >= 0, the background is shaded from BackgroundColor on the left to BackgroundShadeColor on the right. This property is ignored if the BlackAndWhite property is set.
BackgroundPicture Long A BMP file to use as the wallpaper for the graph. This property is ignored if the BlackAndWhite property is set.
BorderColor Long The color of the border around the graph. Defaults to Color:Black.
Control Long The bounding control (graph region) )equate. Charts will be drawn within the bounds of this control.
Depth Long The 3D depth of the chart (in 1/1000 inch).
MinPointWidth Long If you have a large number of points on the graph, then naturally each point for the graph is very very small. This is not terribly useful, and can also make the graph look bad if each point is labeled.  Setting this property allows you to set the minimum space (in pixels) occupied by each x-axis point. The graph workspace is adjusted accordingly - the region size will remain the same, but scrollbars may appear.
MouseMovePointValueFormat String(50) When your mouse moves over the graph, it is possible to display information relating to the data point your mouse is over somewhere on your window or on a tooltip. Use this property to specify the format in which the x-axis point value should be displayed.
Points Real The number of data points to plot. (This does not apply to Time charts). Note that this property is mostly for internal use.
PrintPortrait Byte Set this to 1 if you want your graphs to print out in portrait style as opposed to landscape.
ReportBand Long The target band on the report. This will be cleared after each call to Draw()
SavedGraphType Long The graph type selected by the user the last time the application was closed.
SumariseAllSets Byte By default this is set to 1. When the .GetPointSummary() method is called, all sets on the graph will be included in the summary. However, if this property is off, only the set over which the mouse is will be included.
SuppressBusyWindows Byte By default, when the .PrintGraph() method is called, a small PRINTING message is displayed. If you want to suppress this message then set this property to 1.
Type Long The type of chart. Valid options are Insight:Line, Insight:Bar, Insight:Pie, Insight:Time, Insight:Gantt, Insight:Scatter and Insight:Pareto.
UnlockThreadForPrint Long Unlock the thread before printing starts. Basically, set this to 0 this if you are using FixIT and your other threads freeze when you print the graph. Init() sets this to 1.
WriteLog Byte If this is set to 1 then debugging information is written to the SysInternals DebugView program.

 

Data Display Properties

 

AspectRatio Real For 2D pie charts, if this is set to 1 the pie will always be circular (as opposed to elliptical).
AxisStyle Byte For "built-in" graph styles (for the axis). To set the style use the .SetStyle() method, with the style type set to Style:Axis.
BlackAndWhite Byte Set this property if the graph must only use black and white colors when drawing. Mostly used when printing to black and white printers.
DataStyle Byte For "built-in" graph styles (for the data). To set the style use the .SetStyle() method, with the style type set as Style:Data.
DrawMissing Byte Draw through data points not supplied. (Line charts)
Fill Long The area below the data points will be filled (Line and Time charts)
FillToZero Long The area between the data points and the Zero mark will be filled (Line and Time charts)
Float Byte This will allow floating bars based on the minimum values sent as data (Bar charts - see also .Data())
InnerRadius Long This is the value (as a percentage from 0 to 100) of the inside radius of the donut (pie charts only)
LineStyle Long The style to use for drawing the Line. Valid options are Pen:Solid, Pen:Dash, Pen:Dot, Pen:DashDot and Pen:DashDotDot
LineWidth Long

The line width to use for data display. For example, for lines this will be the width of the line. For bars, this will be the width of the bar outline.

MaxPieRadius Long Sets the maximum radius of the Pie graph, in pixels. Useful on reports where you are trying to make several pie graphs all look the same size.
Pattern Byte Set this to Insight:Auto so that each set is assigned a default pattern. Set to Insight:None if the graph does not use patterns. If a pattern is specified here, all sets will be assigned this default pattern. For a list of patterns, see the Pattern entry of the Properties Tab in the Template Guide.
PieAngle Real Set this to the angle (in degrees) at which you would like the first pie slice to be drawn. 0 degrees is at 12 o-clock, and the angle increases in a clockwise direction from there.
PieLabelLineColor Long Set this to the color you would like the lines connecting each label to its respective pie slice to be.
PointWidth Real The width the data point display should occupy of the allocated point display width.
Shape Byte Defaults to Insight:Auto.  This property can be overridden at the Set level (see the Shape entry for the SetQ). Applies to Line and Scatter graphs. Set to Insight:None to suppress shapes on Line graphs.
SortSet Long The data set to sort on for pareto charts.
SortStyle Long The sort style. 0=none, 1 = high value on bottom and -1 = high value on top.
SquareWave Byte Set the default for the lines on the graph to be square waves.
Stacked Byte      For data value stacking (bar, line and pareto charts). Set to 1 or 0.
StackLines Byte When this is switched on, line graphs (and scatter graphs) will be stacked if the Stacked property above is switched on. Otherwise, line graphs wont be stacked. Default value is 1 (assigned by .Init()).
ZCluster Byte Z-cluster bar charts. Bars at the same point will be stacked behind each other.

 

Data Label Properties

 

ColorDataLabels Byte Color the data labels the same as the set color.
DataFont String(50) The font to use for the data labels.
DataFontColor Long The font color to use for the data labels.
DataFontHeight Long The font height to use for the data labels.
DataFontStyle Long The font style to use for the data labels.
DataLabelFormat String(50) The picture token to use to format data values for label display.
DataFontCharSet Long The charset for the data label font.
DataFontAngle Long Use 0 or 90.
PieLabelLines Byte The label for each slice of your pie can either be spread over one, two or three lines. If you want to override Insight's automatic choice, fill in either 1, 2 or 3 here. Note: Note that there are a maximum of 3 strings that can be displayed in the label - ShowDataLabelText, ShowDataLabelValue and ShowDataLabelPercent. Hence, if you for example choose PieLabelLines to be 3 and you only have 2 of the ShowDataLabelText, ShowDataLabelValue and ShowDataLabelPercent properties set to 1, there will be empty lines in the labels.
PiePercentFormat String(50) When ShowDataLabelsPercent is on, use this to specify the format you want the percentage value to be displayed in. When left empty, a default format is used.
ShortDataLabels Byte The value to display is reduced to only 2 or 3 significant digits. For example, 123456 becomes 123K, 123456789 becomes 123M,  1234 becomes 1.2K, and so on. The unit (K) can also be turned on and off (see ShortDataLabelsUnit below).
ShortDataLabelsUnit Byte If set to 1 then the unit for the Data Label is displayed (see ShortDataLabels above).
ShowDataLabels Byte Label the data points?
ShowDataLabelsEvery Long Set to n to show the data labels every n points.
ShowDataLabelsPercent Byte Show data labels as a percentage of the total (pie chart only).
ShowDataLabelsValue Byte Show data labels as a value (pie chart only).
ShowDataLabelsText Byte Show the name of the slice in the data label (pie chart only).

 

Grid Properties

 

AutoXGridTicks Byte    If this is on, Insight will automatically calculate and use the optimum number of x-axis grid lines to use.
AutoYGridTicks Byte If this is on, Insight will automatically calculate and use the optimum number of y-axis grid lines to use.
BackBorder Byte Draw a border around the back wall of the chart (useful for 2D charts only).
BackFillColor Long The fill color for the chart background grid.
BackLineColor Long The line color for the chart background grid.
BaseFillColor Long The fill color for the chart base grid.
BaseLineColor Long The line color for the chart base grid.
GridLineWidth Long The linewidth to use to draw the grid frame.
MaxXGridTicks Long The maximum number of x-axis grid lines to use.
MaxYGridTicks Long The maximum number of y-axis grid lines to use.
RightBorder Long The minimum gap to leave on the right hand side of the graph.
SideFillColor Long The fill color for the chart side grid.
SideLineColor Long The line color for the chart side grid.
XGridColor Long The color of the x-axis grid lines.
XGridLineWidth Long The thickness of the x-axis grid lines.
XGridStyle Long The penstyle for the x-axis grid. Valid options are Pen:Solid, Pen:Dash, Pen:Dot, Pen:DashDot and Pen:DashDotDot.
XGridTicks Long The number of x-axis grid lines to draw. Note that if AutoXGridTicks is on, this value will be ignored. Note: The x-axis (the line with the x-axis labels) is not counted towards the quantity of grid lines.
YGridColor Long The color of the y-axis grid lines.
YGridLineWidth Long The thickness of the y-axis grid lines.
YGridStyle Long The penstyle for the y-axis grid. Valid options are Pen:Solid, Pen:Dash, Pen:Dot, Pen:DashDot and Pen:DashDotDot.
YGridTicks Long The number of y-axis grid lines to draw. Note: The y-axis (the line with the y-axis labels) is not counted towards the quantity of grid lines.

 

Legend & Header Properties

 

HeaderFont String(50) The font to use for the header text.
HeaderFontColor Long The font color to use for the header text.
HeaderFontHeight Long The font height to use for the header text.
HeaderFontStyle Long The font style to use for the header text.
HeaderFontCharset Long The font charset to use for the header text.
HeaderName String(255) The header text.
LegendFont String(50) The font to use for the legend text.
LegendFontColor Long The font color to use for the legend text.
LegendFontHeight Long The font height to use for the legend text.
LegendFontStyle Long The font style to use for the legend text.
LegendFontCharset Long The font charset to use for the legend text.
LegendAngle Long If this is set to 0 then text is written horizontally, if it's set to 90 then the text is written vertically.
LegendStacked Long If this is set to 1 then the legends are aligned on on top of one another, and if it is set to 0 then the legends are inline (i.e. side by side).
LegendPosition Long

The position of the legend. Valid options are 1 to 9 where 8=top, 2=bottom, 4=left, 6=right, and so on (look at the keypad).

Tip: The following combinations are NOT supported:

  • Position Right (6) or Left (4) with LegendStacked = 0 and LegendAngle = 0
  • Position Top (8) or Bottom (2) with LegendStacked = 0 and LegendAngle = 90

Tip: The text for the Legend is set using the .SetSetDescription() method.

LegendText Long Used in Pie charts.  If ticked then the name of the point will appear in the legend.
LegendValue Long Used in Pie charts.  If ticked then the value of the point will appear in the legend.
LegendPercent Long Used in Pie charts.  If ticked then the percent of the point will appear in the legend.

 

X-Axis Properties

 

AutoXLabels Byte Automatically generate labels for the x-axis.
DisplayFrom Real The first x-axis point to display the data from. Usually, insight calculates this point automatically from the data it needs to graph. Use this property to override the calculated value (all you need to do is set it before the call to .Draw()).
DisplayFromTime Real The first y-axis point to display the date/time from (gantt and time charts only) e.g. today() + (clock() / 8640000). Usually, insight calculates this point automatically from the data it needs to graph. Use this property to override the calculated value (all you need to do is set it before the call to .Draw()).
DisplayTo Real The last x-axis point to display the data to. Usually, insight calculates this point automatically from the data it needs to graph. Use this property to override the calculated value (all you need to do is set it before the call to .Draw()).
DisplayToTime Real The last y-axis point to display the date/time to (gantt and time charts only) e.g. today() + (clock() / 8640000). Usually, insight calculates this point automatically from the data it needs to graph. Use this property to override the calculated value (all you need to do is set it before the call to .Draw()).
DisplayOnX Byte What to display on the x-axis.  0 = don't display, 1 = display PointNumber and 2 = display PointName.
LabelsTimeFormat String(50) The format for the time graph's x-axis labels. Of the form @d5+@t1 or @t4+@d3.
LineFromZero Long For Line graphs, start the x-axis at 0 instead of at 1.
ShowXLabels Long Display x-axis labels (or not).
ShowXLabelsCount Long Show this many x-axis labels. Insight will try its best to display this number of points, but you may find that it will round this number up to ensure that the x-axis labels are evenly spread.
ShowXLabelsEvery Long Show an x-axis label every n points.
SpreadXLabels Byte spreads the x-axis labels equally across the X-Axis. Useful for graphs that have an uneven distribution of Point Numbers.
XAxisLabelsPosition Byte 0 is "normal" (i.e. bottom or left) - 1 is "other" (i.e. top or right). Note that the x-axis of a Pareto and Gantt graph is vertical.
XAxisLabelsJustify Byte 0 = Right, 1 = Left and 2 = Center.
XAxisName String(255) The x-axis name text.
XFont String(50) The font to use for the x-axis labels.
XFontColor Long The font color to use for the x-axis labels.
XFontHeight Long The font height to use for the x-axis labels.
XFontStyle Long The font style to use for the x-axis labels.
XFontCharSet Long The font charset to use for the x-axis labels.
XFontAngle Long The font angle to use for the x-axis labels.  0 or 90.
XNameFont String(50) The font to use for the x-axis name.
XNameFontColor Long The font color to use for the x-axis name.
XNameFontHeight Long The font height to use for the x-axis name.
XNameFontStyle Long The font style to use for the x-axis name.
XNameFontCharSet Long The font charset to use for the x-axis name.

 

Y-Axis Properties

 

AutoScale Byte Automatically calculate the best y-axis display range. This is a composite number (via addition) made up of  Scale:None and Scale:Low + Scale:High + Scale:Zero.
If Scale:Low or Scale:High is omitted, then the value in YAxisMin and/or YAxisMax will be used. If Scale:Zero is used, then the scale will be adjusted to include zero. To disable auto scaling, set this property to Scale:None.
PercentSetNum Long If you want the data to be displayed as percentage values on the y-axis and you want a set's value at each x-axis point to be used as the total for calculating those percentages, set this to the number of that set . If you dont want this set to be visible (typically you wouldnt, as it will be 100% at each x-axis point), just make it invisible.
SeparateYAxis Byte Use separate y-axis values for each data set.
ShowYLabels Byte Label the y-axis (or not).
ShortYAxisLabels Byte The value to display is reduced to only 2 or 3 significant digits. For example, 123456 becomes 123K, 123456789 becomes 123M,  1234 becomes 1.2K, and so on. The unit (K) can also be turned on and off (see ShortYAxisLabelsUnit below).
ShortYAxisLabelsUnit Byte Add the unit (K,M) to the short label (see ShortYAxisLabels above).
YAxisLabelsPosition Byte Set to 0 for left and 1 for Right. For Pareto and Gantt graphs, set this to 0 for top and 1 for bottom.
YAxisLabelsJustify Byte Set to 0 for Right, 1 for Left, or 2 for Center justify.
YAxisMax Real The y-axis maximum value (when SeparateYAxis = 0 and AutoScale = Scale:None).
YAxisMin Real The y-axis minimum value (when SeparateYAxis = 0 and AutoScale = Scale:None).
YAxisName String(255) The y-axis label text.
YFont String(50) The font to use for the y-axis labels.
YFontColor Long The font color to use for the y-axis labels.
YFontHeight Long The font height to use for the y-axis labels.
YFontStyle Long The font style to use for the y-axis labels.
YFontCharSet Long The font charset to use for the y-axis labels.
YFontAngle Long Use 90 to draw label text vertically, 0 for horizontal.
YFormat String(50) The picture token to use for format y-axis values for label display.
YIgnoreInvisibleSets Byte Ignore invisible sets when auto-scaling the y-axis.
YNameFont String(50) The font to use for the y-axis name.
YNameFontHeight Long The font height to use for the y-axis name.
YNameFontStyle Long The font style to use for the y-axis name.
YNameFontCharset Long The font charset to use for the y-axis name.
YNameAngle Long Use 90 to draw the name vertically, 0 for horisontal.
YNameFontColor Long The font color to use for the y-axis name.

 

Shading Properties

 

AutoShade Byte If set to 1, shading will be used on displays with more than 256 colors.
LongShade Byte If set to 1, shading will be done relative to the axis, not to the data point value.
RightShade Byte If set to 1, Insight will shade from left to right.
ShadeBack Byte If set to 1, the chart background grid will be shaded.
TopShade Byte If set to 1, Insight will shade from top to bottom.

 

Zooming Properties

 

PaperZoom Long Use this to increase the resolution at which the graph prints on paper. This is set to 4 by default, which means that the resolution on paper will be four times as high as it is displayed on screen.
ShowFromPoint Real Data point to show from (non-Time charts). Mostly for internal use (see .Zoom()).
ShowFromPointTime Real Time point to show from (Time charts). Mostly for internal use (see .Zoom()).
ShowToPoint Real Data point to show to (non-Time charts). Mostly for internal use (see .Zoom()).
ShowToPointTime Real Time point to show to (Time charts). Mostly for internal use (see .Zoom()).
WorkSpaceWidth Long The graph's width and height defaults to the control size on the window. However, since Clarion supports scroll bars on a control, there may be cases when you want the graph to be bigger than the control.  In this case, somewhere after the call to the .Init method, set the WorkSpaceWidth and WorkSpaceHeight properties. Scroll bars will be automatically added but OUTSIDE the space you've allocated to the control. So if you intend to have scrollbars, make sure you have sufficient space for them.
WorkSpaceHeight Long See WorkSpaceWidth above.

Zoom

Long Percentage to zoom in and out of of full point range. Mostly for internal use (see .Zoom()).
ZoomPoint Real The x-axis point which is being zoomed in to. Mostly for internal use (see .Zoom()).

 

Set Properties

 

Each data set has a number of properties that affect just this set. Although these properties can be read and written directly, where a method is supplied it is recommended that it be used to set the property. 

Some of the properties override Graph Level properties, and some of the properties in turn can be overridden at the Data Level.

Use the .GetSet() method to get the correct queue entry for the set you want to edit. For example:

If ThisGraph.GetSet(n)
  ThisGraph.SetQ.Property = x
  Put(ThisGraph.SetQ)
End


where n is the set number and x is the value you want to set the property to.

Set Long The set number. Ideally starts with 1 for the first set, and goes up by 1 for each set (however, random numbers may also be used). Each set has a unique number.  You can use the .AddSetQ() method to add a new set. You can use the .GetSet() method to load a set record. Notice that a pie graph will only ever have one set, and that this set number should always be set to 1.
DataLabelFormat String(50) A picture format used when writing the data labels for this set, e.g. @n12.2. If this is left blank, the DataLabelFormat will be used.
LabelDataStartPosition Long Setting this to n will cause the data labeling for this set to only start at the n'th x-axis point.
NoDataLabels Byte Set to True or False. Allows you to suppress the data labels for this set.
NoYAxisLabels Byte Set to True or False. Allows you to suppress the y-axis labels for this set (if SeperateYAxis is on). Typically used when another set has the same labels.
SetDescription String(100) The description of the set. This is used when setting the legend text and the point summary information. See .SetSetDescription().
ShortYAxisLabels Byte Set to True or False. See the entry with the same name under Y-Axis Properties (only useful if SeperateYAxis is on).
ShortYAxisLabelsUnit Byte Set to True or False. See the entry with the same name under Y-Axis Properties (only useful if SeperateYAxis is on).
YAxisFormat String(50) A picture format used when writing the Y-Axis labels for this set. e.g. @n2.2
 
The following properties override the ones set at Graph Level.
 
AutoScale Byte This is a composite number (via addition) made up of  Scale:None and Scale:Low + Scale:High + Scale:Zero. See the entry with the same name under Y-Axis Properties (only useful if SeperateYAxis is on).
Type Long Allows you to change the graph type of this set so that you can, for example, include a Line in a Bar chart. See .SetSetType()
Fill Long Applies only to Line graphs. If set to 1 then the area under the graph will be "filled".If set to -1 then the default for the graph is used.
FillToZero Long Applies only to Line graphs. If set to 1 then the area between the graph and the Zero mark (on the y-axis) will be filled. If set to -1 then the default for the graph is used.
MouseMoveFormat Byte Specifies the format the y-axis values for this set in the mouse-over information should be displayed in.
Points Long Limits the set to the first n points (i.e. only the first n points of the set will be plotted on the graph). e.g. Useful for graphing the "top ten".
SquareWave Byte Applies only to Line graphs. If set to , the line will be drawn in a square format.  If set to -1 then the default for the graph is used.
YAxisMax Real See the entry with the same name under Y-Axis Properties (only useful if SeperateYAxis is on).
YAxisMin Real See the entry with the same name under Y-Axis Properties (only useful if SeperateYAxis is on).
YAxisStep Real See the entry with the same name under Y-Axis Properties (only useful if SeperateYAxis is on).
 
The following properties override the graph level, and can be overridden at the data level.
 
PenColor Long The pen color used for drawing this set. See .SetSetColors().
FillColor Long The fill color used for drawing this set. See SetSetColors().
ShadeColor Long The shade color used for drawing this set. See SetSetColors().
ShadowColor Long The shadow color used for drawing this set. See SetSetColors().
Intensity Long The brightness of the light source on your objects. Should have a value between 1 and 100. Make sure Autoshading is on. See SetSetColors().
LineStyle Long Set the style of the line used when drawing this set. Valid options are Pen:Solid, Pen:Dash, Pen:Dot, Pen:DashDot, and Pen:DashDotDot.
LineWidth Long Sets the line width used when drawing this set.
PointWidth Real Specifies the width of the bar in proportion to the space between bars at a given x-axis point. Is a percentage where 100 means bars touch, and 50 means that there is 1 bar with between bars.
Pattern Byte Sets the pattern for this particular set. Use Insight:Auto to use the default pattern for this set. 
Shape Byte Sets the Shape for this set. Applies to Line and Scatter graphs. Use Insight:Auto to use the default shape for this set. Other valid options are Insight:None, Insight:Square, Insight:Circle, Insight:Triangle, Insight:Diamond.
Visible Byte Set to True or False. Default is True. If set to false then this set is ignored when drawing the graph. Useful when you want to offer the user the ability to turn sets on and off at runtime.

 

Data Properties