![]() |
|||
| Version
www.capesoft.com |
|||
| Documentation Guide | |||||
|
|||||
Technical Guide |
| 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. |
| OpenText, CloseText, HighText,LowText | String(20) | These properties contain the text, used when the tooltip for a Floating Bar or HiLo graph. They default to 'Open:', 'Close:', 'High:' and 'Low:' respectively. |
| 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. |
| 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). |
| 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. |
| 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:
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. |
| 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. | |
| 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 don't want this set to be visible (typically you wouldn't, 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. |
| 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. |
| 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()). |
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,andPen: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. |
The data that Insight actually graphs is stored in the DataQ property. This is a Queue with the following fields. Accessing the Data Queue is not usually done directly, but nothing stops you. The usual method for adding items to the DataQ is the .Data() method.
| Set | Long | The set number of the set that the data point belongs to. |
| Count | Long | This is an internal property that is set by .ResetQueue(). It holds the number of child records for this data point. |
| Point | Real |
The point number for this data point. For normal graphs this is an incrementing integer, usually starting at 1. For time graphs it is a real with the format date + time, e.g. dataq.point = Date + (Time / 8640000). |
| ValueMin | Real | For floating bars, this is the y-axis value for the bottom of the bar. |
| ValueMax | Real | This is the data value (where the point should be plotted on the y-axis). |
| ValueOpen | Real | For Hi-Lo graphs, this is the opening value. |
| ValueClose | Real | For Hi-Lo graphs, this is the closing value. |
|
The following properties override the ones at the Set Level. |
||
| PenColor | Long | The pen color used for drawing this data point. |
| FillColor | Long | The fill color used for drawing this data point. |
| ShadeColor | Long | The shade color used for drawing this data point. |
| ShadowColor | Long | The shadow color used for drawing this data point. |
| Intensity | Long | The brightness of the light source on your objects. Should have a value between 1 and 100. Make sure Autoshading is on. |
| LineStyle | Long | Set the style of the line used when drawing this point. Valid options are Pen:Solid, Pen:Dash, Pen:Dot, Pen:DashDot, and Pen:DashDotDot. |
| LineWidth | Long | Sets the width of the line used when drawing this point. |
| Pattern | Byte | Sets the pattern for this particular point. Use Insight:Auto to use the default pattern for this set number. |
| Shape | Byte | Sets the Shape for this point. Applies to Line and Scatter graphs. Use Insight:Auto to use the default shape for this point. 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 data point is ignored when drawing the graph. Useful when you want to offer the user the ability to turn points on and off at runtime. |
The details for each label on the x- and y-axis are stored in a queue called the labelq. Typically, you would want to leave this queue alone, unless you want certain labels on the x- or y-axis to stand out, for example, by editing the font. You would put your code to do this in the SetLabelFonts() procedure. Your code would look something like this:
loop counter = 1 to
records(self.LabelQ)
get(self.LabelQ, counter)
if errorcode()
cycle
end
self.LabelQ.FontName = ''
self.LabelQ.FontSize = 0
self.LabelQ.FontColor = -1
put(self.LabelQ)
end
loop counter = 1 to records(self.LabelQ)
get(self.LabelQ, counter)
if errorcode()
cycle
end
if self.LabelQ.Type = Label:XAxis
self.LabelQ.FontName = 'Arial'
self.LabelQ.FontSize = 14
self.LabelQ.FontColor = COLOR:Green
put(self.LabelQ)
end
end
The properties of this queue are as follows:
| Type | Long | Choose between Label:XAxis and Label:YAxis. For pies, choose Label:Xaxis. |
| Set | long | Internal use. No touching. |
| Point | long | The x-axis point number for which this is a label. |
| Value | real | The y-axis point for which this is a label. |
| DisplayText | String(100) | The text to display for the label. |
| DisplayText2 | String(100) | In case of multi-lined labels (pie charts only), this would be line two of the label. |
| DisplayText3 | String(100) | In case of multi-lined labels (pie charts only), this would be line three of the label. |
| OriginalText | String(100) | Internal use. No touching. |
| X | long | x-coordinate of the label, in pixels. For internal use, really. |
| Y | long | y-coordinate of the label, in pixels. For internal use, really. |
| W | long | Width of the label, in pixels. For internal use, really. |
| H | long | Height of the label, in pixels. For internal use, really. |
| StartAngle | real | Start angle of the pie slice for which this is a label. For internal use, really. |
| EndAngle | real | End angle of the pie slice for which this is a label. For internal use, really. |
| FontName | String(40) | Name of the font to use for this label. Leave blank if no override desired. |
| FontSize | long | Size of the font to use for this label. Leave at 0 if no override desired. |
| FontColor | long | Color of the font to use for this label. Leave at -1 if no override desired. |
| FontCharSet | long | Charset of the font to use for this label. Leave at 0 if no override desired. |
| FontStyle | long | Style of the font to use for this label. Leave at 0 if no override desired. |
| XOffSet | long | Set this to the number of pixels you want the label to be shifted horisontally from where Insight was going to draw it originally. |
| YOffSet | long | Set this to the number of pixels you want the label to be shifted vertically from where Insight was going to draw it originally. |
![]()
| General Methods |
| Purpose | Allows you to add specific axis lines to the graph background. | ||
| Parameters | Parameter | Type | Description |
| Type | Long | Either Label:XAxis or Label:Yaxis. | |
| Value | Real | Axis value of the line being drawn. | |
| LabelText | String | Label text of the line. | |
| PenColor | Long = -1 | Color of the line. If omitted then the usual color for that axis is used. | |
| PenWidth | Long = -1 | Width of the line. If omitted then the usual width for that axis is used. | |
| PenStyle | Long = -1 | Style of the line. If omitted then the usual style for that axis is used. Valid options are Pen:Solid, Pen:Dash, Pen:Dot, Pen:DashDot, and Pen:DashDotDot. | |
| LabelColor | Long = -1 | Color of the label text. If omitted then the usual color for that axis is used. | |
| Set | <Long> | If not omitted, the special axis will be assigned to the specified set. If Separate Axies is ticked on, the special axis will be drawn relative to this set's y-axis. | |
| XOffSet | Long = 0 | Set this to the number of pixels you want the label to be shifted horisontally from where Insight was going to draw it originally. | |
| YOffSet | Long = 0 | Set this to the number of pixels you want the label to be shifted vertically from where Insight was going to draw it originally. | |
| ORLabelText | Long = 0 | If you want Insight to draw the other labels even though this special label will draw straight over them, set this to 1 | |
| Returns | none | ||
| Example | MyChart.AddSpecialAxis (Label:YAxis,300,'') MyChart.AddSpecialAxis (Label:YAxis,300,'',Color:Blue) |
||
| Purpose | Fetch the Standard Windows Colors. | ||
| Parameters | Parameter | Type | Description |
| iColor | *iColorGroupType | A group into which the fetched values are populated. See the Notes below. | |
| Returns | None | ||
| Notes |
The iColorGroupType has the following declaration: iColorGroupType Group, Type
Scrollbar Long
DKShadow3D
Long
HotLight
Long
MenuHighlight
Long
Desktop
Long Fetched Long End The last Fetched field can be used to make sure that .GetWindowsColors() is called only once in your application. It is set to 1 by .GetWindowsColors(). |
||
| Example |
Fetch the windows standard color and use them for set 1: !DATA iColor Group(iColorGroupType) End CODE ThisGraph1.GetWindowsColors(iColor) ThisGraph1.SetSetColors(1, Color:Black, iColor:BTNFace, Color:Black, Color:White) |
||
| Purpose | Initialize the object for use. | ||
| Parameters | Parameter | Type | Description |
| Control | Long | The bounding control (graph region) )for the chart. | |
| Type | Long = 1 | The type of chart. | |
| Points | Real = 1 | The number of data points. | |
| Returns | True if successful, false if not. | ||
| Notes | The points parameter is not required for Time charts. | ||
| Example | Initialize the object for a Bar chart with 12 points to be draw in ?Region1. Success# = MyChart.Init (?Region1, 12) |
||
| Purpose | Clean up the object resources after use. |
| Parameters | None |
| Returns | None |
| Example | Kill a previously used chart. MyChart.Kill () |
| Purpose | To set some properties relating to the mouse move summary display. | ||
| Parameters | Parameter | Type | Description |
| SumariseAllSets | Long | Sets the SumariseAllSets property. | |
| MousePointValueFormat | String | Sets the MouseMovePointValueFormat property. | |
| Returns | None | ||
| Example | MyChart.SetMouseMoveParameters(1, '@N12.2') | ||
| Purpose | Copies the graph to the windows clipboard. |
| Parameters | None |
| Returns | None |
| Example |
Copy the graph to the windows clipboard: MyChart.ToClipBoard() |
| Purpose | Changes the (region) control the Insight object uses to draw a graph in. | ||
| Parameters | Parameter | Type | Description |
| pNewControl | Long | The control which will contain the new image that the Insight object will create to draw the graph on. | |
| pImageControl | Long = 0 |
The image control on which the graph should be drawn. If omitted, a new image control will be created within the specified region. |
|
| Returns | None | ||
| Notes | Remember to call .Draw() for the graph to appear in its new location. The old graph image will remain. | ||
| Example |
Change the control the ThisGraph1 Insight object uses to draw the graph in: ThisGraph1.SwitchControls(?Region2) ThisGraph1.Draw() |
||
| Purpose | Switches mirroring text on graph on or off. | ||
| Parameters | Parameter | Type | Description |
| pMirror | Long | Set to 1 for mirroring text, 0 for not. | |
| Returns | None | ||
| Notes | Remember to call .Draw() for changes to appear onscreen. | ||
| Example |
Switch text mirroring on: ThisGraph1.SetMirrorText(1) ThisGraph1.Draw() |
||
| Information Methods |
| Purpose | Calculates the chart point that the mouse vertical is at. | ||
| Parameters | Parameter | Type | Description |
| Set | *Long | The set number where the mouse is. This value is filled in by the method. | |
| Point | *Real | The point number where the mouse is. This value is filled in by the method. | |
| Returns | True if successful, False otherwise | ||
| Notes | A return value of 0 shows that the mouse is not pointing at a data item on the chart. For time charts, the integer portion of the point value shows the date, and the decimal portion shows the time, as a proportion of one day. |
||
| Example |
To show where the mouse is pointing:
!for a time chart show where the mouse is pointing |
||
| Purpose | Returns the point name for the supplied x-axis point. | ||
| Parameters | Parameter | Type | Description |
| Set | Long=0 | The set number. | |
| Point | Real=0 | The point number. | |
| Returns | The x-axis point name (label) for the point. | ||
| Notes | As the x-axis label is always stored with set 1, the actual value in the set parameter is largely irrelevant. It should typically be set to 1. If one of the Set or Point parameters is omitted or 0, a call to .GetPoint() will be made to determine the point that the mouse is at. This point's name will then be returned. | ||
| Example | Get the label for the point that the mouse is at: CurrentPointLabel = MyChart.GetPointName() |
||
| Purpose | Get the value for a point at the given set. | ||
| Parameters | Parameter | Type | Description |
| Set | Long=0 | The set to get the value for. | |
| Point | Real=0 | The point at which to get the value for the given Set. | |
| LookBack | Long=0 | The direction in the data set to look for the closest value. | |
| TreatLinesAsDiscrete | Byte=0 | Instead of returning the mouse y-coordinate for a line or time graph (which are both assumed to be continuous), return a value only if one was supplied for the line at Point. | |
| Returns | The value for the set at the point (or at the nearest point - see Notes below). | ||
| Notes |
If the Point is omitted or 0, a call to
.GetPoint() will be made, and this point will be used. The Lookback parameter shows which way to look for the closest value where no value exists for the given Set at the supplied Point:
|
||
| Example | Show the value for sets 1 and 2 at the point where the mouse is and look for the next lowest point value when there is no value for that set at the mouse position: Set1Value = MyChart.GetPointValue(1, ,-1) Set2Value = MyChart.GetPointValue(2, ,-1) |
||
| Purpose | Get the mouse coordinates. | ||
| Parameters | Parameter | Type | Description |
| MouseX | *Long | The x-axis point, in pixels. This value is filled in by the method. | |
| MouseY | *Long | The y-axis point, in pixels. This value is filled in by the method. | |
| Returns | none | ||
| Example |
Get the mouse coordinates: MyChart.GetMousePos(MouseX, MouseY) |
||
| Purpose | Get a summary of the data point your mouse is at. | ||
| Parameters | Parameter | Type | Description |
| IPN | Long | Include Point Name. Set to 1 to include the point name in the summary, or zero to leave it off. | |
| Separator | String | The separator to use between listed sets. | |
| Returns | A string containing a whole summary of the point under the mouse. | ||
| Notes |
SumariseAllSets determines whether all sets are included in the summary, or only the set over which the mouse is currently hovering.
Only sets that have a Description set will be included in the tip. |
||
| Example | Show the value for set 1 and 2 where the mouse is: ?ThisGraph1{prop:tip} = ThisGraph1.GetPointSummary(1,'<10>') |
||
| Purpose | Get the set descriptor (used for legends and point summary) | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number to return the description for. | |
| Returns | String - the set description. | ||
| Notes | |||
| Example | Get setnumber 3's description: Set3Descriptor = MyChart.GetSetDescription(3) |
||
| Data Methods |
| Purpose | This function allows you to add a whole stream of data to the graph. Typically this means adding a View, or Queue, but it can also be used to add individual memory variables. The Reset method calls .ResetQueue, which in turn is the animal that reads through the Views & Queues and adds the information to the actual graph. Thus if a View or Queue changes, then .Reset should be called (followed by .Draw so you can see the actual graph.) | |||||||||||||||||||||||||||
| Parameters | Parameter | Type | Description | |||||||||||||||||||||||||
| ID | Long | This assigns an ID to the view or Queue you are adding. Inside .ResetQueue(), various methods, such as .ValidateRecord(), .SetRecordHigh(), .SetRecordLow(), .SetRecordOpen(), .SetRecordClose(), .SetSetNumber(), . SetPointName() and .SetPointNumber() are called. Since all of these are designed to allow code to be embedded, it's useful to know which View or Queue is being processed. Thus all of these methods pass this ID number through to you. The actual value of ID is not important, you can set it to any unique number you like. Note: When using AddItem() to add multiple sets from the same queue or file, the same ID number should be used for each of these method calls, because the data source is the same each time. | ||||||||||||||||||||||||||
| Set | Long | Sets the set number for this group of data. If you wish the data to span multiple sets, then set this to 0 and add code to the .SetSetNumber() method. The .SetSetNumber() method will be called by .ResetQueue() for each item in the Queue or View if this parameter is set to 0. | ||||||||||||||||||||||||||
| V|Q | <View / Queue> | The View, or Queue, containing the data. Omitting this parameter implies the data is a simple memory variable. | ||||||||||||||||||||||||||
| Action | <Long> | One of Insight:CountRecord, Insight:SumField, Insight:AverageField or Insight:GraphField. If you use Insight:SumField or Insight:AverageField, then a Parent Field (PF below) is required. | ||||||||||||||||||||||||||
| FH | <?> | A field to Graph. If this parameter is omitted then .SetRecordHigh() will be called by .ResetQueue() for each record. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||||||||||||||||
| FL | <?> | A field to Graph. If this parameter is omitted then .SetRecordLow() will be called .ResetQueue() for each record. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||||||||||||||||
| FO | <?> | A field to Graph. If this parameter is omitted then .SetRecordOpen() will be called .ResetQueue() for each record. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||||||||||||||||
| FC | <?> | A field to Graph. If this parameter is omitted then .SetRecordClose() will be called .ResetQueue() for each record. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||||||||||||||||
| PF | <?> | If you are using Insight:SumField or Insight:AverageField in the Action above, then you can enter a parent field here. For example, if you were summing invoice line items, then the parent field would be the invoice number. If you want to use an expression for a parent field, then enter a variable here and set this variable in the .ValidateRecord() method to whatever expression you need. .ValidateRecord() is called by .ResetQueue(). | ||||||||||||||||||||||||||
| Point | <?> | If the point number is stored in the View or Queue, then specify it here. If this is not entered then .SetPointNumber() will be called by .ResetQueue() for each record. | ||||||||||||||||||||||||||
| PointName | <?> | If the point name is stored in the View or Queue, then specify it here. If this is not entered then .SetPointName() will be called by .ResetQueue() for each record. | ||||||||||||||||||||||||||
| Returns | None | |||||||||||||||||||||||||||
| Notes |
|
|||||||||||||||||||||||||||
| Example |
Add a queue called PlottingQueue's data to the graph. Graph each field pq:value of the queue as a point on the graph, with the x-axis point numbers and names given by the fields pq:pointNumber and pq:pointName of the queue. ThisGraph2.AddItem(1 , 1, PlottingQueue, Insight:GraphField, pq:value, , , , , pq:pointNumber, pq:pointName) |
|||||||||||||||||||||||||||
| Purpose | Initialize a new record in the SetQ Queue (add a new set). | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number for the new set | |
| Returns | None | ||
| Notes | You do not usually need to call this method. It will be called automatically when required. However if you explicitly want to set properties for a given set, then you can call this first to create the entry in the SetQ. | ||
| Example |
Add a new set with setnumber 3. ThisGraph2.AddSetQ(3) |
||
| Purpose | Clear data values from the chart to plot. | ||
| Parameters | Parameter | Type | Description |
| Set | Long = 0 | The set who's data values to clear. | |
| Returns | None | ||
| Notes | If set is omitted or 0 then all the sets' data values will be cleared. | ||
| Example | Clear set 2's data values: MyChart.ClearData(2) Clear all data values: |
||
| Purpose |
Clear all the sets from the SetQ. |
| Parameters | None |
| Returns | None |
| Notes | This method frees the entire SetQ. This means that all properties of all sets, such as the color settings, bar widths and data label formats will be deleted. Upon adding a new set, or re-adding an old set, all of these properties will have to be set again using the applicable methods. If a set should only be "deleted" temporarily, rather use the .SetSetVisible() method to make the set invisible. |
| Example | Free the
SetQ:
MyChart.ClearSetQ() |
| Purpose | Send data values to the chart to plot (adds a data point to the DataQ). | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set this data point belongs to.See the DataQ. | |
| Point | Real | The x-axis point for this data point. See the DataQ. | |
| Value | <Real> | The value at this point (y-axis). See ValueMax in the DataQ. | |
| LowValue | <Real> | The low value for this point. See the DataQ. | |
| ValueOpen | <Real> | The opening value for this point. See the DataQ. | |
| ValueClose | <Real> | The closing value for this point. See the DataQ. | |
| Count | <Long> | The number of child records for this data point. See the DataQ. | |
| Duration | <Real> | Not yet implemented. | |
| LineStyle | <Long> | The line style for this point. See the DataQ. | |
| LineWidth | <Long> | The line width for this point. See the DataQ. | |
| Returns | None | ||
| Notes | The low value has implications depending on the chart type - see the DataQ. In all charts the LowValue can be used to force automatic scaling from the supplied value. For Time charts, see .DataTime(). | ||
| Example | Send a value of 77 for set 2, point 5: MyChart.Data(2, 5, 77) Send a value of 77 for set 2, point 5, and force the auto-scaling to run from -100: Send floating bar values of 44 to 77 for set 2, point 5: |
||
| Purpose | Allows you to remove a data source added using the .AddItem() method. | ||
| Parameters | Parameter | Type | Description |
| ID | Long | This is the ID number of the item, as used when .AddItem() was called. | |
| Returns | None | ||
| Notes |
This method allows you to remove queues and views from the graph that were previously added using the .AddItem() method. You do not typically need to call this method. |
||
| Example |
Remove the queue with ID number 5 from the data to plot on your graph: MyChart.DeleteItem(5) |
||
| Purpose | Send data values to a Time chart to plot. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set this value belongs to. | |
| Date | Long | The date for the point. | |
| Time | Long | The time for the point. | |
| Value | <Real> | The (y-axis) value for this point. | |
| Returns | None | ||
| Notes |
This method calls the
.Data() method.
The point is calculated as Date + (Time / (24*60*60*100)).
Thus, the internal call to
.Data() would be (where 8640000 = (24*60*60*100) is one day in Clarion time): |
||
| Example | Send a value of 77 for set 2 at the current date and time: MyChart.DataTime (2, TODAY(), CLOCK(), 77) Thus, for this example, the internal call to .Data() would be: |
||
| Purpose | Resets the data to be graphed. | ||
| Parameters | Parameter | Type | Description |
| Force | Byte = 0 | For embedding purposes. The internal workings of this method makes no use of this. | |
| Returns | None | ||
| Notes | Calls .ClearLabelX(), .Resize() and .ResetQueue() in turn. It is usually followed by a call to the .Draw() method so that the changes are visible on the screen or report. Make use of the embed point before the parent call if you want to call this method yourself with a Force parameter value other than zero. | ||
| Example | ThisGraph.Reset() ThisGraph.Draw() |
||
| Purpose | Loads the data out of the views and queues (specified by .AddItem()). If the data in the view or queue has changed, then this method should be called. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set to reload. If all sets should be reloaded then set this to 0. | |
| Returns | None | ||
| Notes | This method is usually followed by a call to .Draw() so that the changes are visible on the graph. | ||
| Example | ThisGraph.ResetQueue(2) ThisGraph.Draw() |
||
| Purpose | Calculates the scaling for the y-axis based on the Y-Axis Properties. |
| Parameters | None |
| Returns | None |
| Notes | This calculates the y-axis scaling based on the
AutoScale and
SeperateYAxis properties. .Draw() calls this method. |
| Example | ThisGraph.ScaleYAxis() |
| Label Methods |
| Purpose | Allows you to explicitly set a data label. Usually the value of the data is used but there may be a case where you want to override that with a specific label. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The data set the point belongs to. | |
| Point | Real | The data point for the data label. | |
| Label | String | The label. | |
| Returns | none | ||
| Notes | Labels are cleared by calls to .Reset() and used by calls to .Draw(). So the best place to embed this code is in the Event:Accepted embed point for the Graph control before the generated code. | ||
| Example | Label point 3 belonging to set 2 as 'Highest': MyChart.LabelData (2, 3, 'Highest') |
||
| Purpose | Sets the text for the specified x-axis label. | ||
| Parameters | Parameter | Type | Description |
| Point | Real | The point for the x-axis label. | |
| Label | String | The label text. | |
| Overwrite | Long = 1 | If set to 1, the label will be overwritten (if it exists) with the new label text. If set to 0, the existing label will remain unchanged. | |
| Returns | none | ||
| Notes |
The text is stored in the LabelQ.OriginalText property. The LabelQ.Type property is equal to 2 (Label:XAxis) as this is an x-axis label. See the Programmers Corner in the User Guide for more on the LabelQ property. This method is called automatically by the .ResetQueue() method using the value supplied by the .SetPointName() method. |
||
| Example | Label point 1 as 'Jan': MyChart.AddXLabel (1, 'Jan') |
||
| Purpose | Ensures that each of the x-axis points has a label. |
| Parameters | none |
| Returns | none |
| Notes | Called internally by the .Draw() method. If the AutoXLabels property is set to true, this method makes sure that each x-axis point has an x-axis label. It calls .AddXLabel() for each point to actually add the label, with Overwrite set to 0. |
| Example | MyChart.AddXLabels() |
| Purpose | Ensures that each of the y-axis points has a label. |
| Parameters | none |
| Returns | none |
| Notes | Called internally by the .Draw() method. |
| Example | MyChart.AddYLabels() |
| Purpose | Clear an x-axis label. | ||
| Parameters | Parameter | Type | Description |
| Point | Real = 0 | The point for which to clear the x-label. | |
| Returns | None | ||
| Notes | If omitted or 0, all x-axis labels will be cleared. | ||
| Example | Clear x-axis label at point 1: MyChart.ClearLabelX(1) Clear all x-axis labels: |
||
| Purpose | Clear the y-axis labels from the LabelQ. |
| Parameters | none |
| Returns | none |
| Notes | Called internally by the .AddYLabels() method. |
| Example | MyChart.ClearLabelY() |
| Purpose | Clear data label(s). | ||
| Parameters | Parameter | Type | Description |
| Set | Long = 0 | The set to clear the data labels for. | |
| Point | Real = 0 | The point to clear the data label for. | |
| Returns | None | ||
| Notes | If Set is omitted or 0, all sets' data-labels at that point will be cleared. If Point is omitted or 0, all points within that set's data-labels will be cleared. | ||
| Example | Clear data labels for set 1 at point 3: MyChart.ClearLabelData(1, 3) Clear data labels for set 1: Clear all data labels at point 3: Clear all data labels: |
||
| Purpose | Get the data label for the specified set at the specified point. | ||
| Parameters | Parameter | Type | Description |
| Type | Long | Choose one of Label:YAxis, Label:XAxis or Label:Data. Pie Chart labels are of type Label:Xaxis. | |
| Set | Long | The set the label belongs to. X-axis labels usually belong to set 1. Y-axis labels belong to set 1 unless SeperateYAxis is on. | |
| Point | Real | The point the label belongs to. | |
| Returns | True if the fetch succeeded, False if not. | ||
| Example |
Get the data label for set 1 at point 3: MyChart.GetLabel(Label:Data, 1, 3) |
||
| Low Level Drawing Methods |
Note: Many of the low-level drawing commands take co-ordinates (x,y, width, height and so on.) You should, wherever possible, draw using relative co-ordinates, not fixed co-ordinates. If you draw with fixed co-ordinates, then the items will not scale well if the user chooses to print the graph (right-click print) or if the graph is rescaled on the window. By drawing with relative co-ordinates your drawing will scale better.
| Purpose | Call this after using the low level drawing methods to cause the drawing additions to display. |
| Parameters | None |
| Returns | None |
| Notes | If you use any of the Draw methods, and you fail to call this at the end, your drawing additions will not be displayed. |
| Example |
Draw a diagonal line through your chart, from top left to bottom right:
MyChart.SetPen(Color:Red,
Pen:Solid, 1) |
| Purpose | Draw an arc on the chart. | ||
| Parameters | Parameter | Type | Description |
| X | Long | X-coordinate of the box bounding the ellipse. | |
| Y | Long | Y-coordinate of the box bounding the ellipse. | |
| W | Long | Width of the box bounding the ellipse. | |
| H | Long | Height of the box bounding the ellipse. | |
| StartAngle | Real | In 10ths of a degree (i.e. 3600 = 360 degrees). | |
| EndAngle | Real | In 10ths of a degree (i.e. 3600 = 360 degrees). | |
| PenColor | Long | Color of the arc. | |
| FillColor | Long = Color:None | Color to fill the area bounded by the arc with. | |
| ShadeColor | Long = Color:White | Shade color for the filled area of the arc. | |
| Shade | Long = 0 | Percentage where shade highlights. | |
| StartRadius | Long = 0 | A percentage = i.e. 1 to 100. | |
| EndRadius | Long = 0 | A percentage = i.e. 1 to 100. | |
| DropHeight | Long = 0 | 3D height of the arc drop. | |
| DropColor | Long = Color:None | Color of the 3D drop. | |
| Returns | None | ||
| Notes | Basically draws Pie slices. Be sure to call .Display() to make your changes appear on the graph. The best place to call this method is in the .Draw() method after the parent call. | ||
| Example | Draw an arc starting at the top left-hand corner of the graph region in red:
MyChart.DrawArc (1, 1, 100, 100, 900, 1800, Color:Red) MyChart.Display() |
||
| Purpose | Draws an ellipse. | ||
| Parameters | Parameter | Type | Description |
| X | Long | X-coordinate of the box bounding the ellipse. | |
| Y | Long | Y-coordinate of the box bounding the ellipse. | |
| W | Long | Width of the box bounding the ellipse. | |
| H | Long | Height of the box bounding the ellipse. | |
| FillColor | Long | Color to fill the ellipse with. | |
| Returns | None | ||
| Notes | Uses the current attributes set by .SetPen(). Be sure to call .Display() to make your changes appear on the graph. The best place to call this method is in the .Draw() method after the parent call. | ||
| Example |
Draw a red circle at (20, 20): MyChart.SetPen(Color:Red,
Pen:Solid, 1) |
||
| Purpose | Draws a Line. | ||
| Parameters | Parameter | Type | Description |
| X | Long | X-coordinate of the starting point of the line, starting at the top left-hand corner. | |
| Y | Long | Y-coordinate of the starting point of the line, starting at the top left-hand corner. | |
| W | Long | Horizontal length of the line, going right from (x, y). | |
| H | Long | Vertical length of the line, going down from (x, y). | |
| Returns | None | ||
| Notes | Same as Clarion Line command. Uses the current attributes set by .SetPen(). Be sure to call .Display() to make your changes appear on the graph. The best place to call this method is in the .Draw() method after the parent call. | ||
| Example |
Draw a line that is the top-left to bottom-right diagonal in the 100x100 square starting at (10, 10):
MyChart.SetPen(Color:Red,
Pen:Solid, 2) |
||
| Purpose | Draws a single pixel. | ||
| Parameters | Parameter | Type | Description |
| X | Long | X-coordinate of the pixel. | |
| Y | Long | Y-coordinate of the pixel. | |
| Returns | None | ||
| Notes | Uses the current attributes set by .SetPen(). The last two parameters of .SetPen() are irrelevant in this case. Be sure to call .Display() to make your changes appear on the graph. The best place to call this method is in the .Draw() method after the parent call. | ||
| Example |
Draw a red pixel at (10, 15): MyChart.SetPen(Color:Red, Pen:Solid, 2) MyChart.DrawPixel(10, 15) MyChart.Display() |
||
| Purpose | Draws a polygon. | ||
| Parameters | Parameter | Type | Description |
| Array | *signed[] | An array of coordinates, [x_1, y_1, x_2, y_2, x_3, y_3 ...], containing the points of the polygon. Note that this array should have size 8 (ie.e your polygon can only have four verticies). Be sure to enter the vertices in a clockwise direction. | |
| Color | Long = Color:None | The color to fill the polygon with. | |
| Shade | Long = 0 | Shade type. Shade < 0 indicates top shade, otherwise the polygon will be right-shaded. See also the Shading Properties, which also affect the shading of the polygon. | |
| ShadeColor | Long = Color:White | The shade color for the polygon. | |
| Depth | Long = 0 | If Depth > 0 and AutoShade is on, Insight will draw a cylinder. The Depth refers to the height of the ellipse at the end of the cylinder. | |
| Pattern | Long = 0 | If you want the polygon to be filled with a pattern, fill in the equate here. See the Pattern property on the Properties Tab for a list. | |
| Horisontal | Long = 0 | Set to 1 if you want the bar to be drawn horizontally. | |
| Returns | None | ||
| Notes | Uses the current attributes set by .SetPen(). This method was originally created to draw bars for Bar graphs. Hence you will notice that, for the most, this method will only take notice of the first 8 entries in your array. You may find that using this function to draw shapes other than rectangular ones is going to be difficult. Settings such as the Shading Properties will affect how the graph is drawn. Be sure to call .Display() to make your changes appear on the graph. The best place to call this method is in the .Draw() method after the parent call. | ||
| Example |
Draw a red right-shaded square on the graph region, with bottom left-hand corner at (10, 10): a[1] = 10; a[2] = 10; a[3] = 10; a[4] = 20; a[5] = 20; a[6] = 20; a[7] = 20; a[8]= 10 MyChart.SetPen(Color:Red,
Pen:Solid, 2) |
||
| Purpose | Displays text on the graph region. | ||
| Parameters | Parameter | Type | Description |
| X | Long | X-coordinate of the bottom left-hand corner of the text. | |
| Y | Long | Y-coordinate of the bottom left-hand corner of the text. | |
| Text | Long | Text you want displayed. | |
| Rotation | Long | 0 (horizontal) or 90 (vertical) | |
| Returns | None | ||
| Notes | Similar to the Clarion Show command (but with an extra rotation parameter). Uses the current attributes set by .SetFont(). Be sure to call .Display() to make your changes appear on the graph. The best place to call this method is in the .Draw() method after the parent call. | ||
| Example |
Display the text 'Looky here' starting at (10, 10) on the graph region:
MyChart.SetFont('Arial', 12, Font:Regular,
Color:White, Charset:Ansi) |
||
| Purpose | Sets all the font attributes in preparation for a call to .Show() | ||
| Parameters | Parameter | Type | Description |
| FontName | String | Name of the font to use. | |
| Size | Long | The font size. | |
| Style | Long | The font style. | |
| Color | Long | The font color. | |
| CharSet | Long | Charset for the font. | |
| Returns | None | ||
| Example |
Display the text 'Looky here' starting at (10, 10) on the graph region:
MyChart.SetFont('Arial', 12, Font:Regular,
Color:White, Charset:Ansi) |
||
| Purpose | Sets all the pen attributes in preparation for a call to .DrawLine(), .DarwPolygon(), .DrawEllipse(), .DrawArc(), .DrawPixel(), etc. | ||
| Parameters | Parameter | Type | Description |
| Color | String | The pen color. | |
| Style | Long | The pen style. | |
| Width | Long | The pen width. | |
| Returns | None | ||
| Example |
Draw a red solid line of width 2:
MyChart.SetPen(Color:Red,
Pen:Solid, 2) |
||
| Set Manipulation Methods |
| Purpose | Loads the record in the SetQ that matches the requested set. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number, as stored in Self.SetQ.Set. | |
| Returns | True if the lookup is successful, false if not. | ||
| Example |
Manually change the set description of set 3:
If MyChart.GetSet(3) |
||
| Purpose | Set the display colors for a set. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number for the set to manipulate. | |
| PenColor | <Long> | The pen color to use. | |
| FillColor | <Long> | The fill color to use. | |
| ShadowColor | <Long> | The shadow color to use (3D only). | |
| ShadeColor | <Long> | The shade color to use (shading only). | |
| Intensity | <long> | The brightness of the light source on your objects. Should have a value between 1 and 100. Make sure Autoshading is on. | |
| Returns | None | ||
| Notes | The template edits these values on the Colors Tab of the Set Window. | ||
| Example | Change set 3's colors: MyChart.SetSetColor(3, Color:Black, Color:Red, Color:Yellow, Color:White, 75 ) |
||
| Purpose | Set attributes relating to the display of data labels for a set. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number. | |
| NoDataLabels | Byte | Set to 1 to display no data labels for this set. | |
| Format | String | The picture token to use for the data values in the data labels of this set. | |
| StartAt | Long = 0 | The how-many-eth x-axis point to start the data labeling for this set at. | |
| MouseMoveFormat | Byte = 0 | Set to 1 to use the Format to format the data set values in the mouse-over information too. | |
| Returns | None | ||
| Example |
Change set 3's data labeling attributes: MyChart.SetSetDataLabels(3, 0, '@N5.2', 1, 1) |
||
| Purpose | Assign a description to a set. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number of the set to manipulate. | |
| Description | String | The set's description. | |
| Returns | None | ||
| Notes | The description property is used as the legend text for a set. | ||
| Example | Change set 3 to be the 'Employee Count': MyChart.SetSetDescription (3, 'Employee Count') |
||
| Purpose | Force a set to be displayed as a different chart type. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number of the set to manipulate. | |
| Type | Long | The chart type to force on this set. | |
| Returns | None | ||
| Notes | You will need to call .Draw() for the changes to become apparent on screen. | ||
| Example |
Change set 3 to be displayed as a bar chart: MyChart.Draw() |
||
| Purpose | To make a set invisible on the chart, or not. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number of the set to manipulate. | |
| Visible | Long | 1 = visible, 0 = invisible. | |
| Returns | None | ||
| Notes | You will need to call .Draw() for the changes to become apparent on screen. | ||
| Example |
Make set 3 invisible: MyChart.SetSetVisible(3, 0) MyChart.Draw() |
||
| Purpose | Set the behavior for a set's y-axis. | ||
| Parameters | Parameter | Type | Description |
| Set | Long = 0 | The set number of the set to manipulate. | |
| Autoscale | Byte = 3 | Autoscale the axis? See the AutoScale property for the possible values. | |
| Minimum | Real = 0 | Force y-axis minimum. | |
| Maximum | Real = 0 | Force y-axis maximum. | |
| Step | Real = 0 | Step size between y-axis ticks. | |
| Returns | None | ||
| Notes |
If Set has the value 0 (which is its default value), the Autoscale, YAxisMin, YAxisMax and YAxisStep fields for each set will be assigned the values passed as parameters, and the YAxisMin, YAxisMax and Autoscale fields of the graph object will be assigned these values as well. Unless SeperateYAxis is set to true, the latter fields will be used to draw a single y-axis. Otherwise, the fields for each individual set will be used to draw a separate y-axis. If Set has a value other than 0, only the fields of the set with set number Set will be adjusted, and these will be used to draw its separate y-axis. |
||
| Example | Change set 3 to autoscale: MyChart.SetSetYAxis(3, True) Change set 3 to force a 0 to 100 display range on its y-axis: |
||
| Purpose | Set the behavior for a set's y-axis labels. | ||
| Parameters | Parameter | Type | Description |
| Set | Long | The set number of the to manipulate. | |
| NoY | Byte = 0 | Set to 1 to display no y-axis labels for this set. | |
| Short | Byte = 0 | Set to 1 to have the y-axis labels for this set displayed in short form. | |
| Unit | Byte = 0 | If Short = 1, set this to 1 to add a unit behind each short label. | |
| Format | String | The format for the y-axis labels of this set. | |
| Returns | None | ||
| Notes | Unless SeperateYAxis is not set to true, the ShowYLabels, ShortYAxisLabels, ShortYAxisLabelsUnit and YFormat properties will be used to label a single y-axis. SeperateYAxis needs to be set to true for the fields for each individual set to be used to label a separate y-axis. | ||
| Example |
Specify the y-axis labeling information for set 3: MyChart.SetSetYAxis(3, False, 0, 0, '@N5.2') |
||
| Purpose | Sort set information for a Pareto chart. | ||
| Parameters | Parameter | Type | Description |
| SortStyle | <Long> | The sort style to use. | |
| SortSet | <Long> | The set number for the set to sort. | |
| Returns | None | ||
| Notes | If SortStyle = 1 or 0 then sorting is done with the greatest values at the top. If SortStyle = -1 then sorting is done with the greatest values at the bottom. |
||
| Example | Sort all sets with highest value on top: MyChart.SortSets(1) |
||
| Purpose | Swap the processing order of two sets of data. | ||
| Parameters | Parameter | Type | Description |
| Set1 | Long | The set to move. | |
| Set2 | Long = 0 | The set to swap with. | |
| Returns | None | ||
| Notes | If Set2 is omitted, the sets will be cycled as follows:
If Set1 is positive, the first set becomes the last set. If Set1 and Set2 are supplied, then the sets are swapped. |
||
| Example | Cycle the data sets so that the first set is moved to the back: MyChart.SwapSets(1) Swap sets 3 and 5: |
||
| Rendering Methods |
| Purpose | Draw the chart on the target. |
| Parameters | None |
| Returns | None |
| Notes | This will draw the chart on the currently selected target. If the chart is to be drawn on a report, the target must be explicitly set by calling SetTarget(), and the ReportBand property must be set to the report target band where the chart is. |
| Example | Draw the chart: MyChart.Draw() |
| Purpose | Prints the graph. | ||
| Parameters | Parameter | Type | Description |
| DeviceName | String | The printer for the output. If this is blank then the "current" printer is used. | |
| ProgrammerID | Long = 0 | This method calls .SetReportProperties() with this ID - you can use it to decide which part of the code embedded in .SetReportProperties() you want to execute, if necessary. | |
| Width | Long = 220 | Width of output generated. | |
| Height | Long = 170 | Height of output generated. | |
| Returns | None | ||
| Notes | Note that the Right-Click Print calls this method with a ProgrammerID of 255. Note: In beta 6 and before, this was also used to create WMF files. You should now use the .SaveAs() method to create BMP or PNG files. | ||
| Example |
Print the graph to the current printer: Print the graph to the Laser Series Printer: Print the graph to the current printer, with dimensions 100x100:
|
||
| Purpose | Call this if the control resizes. |
| Returns | None |
| Notes | Call this procedure if the graph control changes size. This is called automatically when the .Reset() method is called. Call the .Draw() method after calling this if you want the graph itself to redraw. |
| Example |
Resize the graph:
ThisGraph1.Resize() |
| Purpose | Saves the graph as a BMP or PNG file. |
| Returns | None |
| Notes |
Call this method to save the graph into either BMP or PNG format. If you are wanting to display the graph later in a Clarion program then use the BMP format (Clarion's Image control can't display PNG images). However, if you are wanting to use the image on a web server then use the PNG format. This is a compressed format, suitable for graphs, which browsers can display. FAQ: Why PNG and not JPG or GIF? PNG files are losslessly compressed, unlike JPG which is lossy. JPGs tend to corrupt edges quite badly, which means they are not suitable for images with text or fine detail. GIF images are not supported as the format is patented by Unisys, which means a licensing fee would need to be paid by CapeSoft for using the GIF format, as well as by you as a programmer implementing GIF support in your application, as well as a fee for each copy of the software sold. The license fee starts at around $2500. |
| Example | ThisGraph1.SaveAs('c:\windows\graph1.bmp') ThisGraph1.SaveAs('graph1.bmp') ThisGraph1.SaveAs('graph1.png') |
| Purpose | Sets the default data or axis style. | ||
| Parameters | Parameter | Type | Description |
| Style | Byte | The built in style number to use. There are currently 28 axis styles and 12 data styles. | |
| StyleType | Byte = Style:Data | Valid options are Style:Data and Style:Axis. | |
| Returns | None | ||
| Example | Set the default axis and data styles: ThisGraph1.SetStyle(4, Style:Data) ThisGraph1.SetStyle(2, Style:Axis) |
||
| Purpose | Display a subset of the chart's data. | ||
| Parameters | Parameter | Type | Description |
| Factor | Real = 0 | The zoom factor with respect to the original 100% graph. Choose a value between 0 and 100. | |
| Relative | Real = 0 | The zoom factor with respect to the current (zoomed) part of the graph you are seeing. Set Factor to 0 if you want to use this. | |
| MiddlePoint | Real = 0 | The point that will be the middle of the subset. | |
| DontDraw | byte = 0 | Set to 1 if you don't want .Zoom() to call .Draw() to reflect the changed zoom factor. | |
| Returns | None | ||
| Notes | If the MiddlePoint is omitted or 0, a call to .GetPoint() will be made, and this point will be used. .Zoom() manipulates the ShowFromPoint and ShowToPoint properties. A call to .Draw() is made just before the method completes, unless you pass DontDraw = 1. The ZoomPoint property is set and used by .Zoom() (it contains the last value of MiddlePoint or the result of .GetPoint()), and so is the Zoom property. | ||
| Example | Zoom in 25% at the current point: MyChart.Zoom(25) |
||
| Embed Points |
| Purpose | Creates an embed point in .Draw() after the data labels have been processed but before they have been drawn to enable you to change the fonts of the individual labels. |
| Parameters | Zippo. |
| Returns | Also none. |
| Notes |
See the section on the LabelQ for some nifty example code. Also, if you are using the template, make sure you tick the Generate SetLabelFonts() option on the Advanced Tab if you are going to embed code here. |
| Purpose | Creates an embed point in .ResetQueue() after the view is opened but before any of its records are read. | ||
| Parameters | Parameter | Type | Description |
| ViewName | View | The view that is about to be processed by .ResetQueue(). | |
| Returns | None | ||
| Notes |
Embed any code here that you would like to execute after the view has been opened but before any of its records are read. Note that this method will only be generated by the template if you are using an SQL backend. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||
| Purpose | Creates an embed point in .Data() after the all the Data Properties of the current data point have been set but before this data point is Put back in the DataQ. | ||
| Parameters | Parameter | Type | Description |
| ID | Long | This is the ID as was assigned by .AddItem(). | |
| Returns | None | ||
| Notes |
This method can be used to embed any code that you would to execute after a data point's attributes have been set but before it has been Put back in the DataQ. Note that this method will only be generated by the template if you have specified some Conditional Point Overrides on the Colors Tab of one of your sets. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||
| Example |
Make all data points at x-axis point 2 red and of triangular shape: IF self.DataQ.Point = 2 self.DataQ.FillColor = Color:Red self.DataQ.Shape = Insight:Triangle END |
||
| Purpose | Creates an embed point in .ResetQueue() allowing you to to specify the point name for every x-axis point, providing it has not yet been assigned by, for example, a call to .AddItem(). To make sure the template generates this method you need to enter a '+' in the Point Name field of the X-Axis Tab. | ||
| Parameters | Parameter | Type | Description |
| ID | Long | This is the ID as was assigned by .AddItem(). | |
| Returns | The point name. | ||
| Notes |
If the point name is stored in the View or Queue, it would typically have been assigned by .AddItem(). If the point name for a given point is not yet assigned then .SetPointName() will be called for that point. You can embed code here that modifies the return value to a custom point name of your choice. Note that to make sure the template generates this method you need to enter a '+' in the Point Name field of the X-Axis Tab. If this is not the case and you try to embed code in this method, you may get an error as described in the Common Errors Section of the User Guide. |
||
| Example |
See also Making your own Point Names in the FAQ. Change the point name for each point to the appropriate month abbreviation:
|
||
| Purpose | Creates an embed point in .ResetQueue() allowing you to to specify the point number for every x-axis point, providing it has not yet been assigned by, for example, a call to .AddItem(). | ||
| Parameters | Parameter | Type | Description |
| ID | Long | This is the ID as was assigned by .AddItem(). | |
| Returns | The point number. | ||
| Notes |
If the point number is stored in the View or Queue, it would typically have been assigned by .AddItem(). If the point number for a given point is not yet assigned then .SetPointNumber() will be called for that point. You can embed code here that modifies the return value to a custom point number of your choice. Note that this method will only be generated by the template if either the Point Number on the Main X-Axis Tab or the Point Number on one of your Set's X-Axis Tabs is an expression. You can force this by entering a single '+' in the entry. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||
| Example | Change the point number for each point to the month number:
execute month(fil:date) ReturnValue = 1 ReturnValue = 2 ReturnValue = 3 ReturnValue = 4 ReturnValue = 5 ReturnValue = 6 ReturnValue = 7 ReturnValue = 8 ReturnValue = 9 ReturnValue = 10 ReturnValue = 11 ReturnValue = 12 end |
||
| Purpose | Creates an embed point in .ResetQueue() allowing you to to specify the closing value for each record of the view or queue with id number ID, providing it has not yet been assigned by, for example, a call to .AddItem(). If the FC parameter of .AddItem() is omitted, this method is called by .ResetQueue() for each record of the queue or view. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||
| Parameters | Parameter | Type | Description | ||||||||||
| ID | Long | This is the ID as was assigned by .AddItem(). | |||||||||||
| Returns |
The closing value for the current record. |
||||||||||||
| Notes |
See also .AddItem() for more details.
Note that this method will only be generated by the template if the Close Field on one of your Set's Set Tabs is an expression (providing your graph is a Gantt or Hi-Lo chart). You can force this by entering a single '+' in the entry. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||||||||||||
| Example |
Make the closing value the current time (for a Gantt graph): ReturnValue = clock() |
||||||||||||
| Purpose | Creates an embed point in .ResetQueue() allowing you to to specify the high value for each record of the view or queue with id number ID, providing it has not yet been assigned by, for example, a call to .AddItem(). If the FH parameter of .AddItem() is omitted, this method is called by .ResetQueue() for each record of the queue or view. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||
| Parameters | Parameter | Type | Description | ||||||||||
| ID | Long | This is the ID as was assigned by .AddItem(). | |||||||||||
| Returns | The high value for the record. | ||||||||||||
| Notes |
See also .AddItem() for more details.
Note that this method will only be generated by the template if the High Field on one of your Set's Set Tabs is an expression.You can force this by entering a single '+' in the entry. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||||||||||||
| Example |
Choose a random value for the top of each bar of your Bar graph: ReturnValue = random(1, 100) |
||||||||||||
| Purpose | Creates an embed point in .ResetQueue() allowing you to to specify the low value for each record of the view or queue with id number ID, providing it has not yet been assigned by, for example, a call to .AddItem(). If the FL parameter of .AddItem() is omitted, this method is called by .ResetQueue() for each record of the queue or view. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||
| Parameters | Parameter | Type | Description | ||||||||||
| ID | Long | This is the ID as was assigned by .AddItem(). | |||||||||||
| Returns | The low value for the record. | ||||||||||||
| Notes |
See also .AddItem() for more details.
Note that this method will only be generated by the template if the Low Field on one of your Set's Set Tabs is an expression. You can force this by entering a single '+' in the entry. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||||||||||||
| Example |
Choose a random value for the bottom of each bar of your Bar graph: ReturnValue = random(1, 10) |
||||||||||||
| Purpose | Creates an embed point in .ResetQueue() allowing you to to specify the opening value for each record of the view or queue with id number ID, providing it has not yet been assigned by, for example, a call to .AddItem(). If the FO parameter of .AddItem() is omitted, this method is called by .ResetQueue() for each record of the queue or view. The actual effect of this value depends on the graph type. See the Notes below for details. | ||||||||||||
| Parameters | Parameter | Type | Description | ||||||||||
| ID | Long | This is the ID as was assigned by .AddItem(). | |||||||||||
| Returns | The opening value for the record. | ||||||||||||
| Notes |
See also .AddItem() for more details.
Note that this method will only be generated by the template if the Open Field on one of your Set's Set Tabs is an expression (providing your graph is a Gantt or Hi-Lo chart).You can force this by entering a single '+' in the entry. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||||||||||||
| Example |
Choose a random value for the opening value of each bar of your Hi-Lo graph: ReturnValue = random(1, 10) |
||||||||||||
| Purpose | Creates an embed point in the .PrintGraph() method allowing you to set additional report properties (for example the paper size, report orientation, and so on) before the internal report is printed by PrintGraph(). To make sure the template generates this method you need to go to the Advanced Tab of your Insight control and tick the Generate SetReportProperties() checkbox. | ||
| Parameters | Parameter | Type | Description |
| ProgrammerID | Long | This is the ProgrammerID that was passed to .PrintGraph(). You can set this to any value when calling .PrintGraph() and then use it here to decide which part of the embedded code should be executed, if necessary. | |
| Returns | None | ||
| None | Note that to make sure the template generates this method go to the Advanced Tab of your Insight control and tick the Generate SetReportProperties() checkbox. If this is not the case and you try to embed code in this method, you may get an error as described for .SetPointName() in the Common Errors Section of the User Guide. | ||
| Example | See Manually Printing Screen Graphs in the User Guide. | ||
| Purpose |
Creates an embed point in .ResetQueue() allowing you to specify the set number for each record of the view or queue with id number ID, providing that the Set parameter passed to .AddItem() for this view or queue was 0. In this case, this method is called by .ResetQueue() for each record of the queue or view. Use this embed point if you wish the data of a particular view or queue to span multiple sets. |
||
| Parameters | Parameter | Type | Description |
| ID | Long | This is the ID as was assigned by .AddItem(). | |
| Returns | The set number value for the record. | ||
| Notes |
Use this embed point if you wish the data of a particular view or queue to span multiple sets. Note that this method will only be generated by the template if you have chosen to Override the Set Number to a non-fixed value. If this is not the case and you try to embed code in this method, you may get an error similar to the one described for .SetPointName() in the Common Errors Section of the User Guide. |
||
| Example |
Assign the set number of each member of the queue depending on its name: if PlottingQueue.Name = 'Sales' ReturnValue = 1 elsif PlottingQueue.Name = 'Returns' ReturnValue = 2 end |
||
| Purpose |
Creates an embed point in .ResetQueue() allowing you validate the current record in the view or queue before it is processed. This method is called by .ResetQueue() for each record of the queue or view with id number ID. If it returns false, the current record in the view or queue will be ignored. |
||
| Parameters | Parameter | Type | Description |
| ID | Long | This is the ID as was assigned by .AddItem(). If you are using the template, this is basically the set number of the current set being processed. | |
| Returns | True or false, depending on whether the record is valid. | ||
| Notes | You can also use this method to specify an expression for the parent field entered in .AddItem(). In this case, a variable would have been passed as the parent field (PF) in .AddItem(), and you should set this variable in this embed point to whatever expression you need. | ||
| Example |
The below illustrates how to implement the suggestion mentioned in the Notes above, where ID is being passed as parameter to this ValidateRecord method, and ThisGraph5:Parent:1 is the variable that was passed as the parent field to .AddItem(): ReturnValue
= Parent.ValidateRecord(ID) ThisGraph5:Parent:1 = MAJ:Number + 1 end |
||