Overview

Welcome to 3DChart version 7.0

The 3DChart v7.0 is a high quality ActiveX component, which uses the OpenGL 3D engine to display sophisticated charts with stunning visual effects. The key features of the component are:

  • 32- bit ActiveX component for Visual Basic and other ActiveX compatible environments (Visual C++, Delphi, Microsoft Office and many more). Fully supports the .NET environment.

  • Build on OpenGL technology. 3DChart simply shines on machines with OpenGL accelerated video cards.

  • Specially optimized for speed and memory performance. 3DChart can display thousands of data points with ease and at the same time is guaranteed to have a small memory footprint.

  • Easy and comprehensive and yet powerful object model - no matter what experience you have in charting you will literally be able to create complex charts in hours. With 87 objects containing 557 properties and 442 methods 3DChart is definitely the most powerful charting tool available on the market.

  • State of the art Microsoft - like visual interface available at runtime.

  • Ability to display 23 chart types with lots of different style and logic variations and unique visual effects. 3DChart enables you to create presentation quality "out of the box" charts with ease.

  • More than 30 predefined financial and statistical functions.

  • Ability to display multiple charts in the same charting canvas and describe them on one or more legends. This feature of 3DChart is just unique.

  • Direct connection to any ADO data source. The ADO database integration is so flexible that you can even extract the tooltips and the text alignment of the individual data points.

  • Seamless ASP and ASP.NET integration. You can create a dynamic client side by just visually editing the component. Configuring the chart to work on ASP and ASP.NET servers is done with a helper application - no code is required to manage your temporary native state, active content or image files. Inserting the chart in the ASP or ASP.NET page is done with one function call. 3DChart is user agent sensitive and can generate different responses to different browsers. Increased security features.

  • Flexible integrated legend able of displaying almost any descriptive information you want.

  • Advanced control over the axis scaling and position - there is no scale mode that we do not support and the axes can be displayed at any position you may think of.

  • Annotations can be positioned on arbitrary positions enabling you to increase the readability of the created images.

  • Ability to display several charting types simultaneously. Here 3DChart is simply unbeatable, because it can show two charts on the same data serie as well as position the chart at any location of the floor grid.

  • Ability to display multiple charts and legends in the component canvas.

  • Advanced control over the OpenGL rendering engine. You can create a grayscale, jittered or antialized images with just one click.

  • Export to JPEG, PNG, Bitmap, Targa, Tiff or native Chart format. The component can also export PNG, Tiff and Targa images with transparent background.

  • The chart data can be exported to HTML, XML and tab delimited text files.

  • Support for SVG and HTML image maps.

  • Ability to generate WML output for WAP devices. Monochrome bitmap support.

  • The component fully uses the Nevron LLC 3D ActiveX standard. There is not a single surface on which you cannot assign an Animated Texture and material including texts! Some of the visual effects that you can generate with the standard Nevron objects are not even present in professional 3D modeling studio applications.

  • Unique export to code feature. The component can generate the code necessary to replicate the current component state in one of the following programming languages: Visual Basic, VBScript, JScript, C++ and C#.

  • Supports Windows XP look and feel.

  • Supports Unicode and Localization to different languages.

Enjoy using this professional ActiveX control and don’t forget to check out for more new and exciting Nevron ActiveX components.
© 1998 - 2002 NEVRON LLC. All rights reserved.


Documentation Formating

This documentation uses the following formatting:

Object Type | Example
Method or Property | UseXValue, SetPredefinedProjection
Object | NChart
Custom type | AxisType, atLeftAxis
VB Type | Long
Example | NChart1.Redraw = True


Data Storage

Data Storage. Passing data to 3DChart. Data Ranges

Data Storage Architecture. The storage of the data is the core of every charting tool. The Data Storage of the 3DChart is a three dimensional array containing NData objects. Each NData object represents an individual data point. The dimensions of the Data Storage along the x, y and z dimensions depend on the sizes of the Categories, Series and Labels collections respectively. The following figure visually represents data storage with 6 categories, 6 series and 6 levels.

What are levels and why do we need them? Some charting types (stack bars for example) need several data points on the same cell in the grid to be displayed properly. This problem has several solutions and one of them is to specify different serie for each stack and the other one is to simply have several data points at the same cell e.g data levels or simply levels.

You can gain access to a particular data point in the data storage with the help of the DataAt method of the NChart object. This method takes three parameters specifying the index of the data item in the data storage. For example if you want to access the red data item on the figure you must write the following code:

Dim data as NData
Set data = NChart1.DataAt(2, 0, 2) // Category 2, Serie 0, Level 2

While accessing the blue data item will require you to specify a different index:

Dim data as NData
Set data = NChart1.DataAt(5, 2, 3) // Category 5, Serie 2, Level 3

Just having some data in the chart data storage is not enough to create a chart – you need to present it somehow. This is achieved with the help of the presentation groups, which we will discuss in detail later in this documentation. Presentation groups need to know exactly which data from the data storage are they showing and that is why each presentation group has a NRange object. With the help of the NRange you specify a range of values from the data storage. For example if you want to specify for display the green area from figure 1, you will have to write code similar to this:

Range.BeginX = 3
Range.InfiniteX = True
Range.BeginY = 0
Range.EndY = 2
Range.BeginZ = 0
Range.EndZ = 0

Except the InfiniteX, InfiniteY and InfiniteZ the other properties of the NRange object are self explanatory - they just help you define a range of values in a three dimensional array. The InfiniteX, InfiniteY and InfiniteZ flags ignore the respective end coordinated and replace it with the biggest available one. This is very useful, since you will probably dynamically change the categories, series and levels of the data storage and it will be very inconvenient to specify an exact ending coordinate each time.

Data Types. The NData items stored in the data storage can have different properties, although all NData items in the data storage have the same properties (the data storage is homogenous). The available NData properties are determined by the current data storage data type. Each data type has a major and minor type value. The major value describes the number of values that the data point has. The minor value determines whether the data point has other properties like fill effect, material, border, color, mouse response and label. The following table shows the relationship between the available properties and the data storage data types:

Data Type | Major Value | Minor Value | V1 | V2 | V3 | V4 | V5 | V6 | Color | Fill Effect | Material | Border | Annotation | Text Ex | Mouse Response | Label
Data Types with 1 value
dtDataType11 | 1 | 1 | + | - | - | - | - | - | - | - | - | - | - | - | - | -
dtDataType12 | 1 | 2 | + | - | - | - | - | - | + | - | - | - | - | - | - | -
dtDataType13 | 1 | 3 | + | - | - | - | - | - | + | - | - | - | - | - | - | +
dtDataType14 | 1 | 4 | + | - | - | - | - | - | - | + | - | - | - | - | - | +
dtDataType15 | 1 | 5 | + | - | - | - | - | - | - | + | + | + | - | - | + | +
dtDataType16 | 1 | 6 | + | - | - | - | - | - | - | + | + | + | + | + | + | +
Data Types with 2 values
dtDataType21 | 2 | 1 | + | + | - | - | - | - | - | - | - | - | - | - | - | -
dtDataType22 | 2 | 2 | + | + | - | - | - | - | + | - | - | - | - | - | - | -
dtDataType23 | 2 | 3 | + | + | - | - | - | - | + | - | - | - | - | - | - | +
dtDataType24 | 2 | 4 | + | + | - | - | - | - | - | + | - | - | - | - | - | +
dtDataType25 | 2 | 5 | + | + | - | - | - | - | - | + | + | + | - | - | + | +
dtDataType26 | 2 | 6 | + | + | - | - | - | - | - | + | + | + | + | + | + | +
Data Types with 3 values
dtDataType31 | 3 | 1 | + | + | + | - | - | - | - | - | - | - | - | - | - | -
dtDataType32 | 3 | 2 | + | + | + | - | - | - | + | - | - | - | - | - | - | -
dtDataType33 | 3 | 3 | + | + | + | - | - | - | + | - | - | - | - | - | - | +
dtDataType34 | 3 | 4 | + | + | + | - | - | - | - | + | - | - | - | - | - | +
dtDataType35 | 3 | 5 | + | + | + | - | - | - | - | + | + | + | - | - | + | +
dtDataType36 | 3 | 6 | + | + | + | - | - | - | - | + | + | + | + | + | + | +
Data Types with 4 values
dtDataType45 | 4 | 5 | + | + | + | + | - | - | - | + | + | + | - | - | + | +
dtDataType46 | 4 | 6 | + | + | + | + | - | - | - | + | + | + | + | + | + | +
Data Types with 5 values
dtDataType55 | 5 | 5 | + | + | + | + | + | - | - | + | - | - | - | - | - | +
dtDataType56 | 5 | 6 | + | + | + | + | + | - | - | + | + | + | + | + | + | +
Data Types with 6 values
dtDataType65 | 6 | 5 | + | + | + | + | + | + | - | + | + | + | - | - | + | +
dtDataType66 | 6 | 6 | + | + | + | + | + | + | - | + | + | + | + | + | + | +

Choosing the best data type greatly depends on the chart type you want to create. In general you must try to use minor data types since they require less memory. For example if you want to display a surface chart with contour filling the only information that each data point must possess is its elevation. In this case you can safely use dtDataType11. Other charts on the other hand require more information to be displayed properly. A nice example is the Stock chart which might require up to six values for each data point. In this case you will have no choice, but to switch to dtDataType65. The default data type of the data storage is dtDataType35.

Data types with bigger major types can be used to display charts that require smaller major types, although some of the values will not be used. In this case we say that the data types are compatible. In general data types with bigger major types are compatible with data types with smaller data types.

For example: What happens if you want to display two chart types simultaneously, but they require different data types? In this case you must simply set the data storage to have the bigger data type.

The following code changes the data type of the data storage to dtDataType55:

NChart1.DataStorage.DataType = dtDataType55

Data Storage Paging. Frequent changes in the sizes of the Series, Categories and Levels collections beyond the specified page size for the respective dimension may lead to frequent memory reallocations, which will slow down performance. So if you want to optimize your component for frequent changes in one of the data storage dimensions simply specify a bigger page size for this dimension. For example if you intend to frequently change the series of the component at runtime and you expect them to vary from 5 to 10 you can safely set the serie page size to 10 with the following code:

NChart1.DataStorage.SeriePageSize = 10

Of course you don’t have to deal with data storage paging if you don’t have any special speed and memory requirements. The default values of the pages are:

CategoriesPageSize = 20
SeriesPageSize = 1
LevelsPageSize = 1

As you can see frequent changes in the size of the categories will seldom require memory reallocation, while any change in the series and levels size will require memory reallocation.


Categories, Series and Levels

The dimensions of the data storage are synchronized with the sizes of three collections of NAxisParameter objects. These collections represent the Categories, Series and Levels of the 3DChart component.

As we will discuss later in this documentation the axes of the 3DChart component can operate in several modes one of which shows the labels contained in each NAxisParameter object on the corresponding axis. The Categories are displayed on the Categories axis, the Series on the Series axis and the Levels can be displayed on one of the four vertical axes.
The Categories, Series and Levels collections are accessed with the help of the Categories, Series and Levels methods of the NChart object. For example the following code creates 3 categories, 2 series and 2 levels:

‘add three categories
NChart1.Categories.Add "Category1", True
NChart1.Categories.Add "Category2", True
NChart1.Categories.Add "Category2", True

‘ add two series
NChart1.Series.Add "Serie1", True
NChart1.Series.Add "Sertie2", True

‘ add one level (there is one by default)
NChart1.Levels.Add "Level2", True

It is sometimes a burden to add categories and series one by one especially if you want to display charts with hundreds of data items. That is why the Categories, Series and Levels collection have a method called SetSize, which resizes the collection to the desired size and automatically assigns some labels to its members. For example the following code creates 100 categories and 50 series.

NChart1.Categories.SetSize 100, True
NChart1.Series.SetSize 50, True


Chart Dimension

Chart Dimensions

The size of the charting area along the x, y and z dimensions in the OpenGL rendering space is easily controlled by the ChartWidth, ChartDepth and ChartHeight properties of the NChart object. If you want for example to make more space for the categories you can increase the ChartWidth of the chart area with code similar to this:

NChart1.ChartWidth = 3


Chart margins

Chart margins are a very convenient way to place your chart relatively in the control window. They define an area called chart area where the chart is positioned. The control guarantees that the chart walls and contents will not be displayed outside the chart area. Margins are specified in percents of the control window width and height. There are four margins as you might expect - Left chart margin, Right chart margin, Top chart margin and Bottom chart margin. Margins are specified in percents of the control window width (left and right margin) and control window height (top and bottom margin). The left chart margin must be always smaller or equal to the right one. The same rule is valid for the top and the bottom margin. To modify the chart margins you must change the LeftMargin, RigthMargin, TopMargin and BottomMargin properties of the NChart or NChartManager objects. By default the chart is positioned at LeftMargin = 10, TopMargin = 10, RightMargin = 90 and BottomMargin = 90. The following code modifies the default chart margins in order to display the chart in the upper left corner of the control window

NChart1.LeftMargin = 10
NChart1.TopMargin = 10
NChart1.RightMargin = 50
NChart1.BottomMargin = 50

Another very useful property related with chart margins is the ability to control the algorithm used to fit the chart into the chart area. The default algorithm is trying to scale the chart in all dimensions (X, Y, Z) proportionally. This algorithm (or margin strategy) is called Fit. There are cases however when this scaling is not desired - for example in a 2D bar chart that needs to be stretched along the width and height of the chart. In such cases you can take advantage of the Stretch algorithm. The following VB code snippet changes the default Fit algorithm to Stretch:

NChart1.MarginStrategy = msStretch

The possible values for the MarginStrategy property are msFit, msStretch and msNoMargins. When the MarginStrategy is set to msNoMargins the chart does not try to fit into the chart area. In this mode only the N3DView object properties control the chart dimensions. Following are some simple bar chart screenshots that illustrate how the Fit and Stretch margins strategies work in practice:

Fit margin strategy

Stretch margin strategy

Notice that in the above chart there is a smooth edge rectangle occupying the chart area. This is because we enabled the backplane object associated with the chart area. The properties of this object are available through the MarginBackplane method of the NChart or NChartManager objects. The following line of VB code makes the margin backplane visible:

NChart1.MarginBackplane.Visible = True

For more information on the NBackplane object refer to the "Working with backplanes" topic in the users guide or the NBackplane object description in the object reference.

Related examples. The multiple charts and legend example located in 3DChart\VB\MultipleCharts\General directory illustrates how to work with margins in practice.


Presentation Groups

Overview. As their name suggests presentation groups help you to present ranges of values from the Data Storage in different ways. The component stores the created presentation groups in a collection accessible with the help of the PresentGroups method of the NChart object.

Types of Presentation Groups. Currently the 3DChart supports the following types of presentation groups:

Bar - single or multi column chart (depending on the number of Levels specified in the presentation group range). The style of the bars can be a bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, smooth edge bar or cut edge bar. In the case of smooth or cut edge bar the user is able to control the edge size as well as whether the top and bottom edges are displayed in the specified manner (cut or smoothed). The user can control the axis on which each column is scaled as well as the origin of each column.

Stack Bar Chart - classical stack bar. The number of stacks is determined by the number of data levels covered by the range of this presentation group. The style of the bars can be a bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, smooth edge bar or cut edge bar. In the case of smooth or cut edge bar the user is able to control the edge size as well as whether the top, bottom and middle edges (the ones between the segments in the piles) are displayed in the specified manner (cut or smoothed).

Area - areas beginning from the chart floor. The user can specify a custom area origin as well as show drop lines. The area can be displayed in stairs mode (hisotogram chart). The user can position the data points at arbitrary X positions, which enables the creation of data time area charts.

Stack Area - stacked or stacked percent area chart. The user is able to display percent, cumulative or absolute stack values on data points. The visibility of the drop lines can be controlled. The stack area can be displayed in stairs mode.

Line - line as tube, tape or simple line with value point marks. The shape of the value point marks can be a bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, sphere, circle, diamond, cross, diagonal cross or star. The line can be configured as a XY or XYZ scatter plot. The lines can be visualized in stairs mode.

Stack Line - stack or stack percent lines displayed as tube, tape or simple line with value point marks. The shape of the value point marks can be a bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, sphere, circle, diamond, cross, diagonal cross or star. The lines can be visualized in stairs mode.

Surface - surface that connects the adjacent data values. Lots of different frame and fill styles are supported. XYZ surface mode is supported. Surface can be displayed with holes. Advanced control over the applied palette.

Point - points chart. The shape of the value point marks can be a bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, sphere, circle, diamond, cross, diagonal cross or star. It can also be configured as a XY or XYZ scatter plot. Join lines can be displayed to the chart walls.

Bubble - bubble chart. The shape of the bubbles can be a bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, sphere, circle, diamond, cross, diagonal cross or star. The user can control the minimal and maximal bubble sizes.

Stock Chart - stock chart (Open - High - Low - Close - Volume). Lots of different stock charts are supported. The user can change the candle style to stick or bar, show the open and close values and scale the volume on a different axis. Data points can be positioned on arbitrary X position, which enables the creation of date - time stock charts. The high - low line visibility can also be controlled.

Float Bar - floating bar. The style of the bars can be a bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, smooth edge bar or cut edge bar. In the case of smooth or cut edge bar the user is able to control the edge size as well as whether the top and bottom edges are displayed in the specified manner (cut or smoothed).

Pie - pie chart. The shape of the pie segments can be a torus, pie or smooth edge pie. The user can control the begin angle, depth, pie radius and total pie angle. Grouping of small slices below a specified value or percent. The pie slices can be sorted in ascending or descending manner.

Doughnut - doughnut chart. The doughnut can de displayed with segment or torus styles. The user is able to control the radius, begin angle and detachment of individual rings. The doughnut segment texts can be displayed vertically or horizontally. The user has control over the individual doughnut segments borders.

Radar - radar chart (or also called spider chart). The user is able to show data point marks on individual data items as well as fill the area surrounded by the data points (filled area radar chart).

Polar - polar chart. The user is able to show data point marks on individual data items, control the begin angle and angle step of the radian lines. Wind - rose labels with controlled angle step can be displayed. The user can control the closing of the polar contour.

Shmoo - shmoo chart. This chart is widely used in the semiconductor industry to show the device response to two or three parameters. The user can hide all fail bits and highlight the first fail ones for one of the three possible parameters.

High - Low - High - Low chart. The depth of the high - low area can be controlled in percents of the serie depth. The user can control the appearance and visibility of the drop lines separating the high - low area segments.

Map - Map chart. This charting types gives you the possibility to display custom polygons (which can be even self intersect and non convex). The user can fill the polygons with an automatic or custom palette.

Arrow - Arrow chart. The component displays directed arrows specified by beginning and ending points. The user can control the width of the arrows.

Error - Error chart. The component will display the error relative to a base value. Lots of error styles are supported. The user can control the appearance of the error line as well as its width. The error can be specified in percents of the base value.

Error Bar - Error Bar chart. The component displays the error relative to a base value. The base value is represented with a bar. Lots of different styles are supported. The user can display the data points at arbitrary x positions. The error can be specified in percents of the base value.

Smooth Line - Smooth Line chart. The component displays interpolated cubic splines between the data points. The shape of the interpolation curve can be a tube, plane or simple line. The user can control whether the presentation group interprets Value2 as X position of the data point. When the presentation group is operating in this mode the user can choose from two available interpolation strategies.

Function - Function chart. The component displays a function based on an user specified function expression. The arguments in this expression specify data series from the data storage. Supported are more than 30 predefined financial and statistical functions.

Data Storage Requirements. Each presentation group has requirements for the current major data type of data storage (presentation groups need different number of values for each data point). For example if you want to display a stock chart and the current data storage type is dtDataType35 (the default one) the visualization of the stock will fail because the stock chart needs at least 4 values at each data point in order to be displayed properly. The solution is to set the data type to a data type with major number 4 or more.

The following table describes the requirements of each presentation group.

Presentation Group | Required Major Data Type | Data Usage
Bar | 1 | Value1 is the value of the bar
Stack Bar | 1 | Value1 is the value of the stack bar
Area | 1 or 2 | Value1 is the value of the area Value2 is X position if UseXValue is set to True
Stack Area | 1 | Value1 is the value of the area
Line | 1, 2 or 3 | Value1 is the elevation of the data point. Value2 is X position if UseXValue is set to True Value3 is Y position if UseYValue is set to True
Stack Line | 1 | Value1 is the value of the line
Surface | 1 | Value1 is the elevation of the data point
Point | 1, 2 or 3 | Value1 is the elevation of the point Value2 is X position if UseXValue is set to True Value3 is Y position if UseYValue is set to True
Bubble | 3 | Value1 is X position of the bubble Value2 is Y position of the bubble Value3 is bubble size
Stock Chart | 4,5 or 6 | Value1 is the Open value Value2 is the High value Value3 is the Low value Value4 is the Close value Value5 is the Volume value if HasVolume is set to True Value6 is X position if UseXValue is set to True
Float Bar | 2 | Value1 is the begging of each bar Value2 is the end of each bar
Pie | 2 | Value1 is the value of the pie segment Value2 is the detachment of the pie from the center
Doughnut | 4 | Value1 is the value of the doughnut segment Value2 is the detachment of doughnut segment from the center Value3 specifies the text orientation of the doughnut segment text: 0 - horizontal, 1 - vertical Value4 specifies the border mode of the ring segment: 0 - all borders, 1 - between rings only, 2 - between segments only, 3 - no borders at all
High Low | 2 | Value1 is high value Value2 is low value
Map | NA | The map does not use the data storage Value2 is low value
Radar | 1 | Value1 is distance from radar center
Polar | 2 | Value1 is distance from polar center (radius) Value2 is data point rotation (angle)
Shmoo | 2 | Value1 is pass - fail bit (pass = 1, fail = 0) Value2 is hide - show bit ( hide = 1, show = 0)
Arrow | 4 | Value1 and Value2 are the (x,y) coordinates of the arrow end point. Value3 and Value4 are the (x,y) coordinates of the arrow begin point.
Error | 2 | Value1 is base value Value2 is deviation from base value. Can be specified in percents of the base value.
Error Bar | 2 | Value1 is base value represented as a bar. Value2 is deviation from base value. Can be specified in percents of the base value.
Smooth Line | 1 or 2 | Value1 is the elevation of the data point. Value2 is X position if UseXValue is set to True
Function | maximum data point value used by the arguments | Specified by the function arguments

Common Presentation Group Features. All presentation groups have some properties and methods that are common for all of them. These properties are grouped in an automation object called NPresentGroupCommon. Each presentation group has an instance of that object, which is accessible with the help of the Common method. For example to gain access to the common properties of a presentation group you have to use the following code:

Dim common as NPresentGroupCommon
' get the common props from the collection directly
Set common = NChart1.PresentGroups.GetCommonAt(0)
' or get them from the presentation group
Set common = bar.Common()

Presentation Group Range. The most important method of the NPresentGroupCommon object is the Range method. It gives you access to the NRange object connected with the presentation group, through which you can select the range of values displayed by the presentation group. By default the presentation groups show all the data contained in the data storage. It is sometimes required to be more precise and specify exactly which categories, series or levels is the presentation groups operating upon. For example the following code instructs 3DChart to use data from serie 0 for the first presentation group and data from serie 1 for the second group:

With NChart1.PresentGroups.GetCommonAt(0).Range()
.InfiniteY = False
.BeginY = 0
.EndY = 0
End With

With NChart1.PresentGroups.GetCommonAt(1).Range()
.InfiniteY = False
.BeginY = 1
.EndY = 1
End With

Data Point Marks. The user is able to display two kinds of data point marks - simple text labels or annotations. The type of the marks is controlled with the help of the MarkType property of the NPresentGroupCommon object.

common.MarkType = mtAnnotation ' marks are displayed as annotations.

When the marks are displayed as annotations the user is able to control their appearance with the help of the NAnnotation object accessible with the help of the Annotation method.

common.Annotation.AnnotationType = atArrow ' change annotation type to arrow

When the marks are displayed as texts the user controls their appearance with the help of the NTextEx object accessible with the help of the TextEx method. In the case of texts the text label is connected with the data point via a line whose appearance and length can be controlled with the help of the ArrowLength property and ArrowLine method respectively.

common.TextEx.FillEffect.SetSolidColor = vbBlue ' texts are displayed in blue color
common.ArrowLine.Color = vbRed ' the arrow line is red
common.ArrowLength = 0.20 ' and its length is 0.20 OpenGL units

The user can control the distribution of the data point marks with the help of the DataPointsBetweenMarks property. It sets the number of consecutive Marks to be drawn. Setting this property to two will draw every other mark, to three every third etc.

By default all marks are displayed with the same text or annotation properties (depending on the mark type). The user can change this behavior by turning off the UniformMarks property. In this way the respective mark visualization properties will be obtained from the corresponding data point NTextEx on NAnnotation object, which are available in all minor 6 data types.

Uniform Appearances. The EnableUniformAppearance flag and the uniform appearance collection are used from the uniform appearances to uniformly present the data. Uniform Appearances are discussed in detail in the next topic.

Presentation Groups and Axes. Each presentation group is always displayed on the Categories and Series axes and can be arbitrary assigned to one or more of the four vertical axes. The DisplayOnAxis and IsDisplayedOnAxis methods help you scale the presentation group on a different chart axis and query whether the presentation group is scaled on a particular axis. For example the following code will display the first presentation group on the right axis and hide it from display on the left one.

NChart1.PresentGroups.GetCommonAt(0).DisplayOnAxis atRightAxis, True
NChart1.PresentGroups.GetCommonAt(0).DisplayOnAxis atLeftAxis, False

Margins. Sometimes the chart may go outside the charting area (for example if data point marks are displayed). In these cases you can turn on the InflateMargins flag. When it is turned on the component automatically inflates the axis scales with the necessary amount to fit the chart inside the charting area.

Related Examples. The example located in the Examples\NChart\VB\General directory briefly demonstrates some of the presentation group features. The examples located under the Examples\NChart\VB\PresentationGroups directory are in-depth tutorials for each individual chart type.


Uniform Apperances

Uniform Appearances

Overview. The 3DChart component can be configured to extract the fill effect, material and border properties of each data point from the corresponding properties of the NData object it represents. This behavior is very flexible, since it helps you to assign different appearances to each data point. In most of the cases though it is a burden to specify the appearance of each data point - for example if you want to show a bar chart where all bars are red. In this case you can use the uniform appearances to do that. The uniform appearances are enabled by default for the majority of the presentation groups.

The uniform appearances are a collection of NAppearance objects, which are contained in a collection accessible trough the UniformAppearances method of the object. The number of appearances in each presentation group uniform appearance collection depends on the presentation group type.

Each NAppearance object has a fill effect, material, border properties and a name. When the legend is in automatic mode the presentation group can be configured to show the appearances in it. In this case the shape of the legend marks is determined automatically by the presentation group.

For some presentation groups you can add and delete appearances (e.g the collection is editable). For example if you want to display a stack bar with three stacks - red, green and blue you must add two appearances (there is one by default for the stack bar presentation groups) and set them to have the respective fill effect. For others this does not make any sense. A nice example for that is the stock present group. For this presentation group by default you have four appearance objects - for the up and down candles, for the high - low line and for the traded volume.

Uniform Appearance Distribution. It is also very important to properly understand the way in which each presentation group distributes multiple uniform appearances across the items displayed by the presentation groups. Lets suppose for example that we have a bar presentation group with three categories and one level and we have two appearance objects in the uniform appearance collection. In this case the item for the first category will have the first appearance, the second category - the second appearance and the third category again the first appearance. In other words when the bar presentation group has one level multiple uniform appearance are distributed across the categories. If for example we have a bar present group with three categories but two levels, then the item for the first category and first level will have the first uniform appearance and the item for the second level the second uniform appearance. In other words uniform appearances are distributed across levels.

The following table describes the usage of the uniform appearances in the presentation groups.

Presentation Group | Default Number of Appearances | Editable Collection | Appearance Distribution | Comment
Bar | 1 | Yes | Across levels if multiple levels. Across series if no multiple levels. Across categories if no multiple series. | None
Stack Bar | 1 | Yes | Across levels if multiple levels. Otherwise across categories. | None
Area | 1 | Yes | Across series if multiple series. Otherwise across categories. |
Stack Area | 1 | Yes | Across levels if multiple levels. Otherwise across categories |
Line | 2 | Yes | Across levels if multiple levels. Otherwise across series. | Distributes pairs of appearances - one for the line and another for the data point.
Stack Line | 2 | Yes | Across levels if multiple levels. Otherwise across series | Distributes pairs of appearances - one for the line and another for the data point.
Surface | 1 | No | The one and only appearance is used to fill the surface. | The uniform appearance can only be used if the surface is rendered in mesh mode.
Point | 1 | Yes | Across series if multiple series. Otherwise across categories. | None
Bubble | 1 | Yes | Across categories | None
Stock | 4 | No | 0 is up candle 1 is down candle 2 is high - low line 3 is traded volume | None
Float Bar | 1 | Yes | Across categories | None
Pie | 1 | Yes | Across categories | None
Doughnut | 1 | Yes | Across categories | None
Radar | 2 | Yes | Across series if multiple series. Otherwise across categories. | Distributes pairs of appearances - one for the line and another for the data point.
Polar | 2 | Yes | Across series if multiple series. Otherwise across categories. | Distributes pairs of appearances - one for the line and another for the data point.
Shmoo | 3 | No | 0 is pass bit 1 is fail bit 2 is first fail bit | None
High Low | 4 | No | 0 is High Area 1 is High Line 2 is Low Area 3 is Low Line | None
Map | 1 | Yes | Across shapes | None
Arrow | 1 | Yes | Across categories | None
Error | 1 | Yes | Across categories | None
Error Bar | 2 | Yes | Across categories | Distributes pairs of appearances - one for the bar and another for the error line.
Smooth Line | 2 | Yes | Across levels if multiple levels. Otherwise across series. | Distributes pairs of appearances - one for the line and another for the data point.
Funciton | 2 | Yes | Across the function line segments | None

The following code demonstrates how you can use the uniform appearances to show a stack bar chart with red, green and blue stacks.

‘ add categories, series and levels
NChart1.Categories.Add "Apples", True
NChart1.Categories.Add "Oranges", True
NChart1.Categories.Add "Pears", True
NChart1.Categories.Add "Bananas", True

NChart1.Series.Add "Fruits", True
‘ there is one level by default
NChart1.Levels.Add "Level2", True
NChart1.Levels.Add "Level3", True

‘ set data to the data items
NChart1.DataAt(0, 0, 0).Value1 = 12
NChart1.DataAt(1, 0, 0).Value1 = 8
NChart1.DataAt(2, 0, 0).Value1 = 4
NChart1.DataAt(3, 0, 0).Value1 = 9
NChart1.DataAt(0, 0, 1).Value1 = 11
NChart1.DataAt(1, 0, 1).Value1 = 10
NChart1.DataAt(2, 0, 1).Value1 = 12
NChart1.DataAt(3, 0, 1).Value1 = 13
NChart1.DataAt(0, 0, 2).Value1 = 2
NChart1.DataAt(1, 0, 2).Value1 = 3
NChart1.DataAt(2, 0, 2).Value1 = 8
NChart1.DataAt(3, 0, 2).Value1 = 4
‘ create a stack bar to show the data

Dim bar As NStackBarPresentGroup
Set bar = NChart1.PresentGroups.Add(pgtStackBar)
bar.Common.Range.InfiniteX = True

bar.Common.Range.InfiniteY = True
bar.Common.Range.InfiniteZ = True
‘ enable Uniform Appearances
bar.Common.EnableUniformAppearance = True

‘ add two appearances for the second and third stack
‘ there is one appearance by default
bar.Common.UniformAppearances.Add ("Stack2")
bar.Common.UniformAppearances.Add ("Stack3")

‘ and set the desired fill effects for the three stacks
bar.Common.UniformAppearances.GetAt(0).FillEffect.SetSolidColor vbRed
bar.Common.UniformAppearances.GetAt(1).FillEffect.SetSolidColor vbGreen
bar.Common.UniformAppearances.GetAt(2).FillEffect.SetSolidColor vbBlue


Axes

The 3DChart component has four vertical axes (Left, Back, Right and Front) positioned around the chart floor plus one categories axis and one series axis. They are all instances of the NAxis automation object. Figure 1 visually demonstrates the position of the 6 chart axes.

figure 1.

Each presentation group is initially displayed on the left vertical axis and always on the Categories and Series axes. The user can also attach a presentation group to one of the other axes, with the help of the DisplayOnAxis method of the NPresentGroupCommon object. You can query whether a presentation group is displayed on one of the vertical axes, with the help of the IsDisplayedOnAxis method of the same automation object. The axes are programmatically accessed with the help of the Axes method of the NChart object. The user can control the following aspects of the axes:

  1. Axis Appearance
    The Style property of the NAxis object controls the shape of the axis. By default it is set to asBar. The user can also display it as a cylinder with the help of the asCylinder style. The Width property of the axis controls the width of the axis. If the Width is bigger than 0 then the axis is wired as a bar or cylinder and the control assigns fill effect, material and border properties on it. For example:

    ' shows the left axis as a red bar with a tick border
    NChart1.Axes(atLeftAxis).Width = 0.2
    NChart1.Axes(atLeftAxis).FillEffect.SetSolidColor vbRed
    NChart1.Axes(atLeftAxis).Material.SetAmbientDiffuseColor vbRed
    NChart1.Axes(atLeftAxis).Border.Width = 2

    When the Width property is set to 0 the axis is wired as a simple line and the control assigns only the border properties to it. The following example displays the left axis as a red line with width 3 pixels.

    ' show the left axis as a 3 pixel red line
    NChart1.Axes(atLeftAxis).Width = 0
    NChart1.Axes(atLeftAxis).Border.Width = 3
    NChart1.Axes(atLeftAxis).Border.Color = vbRed

  2. Axis Texts
    The contents of the texts shown by the axis are determined by the scale mode of the axis (discussed later in this topic). When the axis is switched in Value, Logarithmic or Date Time mode then the axis works like a ruler and the texts are formatted values. When the axis operates in Dimension mode then the axis texts are taken from the corresponding collection - for the Categories axis this is the Categories collection, for the Series axis this is the Series collection and for the vertical axes this is the Levels collection. The user can control the visual appearance of these texts with the help of the TextEx method, which gives you access to the NTextEx object used to display the texts.

    ' the following code makes the value texts on the left axis 3d with extrusion 0.2
    NChart1.Axes(atLeftAxis).TextEx.Use2DText = False
    NChart1.Axes(atLeftAxis).TextEx.Extrusion = 0.2
    NChart1.Axes(atLeftAxis).TextEx.FillEffect.SetSolidColor vbRed
    NChart1.Axes(atLeftAxis).TextEx.Material.SetAmbientDiffuseColor vbRed

    The axis text position must be adjusted for the different projections. Instead of doing this manually you can use the SetPredefinedTextPosition method, which receives as a parameter a predefined text position type. (patpVertical, patpHorizontalLeft and patpHorizontalRight).

    NChart1.Axes(atLeftAxis). SetPredefinedTextPosition patpVertical

    Often the text labels on the categories axis overlap, because they are too long to fit in the category space. You can solve this problem in two ways. The first one is to use the stagger texts mode which is enabled with the help of the StaggerTexts property. The offset between two adjacent texts is then controlled with the help of the StaggerOffset property. The number of stagger levels is controlled with the help of the StaggerLevels property.

    NChart1.Axes(atCategoriesAxis).StaggerTexts = True ' enable stagger text mode
    NChart1.Axes(atCategoriesAxis).StaggerOffset = 0.20' offset is 0.20 OpenGL units
    NChart1.Axes(atCategoriesAxis).StaggerLevels = 3 ' three levels of the stagger (default is 2)

    The other method is to rotate the texts to 45 or 90 degrees. The following code rotates the categories texts at 45 degrees.

    NChart1.Axes(atCategoriesAxis).TextEx.Orientation = 45
    NChart1.Axes(atCategoriesAxis).TextEx.HorzAlign = haRight
    NChart1.Axes(atCategoriesAxis).TextEx.OffsetY = 0

  3. Axis Ticks
    Each axis has major and minor ticks. The position of the ticks depends on the axis mode. The major ticks are inner and outer and their names come from the orientation they have towards the chart center. The minor ticks are drawn between the major ones on the outer side of the chart and their count can be controlled by the MinorTickCount property of the NAxis object. Both kinds of ticks are rendered as lines. The following examples shows how you can control their appearance:

    ' inner ticks with length 0.06 and red color
    NChart1.Axes(atLeftAxis).InnerTickLength = 0.06
    NChart1.Axes(atLeftAxis).InnerTickLine.Color = vbRed

    ' outer ticks with length 0.08 and blue color
    NChart1.Axes(atLeftAxis).OuterTickLength = 0.08
    NChart1.Axes(atLeftAxis).OuterTickLine.Color = vbBlue

    ' five minor ticks between each major one with length 0.05
    ' and yellow color
    NChart1.Axes(atLeftAxis).MinorTickCount = 5
    NChart1.Axes(atLeftAxis).MinorTickLength = 0.05
    NChart1.Axes(atLeftAxis).MinorTickLine.Color = vbYellow

  4. Axis Gridlines
    The gridlines of the axes are displayed on the chart walls. As well as the ticks the gridlines are major and minor. Their position is determined by the position of the corresponding tick they represent. The user can show the axis gridlines on more than one chart wall. The way in which gridlines are rendered resembles the way in which the axis is rendered. For example when you set the MajorLineWidth property to 0 the line is rendered like a simple line and the control uses only the MajorLineBorder properties to display it. Otherwise the grid line is rendered like a bar and the control assigns also the MajorLineFillEffect and MajorLineMaterial properties to it. The same is also valid for the minor lines. You can control the walls on which gridlines are displayed with the help of the SetMajorShowAtWall and SetMinorShowAtWall methods of the NAxis object. For the vertical axes these methods accept only the four vertical walls. For the Category axis these methods accept the back wall, the floor wall and the front wall. For the Series axis the same methods will accept the left wall, the chart floor and the right wall. You can also query whether a line is displayed on a particular wall with the GetMajorShowAtWall and GetMinorShowAtWall methods of the NAxis object.
    The following example hides the left axis major gridlines from the back wall and makes them red (by default the left axis gridlines are also displayed on the left wall):

    NChart1.Axes(atLeftAxis).SetMajorShowAtWall cwtBack, False
    NChart1.Axes(atLeftAxis).MajorLineBorder.Color = vbRed

  5. Axis Title
    The title of the axis is an arbitrary text accessible from the Title property of the NAxis object. The appearance of the axis title can be controlled with the NTextEx object, accessible from the TitleTextEx method. The following example sets a red title on the left axis.

    NChart1.Axes(atLeftAxis).Title = "Values"
    NChart1.Axes(atLeftAxis).TitleTextEx.Extrusion = 0.2
    NChart1.Axes(atLeftAxis).TitleTextEx.FillEffect.SetSolidColor vbRed

  6. Axis Scale
    All axes can work in four scale modes - Dimension, Value, Logarithmic and Date Time. The scale mode of the axis is controlled by the ScaleMode property. It accepts the following values asmDimension, asmValue, asmLogarithmic, asmDateTime. The following code switches the categories axis is Value scale mode:

    NChart1.Axes(atCategoriesAxis).ScaleMode = asmValue

    Independently of the axis scale mode you can invert the axis with the Inverted property.

    1. Dimension scale mode
      When the axis works in Dimension mode it shows the labels of the corresponding axis collection (Categories, Series and Levels). The maximal value of the axis is then the size of the respective collection and the minimal value is always 0. By default only the Categories and Series axes are working in this scale mode. The NumberOfDataPointsBetweenTicks property controls the number of dimensions between the major ticks on the axis. By default it is set to 1, which means for example that there is a major tick for each category. By increasing this value you can display several categories between two major ticks. The following example demonstrates how you can control number of categories displayed between two major ticks.

      NChart1.Axes(atCategoriesAxis). NumberOfDataPointsBetweenTicks = 2

      By default the data points are displayed between the ticks. Sometimes it is useful to display them exactly on the ticks. This can be done by switching off the DisplayDataPointsBetweenTicks property.

      NChart1.Axes(atCategoriesAxis). DisplayDataPointsBetweenTicks = False

    2. Value Scale Mode
      When the axis works in Value mode it works like a ruler and the minimal and maximal values that it shows are by default taken from the presentation groups shown on this axis. The type of the presentation group influences the minimal and maximal values of the axis - this means that for the same data a group bar chart and a stack bar chart will have different minimal and maximal values on the axis. If the default behavior does not satisfy your particular needs you can also set the minimal and maximal values manually with the help of the AutoMax, AutoMin, Max and Min properties. The following code scale the left axis always from 0 to 120

      NChart1.Axes(atLeftAxis).AutoMin = False
      NChart1.Axes(atLeftAxis).AutoMax = False
      NChart1.Axes(atLeftAxis).Min = 0
      NChart1.Axes(atLeftAxis).Max = 120

      If you are not satisfied by the default axis step you can manually set one with the help of the AutoStep and Step properties. The following code manually sets the step to 10.

      NChart.Axes(atLeftAxis).AutoStep = False
      NChart.Axes(atLeftAxis).Step = 10

      When the axis determines the step of the major ruler ticks it takes into account the MaxTickCount property trough which you can control the density of the ruler ticks. Although the actual number of the ruler ticks may not be equal to the value specified by the MaxTickCount property it is guarantied that it will never exceed it. When the RoundToTick property is turned on the minimal and maximal values of the axis are inflated to exactly end on a tick value. The following example changes the granularity of the axis ticks and rounds the scale to exactly end on a tick value:

      NChart1.Axes(atLeftAxis).MaxTickCount = 20
      NChart1.Axes(atLeftAxis).RoundToTick = True

      The FormatString property controls the formatting of the ruler values. By default the values are formatted with 2 decimal places, commas between the thousands and no division. The following code formats the axis texts with 1 decimal place.

      NChart1.Axes(atLeftAxis).FormatString = "%V(1,TRUE,1)"

    3. Logarithm Scale Mode
      When you switch the axis in logarithm scale mode the axis scales the values on the axis in logarithmic manner. The user is able to control the logarithm base with the help of the LogarithmBase property. The following code sets the logarithm base of the left axis to 2.

      NChart1.Axes(atLeftAxis).LogarithmBase = 2

      The step of the axis also can be switched in two modes trough the LogarithmStepMode property. The first one is lsmExponent. In this mode the ticks on the axis are exact products of the logarithm base. The user is not able to manually set axis step in this mode.

      When the step mode is switched to lsmFixed then the ticks values are increased with a fixed value (as in a normal value scale mode). The user is then able to manually set the axis step.

    4. Date Time Mode
      By its nature the Date Time scale mode is the same as the Value scale mode, but a different formatting can be applied on the ruler texts. The FormatString accepts the %D() formatting command, which takes as a parameter the desired date time formatting. For example the following code will display the category axis date-time values with the default short date format for the current machine.

      NChart1.Axes(atCategoriesAxis).FormatString = "%D(%x)"

      For more information about format strings see the Formatting Commands topic.
      In practice you will frequently need to manually set the step of the date-time axes. Instead of specifying human unreadable double values for the axis step (date and time are internally represented by double values) you can use the helper method SetStepDateTime. The user can get human readable information about the current date time step with the GetStepDateTime method. The following code sets the categories axis step to 3 days and 4 hours.

      NChart1.Axes(atCategoriesAxis).AutoStep = False
      NChart1.Axes(atCategoriesAxis).SetStepDateTime 3, 4, 0, 0 ' 3 days, 4 hours, 0 minutes, 0 seconds

      The SetMinDateTime, SetMaxDateTime, GetMinDateTime and GetMaxDateTime methods perform analogous operations to the min and max values of the axis (when they are switched in manual mode).

  7. Axis Position
    The position of the axis can be controlled in two aspects - static and dynamic.

    Static axis positioning includes the begin and end percent of the axis as well as the axis offset from its original position. The PositionOffset, PositionStartPercen and PositionEndPercent properties control the static axis positioning. Static axis positioning is very useful if you want to split the chart to two or more charts. The following image demonstrates the static axis positioning for the creation of two trend charts positioned at different elevations.

    figure 2.

    Dynamic axis positioning on the other hand is used to position the axis on a particular value of another axis. With the help of the PositionAxis method you can for example display the left axis always at value 0 of the categories axis and vice versa. The following code will cross the left and category axis at the 0.

    NChart1.Axes(atLeftAxis).PositionAxis atCategoriesAxis, 0, True
    NChart1.Axes(atCategoriesAxis).PositionAxis atLeftAxis, 0, True

    You can also use dynamic axis positioning to display the axes "before" or "after" the chart. This is achieved, when you position the desired axes at the min or max value of the series axis. If the series axis has one series the following code will position the left and categories axes at the chart back.

    NChart1.Axes(atLeftAxis).PositionAxis atSeriesAxis, 1, True
    NChart1.Axes(atCategoriesAxis).PositionAxis atSeriesAxis, 1, True

    The following image demonstrates the usage of the dynamic axis positioning.

    figure 3.

Relateted Examples The examples located in the Examples\NChart\VB\Axis directory demonstrate the axis handling.


Axis Stripes

Stripes are one of the most useful objects when it comes to highlighting information in the chart area. They allow you to highlight a range of values associated with any of the axes by drawing a stripe at a user specified chart wall.
Each axis has a collection of NAxisStripe objects accessible with the Stripes method of the NAxis object. The following code adds one stripe to the left axis.

Dim stripe As NAxisStripe
Set stripe = NChart1.Axes(atLeftAxis).Stripes.Add()

Each NAxisStripe object holds information about the stripe begin and end values, as well as the stripe fill effect, material and walls on which it will be displayed. The user controls the begin and end values of the axis stripe with the help of the From and To properties.

stripe.From = 10
stripe.To = 30

The range of the axis stripe is automatically clamped to the current axis scale range.
The SetShowAtWall method helps you display the axis stripe at the adjacent chart walls. The vertical axis stripes accept only the four vertical chart walls. The category axis stripes accepts only the chart floor and the front and back walls. The series axis accepts the chart floor and the left and right walls. The following code shows the stripe on the back and right axes.

stripe.SetShowAtWall cwtBack, True
stripe.SetShowAtWall cwtRight, True

The FillEffect and Material methods of the NAxisStripe object help you specify the axis stripe filling. The following code makes the stripe filling blue.

stripe.FillEffect.SetSolidColor vbBlue
stripe.Material.SetAmbientDiffuseColor vbBlue

The image on figure 1 shows a typical example of the usage of axis stripes.

figure 1

Related Examples. The example located in the Examples\NChart\VB\Axis\Stripes directory holds an example of the usage of stripes.


Axis Const Lines

Axis const lines are lines displayed at custom axis values. Axis const lines are primary used when the user wants to visually emphasize some axis value as important for the chart been displayed.

Const Lines As Simple Lines. Each constant line is represented by a NAxisConstLine object. The Value property of this object helps you specify the value on which you want to display the line. The LineProps method gives you access to the NLineProperties object controlling the visual appearance of the const line.

Each axis has a NAxisConstLineCollection object accessible trough the ConstLines method of the NAxis object.
The following code creates a red const line on the left axis displayed at value 5.

Dim line As NConstLine
Set line = NChart1.Axes(atLeftAxis).ConstLines.Add()
line.Value = 5
line.LineProps.Color = vbRed

The image on figure 1 shows a typical example of the usage of axis const lines.

figure 1

Const Lines as Planes. By default the const lines are displayed as simple lines. Sometimes it is required to show the const line as a plane or stripe especially when the chart has a 3d aspect. The shape of the const line is easily controlled with the help of the Style property of the NAxisConstLine object. When the Style property is set to clsParallelepiped or clsRectangle the user can control the width of the displayed parallelepiped or rectangle with the help of the LineWidth property. The following code displays a semi transparent const plane at value 10.

Dim line As NAxisConstLine
Set line = NChart1.Axes(atLeftAxis).ConstLines.Add()
line.Value = 10
line.Style = clsParallelepiped
line.LineWidth = 0.1 ' 0.10 OpenGL units in width
line.FillEffect.SetSolidColor vbRed
line.FillEffect.Transparency = 50

Const Lines Begin and End. By default the const lines are displayed across the entire chart. Sometimes it may be useful to specify the begin and end of the const line with specific values of the corresponding axis (parallel to the const line). This mode is enabled when the user sets the EnableBeginEnd property to True. Then the user specifies begin and end value for the const line with the BeginValue and EndValue properties. Depending on which axis the constant lines belong the user is able to specify an axis with which the begin and end values will be synchronized. This is achieved with the help of the BeginEndAxis property. The lines of the four vertical axes accept as a parameter only the categories axis. The lines of the categories and series axes accept the four vertical axes as parameters.
The following code will display the line created in the previous code fragment from value 10 to value 20 of the categories axis.

line.EnableBeginEnd
 = True
line.BeginValue = 10
line.EndValue = 20
line.BeginEndAxis = atCategoriesAxis

The image on figure 2 shows a const line displayed as parallelepiped whose begin and end values have been synchronized with the categories axis.

figure 2.

Related Examples. The example located in the Examples\NChart\VB\Axis\ConstLines directory demonstrates the usage of const lines.


Axis Labels

Axis labels are labels displayed at custom axis values. In conjunction with axis const lines they form the primary means with which the user can direct the attention to a specific axis value and display some explanatory text.

Each axis label is represented by a NAxisLabel object. The axis labels are contained in a NAxisLabelCollection object, which can be accessed with the help of the Labels method of the NAxis object. The Value property specifies the value on which the axis label will be displayed, while the actual text that will be displayed is controlled with the help of the Text property. The user can also control the visualization properties of text with the help of the NTextEx object accessible via the TextEx method.

The following example creates an axis label at value 10 of the left chart axis.

Dim label As NAxisLabel
Set label = NChart1.Axes(atLeftAxis).Labels.Add()
label.Value = 10
label.Text = "Very important limit"
label.TextEx.Font.Size = 12

The axis label can be detached from its position on the axis. This will in most cases increase its readability. The Offset property of the NAxisLabel object specifies this detachment in OpenGL units. The user can also control the direction of this offset with help of the Angle property. For example labels on the left axis are usually detached with angle 180 (offsets the labels to the left of the chart), while labels displayed on the categories axis are usually offset with angle 270 (offsets the labels to the bottom of the chart).

label.Offset = 0.3 '0.3 OpenGL units from the left axis
label.Angle = 180 ' offsets on the left of the axis

The user can also display a connection line between the original position of the axis label on the chart axis and the position of the label after the offset has been performed. The HasLine property controls the visibility of this line. The user can change its appearance with the help of the NLineProperties object accessible with the help of the LineProps method.

label.HasLine = True
label.LineProps.Color = vbBlue

Related examples. The example located in the Examples\NChart\VB\Axis\Labels directory demonstrates the usage of axis labels.


Axis Paging

The axes of the 3DChart component can be configured to work in paging mode. When the axes operate in this mode the axis is showing only a fraction of the total axis scale or in other words one of the several axis pages. By default the axes are not using paging.

The first think that you have to do when you intend to enable paging in your chart is to determine how you want to specify the axis page size. You can do this in two ways - either specify the total number of pages that the axis will possess regardless of the axis scale or specify a fixed scale size for the axis page and let the page count vary depending on the total axis scale. These two different approaches are in fact the apmFixedPageCount and apmFixedPageSize paging modes that are accepted by the PagingMode property of the NAxis object.

When the user sets the PagingMode property to apmFixedPageCount he can modify the PageCount property, which determines the actual number of pages for the axis.

' the following code divides the left axis into four pages
NChart1.Axes(atLeftAxis).PagingMode = apmFixedPageCount
NChart1.Axes(atLeftAxis).PageCount = 4

Analogously when the PagingMode property is set to apmFixedPageSize the user can control the page size with the help of the PageSize property.

' the following code divides the left axis in 20 unit pages each
NChart1.Axes(atLeftAxis).PagingMode = apmFixedPageSize
NChart1.Axes(atLeftAxis).PageSize = 20

Now that the paging mode has been chosen the user must specify the currently shown page of the axis. This can be achieved in two ways also - either specify the exact index of an axis page or just specify a beginning value. Programmatically this behavior is controlled with the help of the CurrentPageMode property. When it is set to acpmIndex the user can modify the CurrentPageIndex property, which specified the currently displayed page.

' show the second page of the left axis
NChart1.Axes(atLeftAxis).CurrentPageMode = acpmIndex
NChart1.Axes(atLeftAxis).CurrentPageIndex = 1

When the CurrentPageMode property is set to acpmValue the user can control the beginning value of current page with the help of the CurrentPageValue property of the NAxis object.

' show a page beginning from value 3.5
NChart1.Axes(atLeftAxis).CurrentPageMode = acpmValue
NChart1.Axes(atLeftAxis).CurrentPageValue = 3.5

Related Examples. The example located in the Examples\NChart\VB\PresentationGroups\Axis\Paging demonstrates axis paging directory.


Chart Walls

There are five chart walls in the 3DChart component and all of them can be arbitrary hidden. Four of them are vertical and surround the fifth one - the chart floor. They are all instances of the NChartWall object. The user gains access to individual instances with the help of the Walls method of the NChart object. The Walls method takes one parameter - the chart wall you want to access. Valid values are cwtLeft, cwtBack, cwtRight, cwtFront and cwtFloor. For example if you want to access the right wall you will write the following code.

Dim rightwall As NChartWall
Set rightwall = NChart1.Walls(cwtRight)

With the help of the NChartWall object the user is able to control various aspects of the chart walls including their visibility, style, width, fill effect, material and border properties. The code below changes some properties of the right chart wall.

rightwall.Visible = True ' show the wall
rightwall.Width = 0.10 ' make it thicker

' and set red fill effect and material
rightwall.FillEffect.SetSolidColor vbRed
rightwall.Material.SetAmbientDiffuseColor vbRed

By default the chart wall of the component are visualized like parallelepipeds which is equivalent to the wall style wsBar. The user can also display the chart wall like a smooth or cut edge bar. The Style property of the NChartWall object controls this aspect of the wall:

NChart1.Walls(cwtFloor).Style = wsSmoothEdgeBar

When the Style property is set to wsSmoothEdgeBar or wsCutEdgeBar the user is able to control the edge percent as well as whether the top and bottom edges will be displayed in the requested manner with the help of the EdgePercent, HasTopEdge and HasBottomEdge properties respectively.

Related Examples. The example located in the Examples\NChart\VB\PresentationGroups\FloorAndWalls directory demonstrates how to program the chart walls and the chart floor.


ADO Database Integration

Overview. The 3DChart component supports database integration mode in which the data shown by the component is extracted from an ADO compatible database. Having in mind the 3 - dimensional structure of the data storage and the 2 - dimensional structure of the recordsets, the ADO database integration implemented in the 3DChart component uses a flexible model, which provides the user with the necessary means to implement complex data imports from databases.

Database and Data Sources. The primary object involved in the database integration is the NDatabase object. Users gain access to it with the help of the GetDatabase method of the NChart object. Database integration is enabled when the Enable property of the NDatabase object is set to True. When this is a fact the data storage is filled with values from the current data source. The database object can contain multiple data sources, but only one is active at a time - the active data source is determined by the CurrentDataSource property. Another important property of the database is the DataType property, which determines the type of the NData objects in the data storage after the import is conducted. The following code will enable database integration, create a data source and make it active and also set the data type to dtDataType65.

' get the database from the NChart
Dim db As NDatabase
Set db = NChart1.GetDatabase()

' enable database integration
db.Enable = True

' create a data source
Dim ds As NDataSource
Set ds = db.DataSources.Add("data source 1")

' make it active
db.CurrentDataSource = 0

' set the data type to dtDataType65
db.DataType = dtDataType65

Each data source is represented with a NDataSource object and the component stores them in a NDataSourceCollection object accessible with the help of the DataSources method of the NDatabase object. Each data source contains connection information and the SQL statement, which will be executed. They are exposed to the programmer with the ConnectString and SQL properties respectively. The TestConnection and TestSQL methods help you verify the connection and SQL information of the NDataSource object. For the purpose of this topic lets assume that we have an Access database, which has a table called "Table1" and you have made a System DSN entry for this database in the ODBC manager called "temp". The following code demonstrates how you can create a data source containing all the values from Table1.

ds.ConnectString = "DSN=temp"

If ds.TestConnection() = False Then
MsgBox "The connect string is not valid. Check whether you created the temp System DSN in the ODBC manager."
Exit Sub
End If

' set the SQL statement
ds.SQL = "select * from Table1"

If ds.TestSQL() = False Then
MsgBox "The SQL statement is not valid"
Exit Sub
End If

Lets assume that the "Table1" table has the following fields:

Field Name | Field Type
Serie1Level1 | Number
Serie1Level2 | Number
Serie2Level1 | Number
Serie2Level2 | Number
Category | Text

Each data source has a property called CategoryField, which specifies the recordset field from which the component will extract the labels of the categories. The following piece of code sets the category field of the data source.

' category labels are extracted from the Category field
datasource.CategoryField = "Category"

Serie Mappings and Data Extraction. Now that we have the data source created and selected we need the programming means to specify the extracted series and the fields from which each serie takes its data.

The series that will be imported are represented by NSerieMapping objects. These objects are contained in a NSerieMappingCollection which is accessible with the help of the SerieMappings method of the NDataSource object. Each serie mapping object has a property called LevelCount specifying the number of the data levels for this serie. The number of Levels that the data storage will have after the data source is imported is the maximum LevelCount value from all serie mappings. For example if we have two serie mapping objects with level counts 2 and 3 the data storage will have 2 series, 3 levels and as many categories as the rows in the recordset specified by the data source. The following code creates two serie mapping objects with 2 levels and maps the appropriate values to the fields of the table.

' create the first serie mapping with a visible label "This year"
Dim seriemapping As NSerieMapping
Set seriemapping = datasource.SerieMappings.Add("This year", True)

' the first serie has two levels
seriemapping.LevelCount = 2

' the Value1 values of the first level are extracted from the "Serie1Level1" field
seriemapping.SetLevelValueField 0, dvtValue1, "Serie1Level1"
seriemapping.SetLevelValueField 1, dvtValue1, "Serie1Level2"

' create the second serie mapping
Set seriemapping = datasource.SerieMappings.Add("Last year", True)

' the second serie also has two levels
seriemapping.LevelCount = 2

seriemapping.SetLevelValueField 0, dvtValue1, "Serie2Level1"
seriemapping.SetLevelValueField 1, dvtValue1, "Serie2Level2"

As you can see from the code above the SetLevelValueField method is used to set a relationship between a specified NData object property of NData objects that reside on a specified level in the serie represented by the serie mapping and a field in the recordset specified by the SQL statement of the data source. You can easily perform the opposite operation - determine from which field is a specific NData object property of objects at specified level are extracted with the help of the GetLevelValueField method.

And finally after you have created the data source and the serie mapping you have to call the Requery method of the database object to extract the values from the database and fill the data storage with them.

NChart1.GetDatabase.Requery()

Advanced Data Extraction. The SetLevelValueField method gives you the possibility to specify a field only for the Value1, Value2 .... Value6 and Label properties of the NData objects. More advanced data import operations may require import of the text align for each individual data point! The SetLevelValueFieldEx method performs a more sophisticated level value - field mapping. It takes three parameters - one specifying the object that is a property of the NData object, other specifying a property of that object and finally the field from which it will extracted. For example:

seriemapping.SetLevelValueFieldEx 0, dpoFillEffect, dbfepColor, "Color"

will extract the color of the fill effect objects from the Color recordset field.

The following table summarizes the objects and the properties that can be imported with the help of the SetLevelValueFieldEx method. The properties that can be imported from a data source closely follow the properties exposed for the same objects via automation. For more detailed information about the meaning of a particular property please refer to the reference documentation of respective object.

Object | Properties
dpoFillEffect | dbfepColor - specifies the fill effect color. Type will automatically be set to fetSolidColor dbfepImageFileName - specifies the file name of the fill effect image. Type will automatically be set to fetImage dbfepAnimationFileName - specifies the file name of the fill effect animation. Type will automatically be set to fetAnimation
dpoMaterial | dbmpAmbientColor - ambient color of the imported material dbmpSpecularColor - specular color of the imported material dbmpDiffuseColor - diffuse color of the imported material dbmpEmissiveColor - emissive color of the imported material
dpoBorder | dbbpColor - border color dbbpStyle - style of the border dbbpWidth - width of the border dbbpFactor - border factor dbbpPattern - border pattern
dpoMouseResponse | dbmrpURL - URL of the mouse response dbmrpFlags - flags of the mouse response dbmrpTargetFrameName - target frame dbmrpPostData - post data dbmrpHeaders - headers dbmrpTooltip - custom tooltip dbmrpMousePointer - custom mouse pointer
dpoTextEx | tepOffsetX - X offset of the 2D texts tepOffsetY - Y offset of the 2D texts tepOrientation - orientation of the 2D texts tepHorzAlign - horizontal align tepVertAlign - vertical align
dpoAnnotation | dbtpText - annotation text dbtpAnnotationType - annotation type dbtpVisible - visible flag of the annotation object

Related Examples. The Examples\NChart\VB\Database folder contains an example demonstrating the database integration.


Formatting Commands

In general there are two types of texts displayed by the 3DChart component - dynamic and static. Static texts are user specified and do not depend on the data values - for examples the labels on the categories. The other one are dynamic - for example texts on the ruler axes and the texts of each data item. The user can apply formatting on them. The formatting commands of the 3DChart component can be divided in three categories.

1. String formatting commands. These formatting commands are used when the user wants to display a user specified string in the formatted text. They do not accept any parameters. The most typical example is the format string of the data points accessible with the help of the FormatString property of the NPresentGroupCommon object. The L command there inserts the label of the data point in the formatted text.

common.FormatString = "%L"

The other usage of the String Formatting commands is to insert a new line or the special format character % in the formatted text. For example

common.FormatString = " %% %N"

will produce the % string and new line.

2. Value formatting commands. Value formatting commands are used to format double values. These commands are available in two variants. The first one has one parameter specifying the precision of the formatted value (how many digits are there after the decimal point). A typical example is the P command in the pie presentation group, which displays the percent contribution of each data item to the total amount.

pie.Common.FormatString = "%P(2) %%" 'display percent with 2 digit precision

The second variant of the of the value formatting command has three parameters - the first one is the decimal precision. The second one specifies whether the value should be formatted with commas separating the thousands. It accepts only the True and False values. The third parameter is a division value which is used to divide the value before it is displayed. This parameter can be used if you want to display data items that contain large numbers (millions for example). In this case instead of displaying the ruler axis with these large numbers you can divide the values by 1 million and add an explanatory string to the axis title stating that the values are in millions. For example:

NChart1.Axes(atLeftAxis).FormatString = "%V(2,True,1000000)" 'ruler values have 2 decimal digits after the decimal point, thousands are separated with commas and value is divided by 1 million before it is displayed

4. Date Time formatting Commands - date time formatting commands are used when you want to display date time strings in the component. They accept only one parameter, which specifies the formatting of the date time value. Following is a list of the accepted formatting parameters of the date time format command.

%a
Abbreviated weekday name

%A
Full weekday name

%b
Abbreviated month name

%B
Full month name

%c
Date and time representation appropriate for locale

%d
Day of month as decimal number (01 - 31)

%H
Hour in 24-hour format (00 - 23)

%I
Hour in 12-hour format (01 - 12)

%j
Day of year as decimal number (001 - 366)

%m
Month as decimal number (01 - 12)

%M
Minute as decimal number (00 - 59)

%p
Current locale's A.M./P.M. indicator for 12-hour clock

%S
Second as decimal number (00 - 59)

%U
Week of year as decimal number, with Sunday as first day of week (00 - 53)

%w
Weekday as decimal number (0 - 6; Sunday is 0)

%W
Week of year as decimal number, with Monday as first day of week (00 - 53)

%x
Date representation for current locale

%X
Time representation for current locale

%y
Year without century, as decimal number (00 - 99)

%Y
Year with century, as decimal number

%z, %Z
Time-zone name or abbreviation; no characters if time zone is unknown

%ms
Milisecond part of the date time value.

For example setting the format parameter to %c will display the date time values in the format for the current locale.

NChart1.Axes(atCategoriesAxis).ScaleMode = asmDateTime
NChart1.Axes(atCategoriesAxis).FormatString = "%D(%c)"

Formatting commands are used in many places where you need to specify the format of the data you want. The following table gives an explanation of the supported formatting commands in the different format strings

Object

Formatting Commands Supported

NAxis::FormatString

%V(dec,commas,division) - show the value as a double formatted value

%D(format) - show the value as date time

NPresentGroupCommon::FormatString

NPresentGroupCommon::LegendFormatString

%1(dec,commas,division) - show value1

%2(dec,commas,division) - show value1

%3(dec,commas,division) - show value1

%4(dec,commas,division) - show value1

%5(dec,commas,division) - show value1

%6(dec,commas,division) - show value1

%D1(format) - show value1 as date time

%D2(format) - show value2 as date time

%D3(format) - show value3 as date time

%D4(format) - show value4 as date time

%D5(format) - show value5 as date time

%D6(format) - show value6 as date time

%L - show the label of the data point

Special

%P(dec) - supported by presentation groups that display the data point percent contribution to the overall sum (pie, stack bar, stack area, stack line)

%C(dec,commas,division) - supported by presentation groups that display the current sum (cumulative value) of the data point (stack bar, stack area, stack line)

%P1(dec,commas,division), %P2(dec,commas,division) - supported by the surface to show the palette entries when the legend is in custom mode.


Bar Chart

Overview. Single and multi column bar charts are created with the help of the NBarPresentGroup object. In both cases the user is able to control the shape of the bars, their origin point and the axis on which they are scaled. The NBarPresentGroup must be created in the presentation groups collection with code similar to this:

NChart1.PresentGroups.Add pgBar

Data Requirements. Bar charts need major data type 1 (at least one value).

Data Usage. The NBarPresentGroup uses Value1 as the value of each bar

Creating Single Column Bar Charts. The NBarPresentGroup object automatically creates a single column chart if the range of the presentation group occupies only one level or the data storage itself has only one level. The following snapshot demonstrates the usage of the NBarPresentGroup to display a single column chart:

figure 1.

The style of the bars in this case is smooth edge bar. The user is able to choose from the following bar styles: Bar, Cylinder, Cone, Inverted Cone, Pyramid, Inverted Pyramid, Smooth Edge Bar and Cut Edge bar. The following example changes the style to Inverted Pyramid:

Dim bar As NBarPresentGroup
Set bar = NChart1. PresentGroups.GetAt(0)
bar.BarStyle = bsInvertedPyramid

When the style of the bars is set to smooth edge bar or cut edge bar the user is able to modify the BarEdgePercent property of the NBarPresentGroup, which controls the size of the smooth edge in percents from the smaller bar dimension (width or depth). Other two properties HasBottomEdge and HasTopEdge control the appearance of the top and bottom of the cut and smooth edge bars. By default the HasTopEdge property is set to True and the HasBottomEdge property is set to False.

The width and depth of the bars is controlled with the help of the WidthPercent and DepthPercent properties respectively.

The bar chart on figure1 has different fill effects and material properties for each individual data item. Sometimes though you might need to display all the bars with only one fill effect and material. In this case you must use the uniform appearances of the NBarPresentGroup. The following code turns on the Uniform Appearances for the bar present group:

bar.Common.EnableUniformAppearance = True

By default the uniform appearances of the NBarPresentGroup have only one item. This item is used to specify the appearance of all bars within the same presentation groups and by default is initialized with red solid color fill effect and red material. if you create more items in the uniform appearance collection the NBarPresentGroup will distribute them along the categories of the chart. For example if you create one more uniform appearance the uniform appearance collection will have two items. In this case the bars located on categories 1, 3 and 5 will have uniform appearance 1 and the bars located on categories 2 and 4 will be visualized with uniform appearance 2.

Creating Multi Column Bar Charts. Multi column bar charts are automatically created when the range of the NBarPresentGroup occupies more than one level. The number of columns in each chart cell is determined by the number of the levels covered by the presentation group range. The following snapshot demonstrates the usage of the NBarPresentGroup to display a multi column chart:

figure 2.

In this case the data storage of the 3DChart component has 2 levels, 4 categories and 1serie. The items from the first level are represented by the red bars while the items from the second level are represented from the green ones.

The user can control the distance between the chart columns with the help of the GapPercent property of the NBarPresentGroup object.

In practice it is often required to show columns that represent data from different measures. Figure 2 shows the typical dollar and unit sales chart, where it is necessary to scale the units on a different axis (the so called secondary axis), because if both columns are scaled on the left axis the unit sales cylinders will be very small and the chart will become unreadable. To help you solve this problem the NBarPresentGroup object has three methods, which help you map and unmap levels of the data storage to different chart axes. If a level does not have an explicit secondary axis specified then the default present group axis is used (the left axis by default). The following code maps the unit sales (level 1) on the right chart axis:

bar.MapLevelAxis 1, atRightAxis

If you want to remove a level from a secondary axis then you can use the UnmapLevel function:

bar.UnmapLevel 1 ' Level 1 is now not mapped to any secondary axis

And finally you can query on which axis is a specific level mapped with the help of the GetLevelAxis mehtod:

Dim axis As AxisType
bar.GetLevelAxis 1, axis

In the case of multi column bar charts the uniform appearances are distributed across the levels of the chart. The chart on figure 2 has two uniform appearances with red and green fill effects and materials. The labels of these appearances are set to "Dollar Sales" and "Unit Sales" respectively. And finally the legend is instructed to show the uniform appearances:

bar.Common.LegendMode = pglmUniformAppearances

It is often required to show large numbers with small difference between one another. For example a chart with three values 1 000 001, 1 000 002, 1 000 010 will produce three bars with visually equal height because the relative difference between the data values is too small. In these cases you need to use origins to fix the problem. Two methods of the NBarPresentGroup help you deal with origins. The first is SetLevelOrigin. With it you set an origin value for a particular level and the mode in which it will be used. If the level origin mode is turned on then the origin of the bars displayed for this level will be the specified origin value. If the level origin mode is turned off then the origin will be the minimal value of the level. The following code sets the origin of the dollar sales bars to 50 (see figure 2).

bar.SetLevelOrigin 0, 50, True

If you use the same call with False for the UseOrigin parameter, then the red bars will begin from 100 (the minimum of level 0). By default the origin for all columns is 0.

Creating Horizontal Charts. Horizontal bar charts are created in the same way as vertical bar charts, but need different settings for the axis text positions and the viewer projection. The following image represents a horizontal bar chart:

figure 3.

The 3DChart component has several predefined projection types, which greatly simplify the creation of horizontal charts. The image on figure 3 was created with the pp2DHorizontalLeft predefined projection type. The following code sets this projection:

NChart1.Get3DView.SetPredefinedProjection pp2DHorizontalLeft

The axis texts also have three predefined position settings. The image on figure 3 uses patpHorizontalLeft predefined text position for the texts on the categories and front axes. The following code sets these predefined positions.

NChart1.Axes(atFrontAxis).SetPredefinedTextPosition patpHorizontalLeft
NChart1.Axes(atCategoriesAxis).SetPredefinedTextPosition patpHorizontalLeft

Join Lines. The user can show join lines between the bars with the help of the HasJoinLines property. The appearance of the join lines can be controlled with the help of the NLineProperties object accessible with the help of the JoinLineProps method. The following code displays blue join lines connecting the bars.

bar.HasJoinLines = True
bar.JoinLineProps.Color = vbBlue

Figure 4 shows a cut edge bar chart with join lines.

Figure 4

Related Examples. Probably the best tutorial on creating bar charts is the supplied example located in the Examples\NChart\VB\PresentationGroups\Bar directory.


Stack Bar Chart

Overview. The stack bar charts are created with the help of the NStackBarPresentGroup object. The user is able to control the width and depth of the stacks in percents of the chart cell. Stacked and Stacked Percent stack styles are supported. The shape of the stack items can be one of the following: bar, cylinder, cone, inverted cone, pyramid, inverted pyramid, smooth edge bar or cut edge bar.

Data Requirements. Stack Bar charts need major data type 1 (at least one value).

Data Usage. The NStackBarPresentGroup uses Value1 as the value of each bar

Creating Stack Charts. Stack charts are automatically created when the range of the NStackBarPresentGroup occupy more than one data level. The following snapshot shows a smooth edge stack bar chart.

figure 1.

The width and the depth of stacks are controlled with the help of the WidthPercent and DepthPercent properties of the NStackBarPresentGroup object.

The user can easily control the shape of the bar piles with the help of the Style property. When it is set to bsSmoothEdgeBar or bsCutEdgeBar the user can control the size of the edge in percents of the smaller bar dimension (depth or width) with the help of the BarEdgePercent property. The HasTopEdge, HasBottomEdge and HasMiddleEdge properties control the appearance of the respective edge or more precisely whether the respective edge is displayed in cut or smooth manner.

Uniform appearances are distributed across the levels. The image on figure 1 was created with the help of three uniform appearances with red, blue and green fill effects and materials. The legend of the component has also been instructed to show the uniform appearances of the presentation group with the following code:

Dim bar As NStackBarPresentGroup
Set bar = NChar1.PresentGroups.GetAt(0)
bar.Common.LegendMode = pglmUniformAppearances

Creating Stack Percent Charts. Stacked percent charts are created when you set the StackStyle property of the NStackBarPresentGroup object to ssStackedPercent. The image on figure 2 shows stacked bar chart.

figure 2

In stacked percent charts each stack represents the contribution of the value to 100% of the total bars value sum. Although the presentation group will automatically scale the axis from 0 to 100 you must manually add a percent sign to the axis texts. The following code sets the percent sign on the left axis:

NChart1.Axes(atLeftAxis).FormatString = "%V(2, TRUE, 1) %%"

The marks on each stack can also be configured to show different values. Figure 2 demonstrates the percent format command. The following code instructs the NStackPresentGroup to show the percent values on the stacks:

Dim bar As NStackBarPresentGroup
Set bar = NChart1.PresentGroups.GetAt(0)
bar.Common.MartType = mtText
bar.Common.FormatString = "%P(2) %%"

Except the percent values you can instruct the NStackPresentGroup to show cumulative values on the stack with the following code:

bar.Common.FormatString = "%C(2,TRUE,1)"

Creating Horizontal Stack Charts. Horizontal bar stack charts are created in the same way as vertical stack bar charts, but need different settings for the axis text positions and the viewer projection. The following image represents a horizontal stack bar chart:

figure 3.

The 3DChart component has several predefined projection types, which greatly simplify the creation of horizontal charts. The image on figure 3 was created with the pp2DHorizontalLeft predefined projection type. The following code sets this projection:

NChart1.Get3DView.SetPredefinedProjection pp2DHorizontalLeft

The axis texts also have three predefined position settings. The image on figure 3 uses patpHorizontalLeft predefined text position for the texts on the categories and front axes. The following code sets these predefined positions.

NChart1.Axes(atFrontAxis).SetPredefinedTextPosition patpHorizontalLeft
NChart1.Axes(atCategoriesAxis).SetPredefinedTextPosition patpHorizontalLeft

Join Lines. The user can show join lines between the bars with the help of the HasJoinLines property. The appearance of the join lines can be controlled with the help of the NLineProperties object accessible with the help of the JoinLineProps method. The following code displays blue join lines connecting the bars.

bar.HasJoinLines = True

Figure 4 shows a cut edge stack bar chart with join lines.

Figure 4

Round Last Visible. When the BarStyle property of the NStackBarPresentGroup is set to bsSmoothEdgeBar or bsCutEdgeBar and the last stack of the pile contains zero values it is useful to be able to instruct the chart to round the last visible stack in order not to spoil the visual effect of the rounded stack top edges - which are rounded of course only when the HasTopEdge property is set to True). This effect can be easily achieved by setting the RoundLastVisible property to True.

Related Examples. The example located in the Examples\NChart\VB\PresentationGroups\StackBar directory shows the usage of the NStackBarPresentGroup.


Area Chart

Overiview. Area charts are created with the help of the NAreaPresentGroup object. The user is able to control the area depth, origin and visibility of the lines between the area segments. The NAreaPresentGroup must be created in the presentation groups collection with code similar to this:

NChart1.PresentGroups.Add pgtArea

Data Requirements. Area charts require major type 1 or 2 if the UseXValue property has been turned on.

Data Usage. Value1 is the elevation of the current data point. Value2 is the X position of the data point If the UseXValue property has been turned on.

Creating Multi Serie Area Charts. The image displayed on figure 1 demonstrates the usage of the NAreaPresentGroup object for the creation of area charts:

figure 1.

The lines between the area segments can be hidden or shown with the help of the DropLines property of the NAreaPresentGroup. The DepthPercent property controls the depth of the areas in percents of the chart cell depth. Other two properties - UseOrigin and Origin determine the origin point of the area. By default the area chart uses origin 0.

The user can also position the data points at arbitrary x positions when the UseXValue property is set to True.

Uniform appearances are distributed across chart series. The chart on figure one was created with three uniform appearances. The legend has also been configured to show the uniform appearances of the NAreaPresentGroup. The following code instructs the legend to show the uniform appearances of the area present group:

Dim area As NAreaPresentGroup
Set area = NChart1.PresentGroups.GetAt(0)
area.Common.LegendMode = pglmUniformAppearances

Stairs. The area can also be displayed in stairs mode. Stairs mode is enabled when the user turns on the Stairs property.

area.Stairs = True

The image on figure 2 demonstrates a stairs area chart. As you can see this area drawing mode is perfect for the visualization of hisotogram charts.

Figure 2.

Related Examples. The Examples\NChart\VB\PresentationGroups\Area directory contains an example demonstrating the usage of the NAreaPresentGroup.


Stack Area Chart

Overiview. Stack Area charts are created with the help of the NStackAreaPresentGroup object. The user is able to control the area depth, visibility of the lines between the area segments and stacking style. The NStackAreaPresentGroup must be created in the presentation groups collection with code similar to this:

NChart1.PresentGroups.Add pgtStackArea

Data Requirements. Area charts require major type 1(at least one value)

Data Usage. Value1 is the value of the area.

Creating Stack Area Charts. Stack area charts are created automatically by the NStackAreaPresentGroup object when its range occupies more than one data level. The following snapshot shows a stack area chart created with the 3DChart component.

figure 1

The uniform appearance of the NStackAreaPresentGroup are distributed along the data levels occupied by the presentation group range. The stack area chart on figure 1 has three uniform appearances with different gradient fill effects. The DropLines property of the NStackAreaPresentGroup object has been turned on. In order to show the uniform appearances in the chart legend the present group legend mode has been switched to pglmUniformAppearances.

Creating Percent Stack Area Charts. Percent stack area charts are created in the same way as ordinary stack charts, but the StackStyle property has been set to ssStackedPercent. The following image shows a percent stack area chart.

figure 2

Figure 2 also illustrates the usage of the special format string for percent stacks - the percent value. You can show the percentage of each stack area with code similar to this:

Dim area As NStackAreaPresentGroup
Set area = NChart1.PresentGroups.GetAt(0)
area.Common.MartType = mtText
area.Common.FormatString = "%P(0) %%"

Stairs. The area can also be displayed in stairs mode. Stairs mode is enabled when the user turns on the Stairs property.

area.Stairs = True

The image on figure 3 demonstrates a stairs stack area chart.

Figure 3

Related examples. You can see the NStackAreaPresentGroup in action in the VB example located in Examples\NChart\VB\PresentationGroups\StackArea directory.


Line Chart

Overview. Line charts are created with the help of the NLinePresentGroup object. The line itself can be displayed in three styles: as tube, tape or simple line. The width of the line can be controlled. The NLinePresentGroup object can be instructed to display data points in various styles and the user can control their size. The position of the data items across the Category axis can be explicitly specified - this feature is very helpful if your category axis is switched in DateTime mode.

Data Requirements. Area charts require major type 1. Major type 2 is required if the UseXValue property has been turned on. Major type 3 is required if the UseYValue property has been turned on.

Data Usage. Value1 is the elevation of the current data point. Value2 is the X position of the data point If the UseXValue property has been turned on. Value3 is the Y position of the data point If the UseYValue property has been turned on.

Creating Simple Line Charts. Simple line charts are automatically created from the NLinePresentGroup object. By default the style of the line is lpsTape and the data value points are not displayed. Figure 1 shows a line chart with tape style and bar data point marks.

figure 1.

You can easily change the style of the line to tube with the following code:

Dim line As NLinePresentGroup
Set line = NChart1.PresentGroups.GetAt(0)
line.LineStyle = lpsTube

The visibility of the data points is controlled by the HasValuePoints property. The following code displays the data points:

line.HasValuePoints = True

The style of the data points is controlled by the PointStyle property, and finally you can also control the width of the line and the size of the data points with the PointSize and LineWidth properties.

The uniform appearances of the NLinePresenetGroup need special explanation. First of all they are created in pairs - one for the line part of the line and one for the data point. The uniform appearances are distributed in pairs across the series occupied by the data range. The line chart on figure 1 has four uniform appearances - two for each serie. Appearances 1 and 3 define the visual effects displayed on the tapes, while appearances 2 and 4 define the visual effects applied on the data points. The following code creates two appearances and assigns visual effects on them (there are two appearances by default).

line.Common.UniformAppearances.Add "Line"
line.Common.UniformAppearances.Add "Point"

line.Common.UniformAppearances.GetAt(2).FillEffect.SetSolidColor vbRed
line.Common.UniformAppearances.GetAt(2).Material.SetAmbientDiffuseColor vbRed

line.Common.UniformAppearances.GetAt(3).FillEffect.SetSolidColor vbBlue
line.Common.UniformAppearances.GetAt(3).Material.SetAmbientDiffuseColor vbBlue

The legend of the 3DChart component can be configured to show the uniform appearance of the NLinePresentGroup. The component shows only one uniform appearance from each pair depending on the HasValuePoints property. The legend on figure 1 shows the uniform appearances applied on the data points of line. If the HasValuePoints is turned off the component will visualize only the appearances applied on the line segments and the legend will have two items with yellow and green legend marks.

Creating Date Time Line Charts. It is often required to position the value data points on irregular positions along the Categories axis. A typical example is a line chart which represents sales during the year, but the sales information has been received irregularly. Figure 2 shows a chart like this.

figure 2.

To display this chart the data storage must have a major type at least 2 (two values are required for each data point). Value1 of each data point is the elevation, while Value2 is the x position along the X axis. Value2 is not used by default, but you can turn it on with the help of the UseXValue property. The following code shows that:

Dim line As NLinePresentGroup
Set line = NChart1.PresentGroups.GetAt(0)
line.UseXValue = True

The Categories axis is by default operating in dimension scale mode. In order to scale the X values correctly you must switch the Categories axis in one of the Value Scale Modes (value, logarithmic or date time). The following code switched the Categories Axis in date time mode and applies proper formatting on the axis texts:

NChart1.Axes(atCategoriesAxis).ScaleMode = asmDateTimeScale
NChart1.Axes(atCategoriesAxis).FormatString = "%D(%x)"

Figure 2 also demonstrates the usage of stagger texts to solve the overlapping category axis texts. You can turn on stagger texts with the following code:

NChart1.Axes(atCategoriesAxis).StaggerTexts = True

XYZ Line Scatters. This type of line charts are created when both the UseXValue and UseYValue properties of the NLinePresentGroup have been turned on. We have already said that the categories axis must be switched in some of the Value Scale Modes, but the same must be done with series axis. For example the following code will switch the series axis in asmValue:

NChart1.Axes(atSeriesAxis).ScaleMode = asmValue

Stairs. The lines can displayed in stairs mode. Stairs mode is enabled when the user turns on the Stairs property.

line.Stairs = True

The image of figure 3 shows a XYZ scatter line chart displayed in stairs mode.

Figure 3

Related Examples. The Examples\NChart\VB\PresentationGroups\Line directory contains an example demonstrating the usage of the NLinePresentGroup object.


Stack Line Chart

Overview. Stack Line charts are created with the help of the NStackLinePresentGroup object. The line itself can be displayed in three styles as tube, tape or simple line. The width of the line can be controlled. The NStackLinePresentGroup object can be instructed to display data points in various styles and the user can control their size. Stacked and Stacked Percent stack styles are supported.

Data Requirements. Stack line charts require major type 1 (at least one value).

Data Usage. Value1 is the value of each data point.

Creating Stack Line Charts. Stack line charts are automatically created from the NStackLinePresentGroup object if the range of the group contains more than one data level. Figure 1 demonstrates a simple stack line chart.

figure 1.

The data storage on figure 1 has 1 serie, 9 categories and 2 levels. The shape of the line has been changed to tube with the following code:

Dim line As NStackLinePresentGroup
Set line = NChart1.PresentGroups.GetAt(0)
line.LineStyle = lpsTube

The data point marks has been visualized with sphere shape. The following code achieves this result:

line.HasValuePoints = True
line.PointStyle = psSphere

The uniform appearances of the NStackLinePresenetGroup are created in pairs - one for the line part of the line and one for the data point. The uniform appearances are distributed in pairs across the levels occupied by the data range. The stack line chart on figure 1 has four uniform appearances - two for each data level. Appearances 1 and 3 define the visual effects displayed on the tubes, while appearances 2 and 4 define the visual effects applied on the data points. The following code creates two appearances and assigns visual effects on them (there are two appearances by default).

line.Common.UniformAppearances.Add "Line"
line.Common.UniformAppearances.Add "Point"

line.Common.UniformAppearances.GetAt(2).FillEffect.SetSolidColor vbRed
line.Common.UniformAppearances.GetAt(2).Material.SetAmbientDiffuseColor vbRed

line.Common.UniformAppearances.GetAt(3).FillEffect.SetSolidColor vbBlue
line.Common.UniformAppearances.GetAt(3).Material.SetAmbientDiffuseColor vbBlue

The legend of the 3DChart component can be configured to show the uniform appearance of the NStackLinePresentGroup. The component shows only one uniform appearance from each pair depending on the HasValuePoints property. The legend on figure 1 shows the uniform appearances applied on the data points of line. The following code instructs the component to show the uniform appearance of the NStackLinePresentGroup:

line.Common.LegendMode = pglmUniformAppearances

If the data value points are not visualized the legend of the component will have one red and one green item each having the label assigned to the respective uniform appearance.

Creating Stack Percent Line Chart. Stack percent line charts are created in the same way as ordinary stack line charts, but you set the StackStyle property of the NStackLinePresentGroup to ssStackedPercent:

line.StackStyle = ssStackedPercent

Figure 2 shows a nice example of the stack percent line chart with displayed percents on each data point.

figure 2.

The texts on each data item show the percent contribution of each data point value to the total 100%. The following code achieves this result:

line.Common.MartTyoe = mtText
line.Common.FormatString = "%P(0)%%" ' show the percent sign with no decimal precision

The NStackLinePresentGroup supports one more interesting text formatting command. The following code instructs the data points to show the current value sum (cumulative stack value):

line.Common.FormatString = "%C(2,TRUE,1) " ' 2 decimal places, commas on thousands and no division

Stairs. The stack line charts can also be displayed in stairs mode. This mode is enabled when the Stairs property of the NStackLinePresentGroup is set to True.

line.Stairs = True

Related Examples. The Examples\NChart\VB\PresentationGroups\StackLine directory contains an example demonstrating the usage of the NStackLinePresentGroup object.


Surface Chart

Overview. Surface charts are automatically created with the help of the NSurfacePresentGroup object. The surface present group supports many frame and filling variations. It can also be displayed in flat mode (contour chart) at an arbitrary vertical position. The surface chart supports two types of surfaces: with X and Y coordinates calculated from a rectangular grid (GridXY) and with X and/or Y coordinates defined by the user (FreeXY). It has lots of additional features like surface holes, surface sides, custom palettes etc.

Data Requirements. The data requirements depend on the used features:
For GridXY surface charts the required major type is 1 (at least one value). If the “surface holes” are turned on then the required major type is 2.

For FreeXY surface charts that use only X values, the required major type is 2. For FreeXY surface charts, that use only Y values or both X and Y values, the required major type is 3. FreeXY charts cannot display surface holes.

Data Usage. Value1 is the elevation of each data point for all types of surfaces.

If the SurfaceHoles feature is turned on (UseXValue and UseYValue are off), then Value2 defines which data point is valid surface point. If the point value is 0, then the point is valid and will be shown. If the point value is different from 0, then the point is invalid and in that place a hole will be shown.

If UseXValue is turned on, then Value2 is the x-coordinate of a data point.
If UseYValue is turned on, then Value3 is the y-coordinate of a data point.

Frame Styles. The NSurfacePresnentGroup object supports several frame styles including: Mesh, Contour, Mesh Contour, Dots and no frame at all. You can change the style of the frame with the FrameStyle property. The following code changes the frame style to mesh contour:

Dim surface As NSurfacePresentGroup
Set surface = NChart1.PresentGroups.GetAt(0)
surface.FrameStyle =- sfsFrameMeshContour

The user is able to render the frame with or without palette. The PaletteFrame controls this surface feature. If the PaletteFrame property is turned off the surface frame is displayed with the FrameLine properties. The following images demonstrate the different frame styles.

Meshed surface frame with no applied palette | Contour frame with applied palette.
Mesh Contour frame with applied palette | Dots frame with no palette.
Table 1

Fill Styles. The 3DChart component also supports several surface fill styles including: Mesh, Zone and no filling at all. The images on Table 1 for example are rendered with no filling at all. The fill style is controlled with the FillStyle property of the NSurfacePresentGroup. The following code enables the zone filling of the surface:

surface.FillStyle = sfsFillZone

The filling of the surface can also use a palette if the PaletteFill property is set to True. The zone filling uses palette filling by default (there is no other possible filling for zones).

When the surface is rendered in mesh style and the PaletteFill is disabled, the user is able to apply individual fill effects for every element of the surface mesh. In this mode if the Uniform Appearances are enabled the user can even map a texture on the entire surface, although this operation will be time costly if the surface is rendered with big complexity.

The following table visually illustrates several types of fillings:

Mesh palette filling | Zone palette filling
Uniform mesh filling with texture | Fill effects applied on individual data items
Table 2

Palette. The 3DChart gives the user unique surface palette control. By default the surface uses automatic palette. The automatic palette can be synchronized with the axis ticks or a fixed number of steps can be defined. The mode is controlled by the SyncPaletteWithAxisScale property. The number of steps is defined by the PaletteSteps property. The following code creates a palette with 4 steps:

surface. SyncPaletteWithAxisScale = False
surface. PaletteSteps = 4

The advantage of these types of palette filling is that the component will automatically assign colors to values. Sometimes though, you might want to specify exactly the color mapped on a particular elevation. In this case, you can manually set the palette entries. The first step to take in this direction is to turn off the automatic palette.

surface.AutomaticPalette = False

The Palette method of the NSurfacePresentGroup returns a NPalette object that helps you deal with palette entries. The NPalette object is a collection of color entries and the corresponding values. The methods of NPalette are Add, GetAt, RemoveAt, RemoveAll and GetCount. The names of the methods describe exactly the effect they have on the palette. The following code inserts three entries into a palette:

palette.RemoveAll
palette.Add 10, vbRed
palette.Add 20, vbGreen
palette.Add 40, vbBlue

The newly created palette will map red color to value 10, green color to value 20 and blue color to value 40. As you can see one of the advantages of the custom palette is that it can map colors to irregular value intervals.

Another truly unique feature of the 3DChart surface palette is that it can be switched it smooth mode. In this mode the control gradients the palette on the surface. The following code turns on the smooth palette.

surface.SmoothPalette = True

The following images demonstrate a custom palette with disabled and enable smooth palette.

Custom palette used for the zone filling | Smooth palette used for the zone filling
Table 3

The user is also able to control the transparency of the palette with the PaletteTransparency property. The following code makes the palette 50% transparent.

surface.PaletteTransparency = 50

The following image demonstrates a transparent smooth palette zone filling.

Figure 1

Palette legend. Showing legend data items for each individual item on of the surface is not a very smart thing to do especially if the surface represents data array of thousands of elements. In most of the cases you just want to display the color mapped to a particular elevation or elevation range. That is why the surface uses the custom legend presentation type to show the current palette entries. The following code enables this legend mode.

surface.Common.LegendMode = pglmPresentationGroupCustom

The legend format string used to format the texts displayed on the legend data items supports two commands that display the palette entries. The first one is P1. The following code will show all the palette entries of the surface.

surface.Common.LegendFormatString = "%P1(2,TRUE,1)"

The other command is P2 it is used with format command P1 to show a range of values displayed with the same color. In this mode the component automatically ignores the last palette element because it is not used. The following code displays value range colors.

surface.Common.LegendFormatString = "%P1(2,TRUE,1) - %P2(2,TRUE,1)"

The pictures in Table 4 demonstrate the usage of these formatting commands to display the palette entries.

In the case of smooth palette the colors are mapped on exact values that is why we use palette legend with format P1 | Colors are mapped on value ranges that is why we use the P1 - P2 format, which does not display the last palette item (it is not used)
Table 4

Contour Chart. Contour charts are created when the DrawFlat property of the NSurfacePresentGroup is turned on.

surface.DrawFlat = True

The user is then able to position the contour at an arbitrary vertical position. Two properties control the vertical position of the control. They are PositionMode and PositionValue. The contour can be positioned in three modes: spmFloor, spmCeiling and spmCustom. When you set the PositionMode property to spmFloor or spmCeiling the component ignores the PositionValue and places the contour at the chart floor or ceiling respectively. When you set the PositionMode to spmCustom, then the contour is positioned at the specified value from PositionValue. The following code positions the surface at value 5.

surface.PositionMode = spmCustom
surface.PositionValue = 5

The following image visually represents a contour positioned at custom elevation.

FreeXY Surface. This feature of the 3DChart surface presentation group gives the user the ability to specify x and y coordinates for every point in the surface. There are two separate properties for each coordinate: UseXValue - enables the feature for x-coordinates, and UseYValue - respectively for y-coordinates. If UseXValue is set to True the surface uses Value2 of each data item as an x coordinate of the corresponding point. Otherwise, the x coordinate is calculated from the position of the data item in the data grid. If the surface works with user defined x-values then the categories axis must operate in value scale mode. If the UseYValue property is set to True the surface uses Value3 of each data item as an Y coordinate of the corresponding point in the surface. Otherwise, the y coordinate is calculated from the position of the data item in the data grid. If the surface works with user defined y-values then the series axis must operate in value scale mode.

The input set of points is triangulated in order to be visualized by the chart. For large input sets the triangulation can be a time consuming operation. That is why the output data of the triangulation can be stored internally and reused when the chart is redrawn.

This option is controlled by the OptimizedTriangulation property. This property is taken into consideration only when the surface uses custom X and/or Y coordinates. If the property is set to False then the input set of points is triangulated on every frame (time consuming). If the property is set to True then the triangulation of the surface is pre-calculated only once and stored into memory and the surface is rendered faster.

The surface can be explicitly triangulated again with the ReTriangulate method. If the optimization is turned on and you want to add new points to the surface or modify some existing points, you will have to call ReTriangulate after adding/modifying. You don’t need to turn on OptimizedTriangulation if you are going to render a set of points only once.

The following image represents a typical FreeXY surface.

Surface Holes. This feature makes possible holes to be displayed in the surface. It is supported only by GridXY surfaces. The SurfaceHoles property controls this option. If SurfaceHoles is set to True then Value2 specifies whether a point is "valid" or "invalid". If Value2 equals 0 for a particular point, then the point is "valid". If Value2 is different from 0, the point is considered "invalid". The square segments in which an "invalid" point participates as an edge are not rendered and holes are formed in the surface.

The surface rendered on the next picture has several holes.

Surface Sides. The surface side is a set of vertical segments that surround the surface. To control the surface side, use the following properties and methods:

VisibleSurfaceSides - controls the visibility of the surface sides. By default this property is set to False and the sides are not visible.

HasSurfaceSideLines - controls the visibility of the lines separating the different surface. side segments.

SurfaceSideUseOrigin - controls the origin mode of the surface sides. When set to True the surface sides begin from SurfaceSideOrigin value. Otherwise they begin from the minimal possible value.

SurfaceSideOrigin - the origin value of the surface sides when SurfaceSideUseOrigin is set to True. The default value is 0.

SidesFillEffect - gives you access to the fill effect object of the surface sides.

SidesMaterial - gives you access to the material object attached on the surface sides.

SidesBorder - gives you access to the line properties object attached on the surface sides.

The image below shows a FreeXY surface with side walls.

Related Examples. The Examples\NChart\VB\PresentationGroups\Surface directory contains examples demonstrating the usage of the NSurfacePresentGroup object.


Point Chart

Overview. Point charts are created with the help of the NPointPresentGroup object. The user can control the point style and point size. The NPointPresentGroup can be configured to display XY and XYZ scatter charts.

Data Requirements. Point charts require major type 1, 2 or 3. Major type 2 is required when the UseXValue property is set to True. Major type 3 is required when the UseYValue property is set to True.

Data Usage. Value1 is the elevation of each data point.
Value2 is the X position of the data point if UseXValue is set to True
Value3 is the Y position of the data point if UseYValue is set to True

Creating Simple Point Charts. Simple points charts are created automatically from the NPointPresentGroup on the data range occupied by the presentation group range. The user is able to choose from the following point styles: Bar, Cylinder, Cone, Inverted Cone, Pyramid, Inverted Pyramid, Sphere, Circle and Diamond. The following code changes the point style to Sphere and sets the point size to 0.20.

Dim point As NPointPresentGroup
Set point = NChart1.PresentGroups.GetAt(0)
point.PointStyle = psSphere
point.PointSize = 0.20

The following image represents a simple points chart:

figure 1

The uniform appearances of the NPointPresentGroup are distributed across the series occupied by the presentation group range. Figure 1 has two uniform appearances, which are displayed on the chart legend. The uniform appearance collection holds one item by default. The following code creates a second uniform appearance and sets blue material and fill effect on it.

Dim appearance As NAppearance
Set appearance = point.Common.UniformAppearances.Add("Serie2")
appearance.FillEffect.SetSolidColor vbBlue
appearance.Material.SetAmbientDiffuseColor vbBlue

Creating XY and XYZ Scatter Charts. XY and XYZ Scatter Charts are created automatically from the NPointPresentGroup when you respectively set the UseXValue and UseYValue properties to True. Then the X position of the data point is extracted from Value2 and the Y position is extracted from Value3. The following code creates a XYZ scatter chart:

point.UseXValue = True
point.UseYValue = True

Because the Categories and Series axes are by default operating in dimension mode you must manually switch them to value scale mode:

NChart1.Axes(atCategoriesAxis).ScaleMode = asmValue
NChart1.Axes(atSeriesAxis).ScaleMode = asmValue

And finally it is also very useful to inflate the margins of the points so that they perfectly fit within the chart area:

point.Common.InflateMargins = True

The following picture demonstrates a XYZ scatter chart:

figure 2.

Join Lines. Since the readability of the XYZ scatter charts is very poor (the user can hardly determine the XYZ position of the points) it is very useful to display lines beginning from data points and ending at the chart walls. These lines are called join lines. Two methods of the NPointPresentGroup object help you deal with join lines. The first one is DisplayJoinLine. With its help you can show or hide the join line for a specific chart wall. For example:

point.DisplayJoinLine cwtLeft, True ' shows the join line to the left chart wall
point.DisplayJoinLine cwtRight, True ' hide the join line to the right chart wall

The other method that is related with join lines is IsJoinLineDisplayed and it gives you the possibility to query whether a join line is displayed at a specific wall.

Dim b As Boolean
b = point.IsJoinLineDisplayed(cwtLeft) ' b is True if a join line is displayed to the left wall. Otherwise it is equal to False

The image on figure 3 demonstrates a point chart with join lines.

Figure 3.

Related Examples. The Examples\NChart\VB\PresentationGroups\Point directory contains an example demonstrating the usage of the NPointPresentGroup object.


Bubble Chart

Overview. Bubble charts are created with the help of the NBubblePresentGroup object. The user can control the bubble style and bubble min and max sizes.

Data Requirements. Bubble charts require major 3

Data Usage. Value1 is the elevation of each data point.
Value2 is the X position of the data point
Value3 is the size of the bubble

Creating Simple Bubble Charts. Bubble charts are automatically created from the NBubblePresentGroup. The BubbleStyle property controls the style of the bubbles. The following bubble styles are supported: Bar, Cylinder, Cone, Inverted Cone, Pyramid, Inverted Pyramid, Sphere, Circle and Diamond. The Circle and Diamond and styles display bubbles that do not have depth dimension. This makes possible for the 3DChart component to apply Z order on them so that the bigger bubbles never overlap the smaller ones. If you want to achieve a more stunning effect you can use the Sphere bubble shape:

Dim bubble As NBubblePresentGruop
Set bubble = NChart1.PresentGroups.GetAt(0)
bubble.BubbleStyle = psSphere

The following image demonstrates the usage of the NBubblePresentGroup for the creation of bubble charts.

figure 1

You can easily change the min and max bubble sizes with the help of the MinSize and MaxSize properties of the NBarPresentGroup. The following code will instruct the chart to show the minimal bubble with size 0.2 while the biggest one will be shown with size 0.5.

bubble.MinSize = 0.2
bubble.MaxSize = 0.5

Since the Categories axis is by default operating in Dimension mode you must manually switch it in Value Scale mode. This will ensure that the X coordinates specified by Value2 of each data item are properly scaled.

It is also very useful to turn on the InflateMargins flag:

bubble.Common.InflateMargins = True

This will inflate the value range displayed by the axes with the necessary amount, so that all the bubbles fit in the chart area. It is often required to display the axes of the component at particular value position. The most common positioning for the axes is to be crossed at each others zero value. This is achieved by the following code:

NChart1.Axes(atLeftAxis).PositionAxis atCategoriesAxis, 0, True
NChart1.Axes(atCategoriesAxis).PositionAxis atLeftAxis, 0, True

As you can see the left axis is positioned at value 0 of the categories axis, while the categories axis is positioned at value 0 of the left axis. Figure 2 shows a bubble chart with crossed axes and sphere bubble.

figure 2.

Related Examples. The Examples\NChart\VB\PresentationGroups\Bubble directory contains an example demonstrating the usage of the NBubblePresentGroup object.


Stock Chart

Overview. Stock charts are created with the help of the NStockPresentGroup presentation group. The user can control various properties of the stock chart including the style of the candle, the position of the items along the X axis (date time stock chart), visibility of the traded volume bar, visibility of the open and close stick.

Data Requirements. The NStockPresentGroup requires major data type 4. Major data type 5 is required if the HasVolume property is set to True. Major data type 6 is required if UseXValue is set to True.

Data Usage. Value1 is the Open stock value
Value2 is the High stock value
Value3 is the Low stock value
Value4 is the Close stock value
Value5 is the Traded Volume value if HasVolume has been set to True.
Value6 is the position along the X axis if UseXValue is set to True. This value is used as date - time position.

Creating Simple Stock Charts. By default the NStockPresentGroup creates a Open - High - Low - Close charts. The initial shape of the candles is csBar. The user can easily change the style of the candle with the help of the CandleStyle property.

Dim stock as NStockPresentGroup
Set stock = NChart1.PresentGroups.GetAt(0)
stock.CandleStyle = csStick

The width and depth of the candle items are controlled with the help of the CandleWidth and CandleDepthPercent properties. The CandleWidth property specifies the width of the candle in OpenGL units, while the CandleDepthPercent properties specifies the depth of the candle in percents of the floor grid cell depth. The following code changes the dimension of the candle items:

stock.CandleWidth = 0.2
stock.CandleDepthPercent = 40

Figure 1 shows a simple Open - Hi - Low - Close chart.

figure 1.

As you can see some of the items on figure 1 are painted in red while other are white. The painting color is determined by the difference between the open and close values. If the open value is bigger than the close value then the item is painted in white. On the contrary if the open value is smaller than the close value the item is painted in red.
The uniform appearances of the NStockPresentGroup need special explanation. First of all there are four entries in the uniform appearance collection - for the up and down items, for the High - Low line and for the traded volume. The red items on figure one use uniform appearance 0, while the white ones use uniform appearance 1. The High - Low line is rendered with the help of the line properties of uniform appearance 2. The following code will make the red items blue, the white items - yellow and the line - green.

stock.Common.UniformAppearances.GetAt(0).FillEffect.SetSolidColor vbBlue
stock.Common.UniformAppearances.GetAt(0).Material.SetAmbientDiffuseColor vbBlue

stock.Common.UniformAppearances.GetAt(1).FillEffect.SetSolidColor vbYellow
stock.Common.UniformAppearances.GetAt(1).Material.SetAmbientDiffuseColor vbYellow

stock.Common.UniformAppearances.GetAt(2).Border.Color = vbGreen

The visibility of the line connecting the high and low values is easily controlled with the help of the ShowHighLow property.

Creating High - Low - Close and High - Low - Open Charts. These charts are simply variations of the Open - High - Low - Close chart. The first step you need to make is switch the candle style to stick:

stock.CandleStyle = csStick

The visibility of the open and close value is easily controlled with the help of the ShowOpen and ShowClose properties. The following code hides the Open value.

stock.ShowOpen = False

It is also important to understand that the csStick style forces the entire sticks to be displayed with the border properties of the respective uniform appearance (for an up or down value) and that when this style is active the line properties for the high - low line are not taken into account.

The image on figure 2 shows a typical High - Low - Close chart.

figure 2.

Creating Date Time Traded Volume Charts. Except the Open - High - Low - Close values it is often required to show the traded volume. The traded volume is extracted from Value5. You instruct the NStockPresentGroup to show the traded volume with the following code:

stock.HasVolume = True

The user can easily control the style of the volume bars with the help of the VolumeStyle property. The style of the volume bars can be one of the following: Bar, Cylinder, Cone, Inverted Cone, Pyramid, Inverted Pyramid, Smooth Edge Bar and Cut Edge bar. When the style is set to bsCutEdgeBar or bsSmoothEdgeBar the user can modify the VolumeEdgePercent property which controls the size of the edge in percents of the smaller bar dimension (width or depth). He can also control whether the top and bottom edges of the volume bar are displayed in cur or smooth manner with the help of the VolumeHasBottomEdge and VolumeHasTopEdge properties. By default the VolumeHasTopEdge is set to True, while the VolumeHasBottomEdge is set to False. The following code changes the style of the volume bars to cut edge bars and displays the bottom edge.

stock.VolumeStyle = bsCutEdgeBar
stock.VolumeHasBottomEdge = True

Because the traded volume values are from a different measure they need to be scaled on a different vertical axis. The following code scales the volume on the right axis.

stock.VolumeAxis = atRightAxis

The user is also able to control the volume bar style, width, depth percent and origin value. By default the Volume bars use origin 0. Turning off the UseVolumeOrigin property will scale the volume bars from the minimal to the maximal volume. The following code modifies some volume properties

stock.VolumeStyle = bsSmoothEdgeBar
 ' the style is smooth edge bar
stock.VolumeEdgePercent = 35 ' 35% from the smaller bar dimension (width
 or depth)
stock.VolumeWidth = 0.20 ' absolute value in OpenGL units
stock.VolumeDepthPercent = 40 ' 40% of the grid cell depth
stock.UseVolumeOrigin = True ' volume origin is 10
stock.VolumeOrigin = 10

The stock data points sometimes need to be visualized on an arbitrary position of the Categories axis. This is the case when the stock information has been received on irregular date time intervals. To solve this you need to specify the position of the stock item along the Categories axis in Value6 of each data item and turn on the UseXValue property.

stock.UseXValue = True

It is also required to manually change the scaling mode of the Categories axis to some of the value scale modes (for example DateTime). The following code changes the scale mode of the categories axis and applies proper formatting on the axis texts.

NChart1.Axes(atCategoriesAxis).ScaleMode = asmDateTime
NChart1.Axes(atCategoriesAxis).FormatString = "%D( %x)"

Since the long axis texts may overlap you can turn on the text stagger on the Categories axis.

NChart1.Axes(atCategoriesAxis).StaggerTexts = True

Also, because the stock items may go outside the chart area you may also consider turning on the InflateMargins property.

stock.Common.InflateMargins = True

The image on figure 3 represents a typical Open - High - Low - Close - Volume chart with a date time categories axis.

figure 3.

The legend on figure 3 has been configured to show the uniform appearances of the NStockPresentGruop object.

stock.Common.LegendMode = pglmUniformAppearances

Related Examples. The usage of the NStockPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\Stock directory.


Float Bar Chart

Overview. Float bar charts are created with the help of the NFloatBarPresentGroup object. The style of the bars can be one of the following Bar, Cylinder, Cone, Inverted Cone, Pyramid, Inverted Pyramid, Smooth Edge Bar or Cut Edge Bar. The width of the bas can also be controlled.

Data Requirements. The NFloatBarPresentGroup requires major data type 2.

Data Usage. Value1 is the beginning value of the bar.
Value2 is the bar end value.

Creating Floating Bars. Floating bars are automatically created from the NFloatBarPresentGroup on the data range it occupies. The style of the bars can be controlled with the BarStyle property. The following code changes the bar style to smooth edge bar and changes the smooth edge percent to 30.

Dim floatbar As NFloatBarPresentGroup
Set floatbar = NChart1.PresentGroups.GetAt(0)
floatbar.BarStyle = bsSmoothEdgeBar
floatbar.BarEdgePercent = 30

By default when the style of the floating bars is set to bsCutEdgeBar or bsSmoothEdgeBar both the top and bottom bar edges are displayed in the respective manner. You can modify this with the help of the HasBottomEdge and HasTopEdge properties.

The user is also able to control the width and depth of the bars in percents of the floor grid cell. The following code sets the bars dimensions to 60 percent of the floor grid cell.

floatbar.WidthPercent = 60
floatbar.DepthPercent = 60

It is also often required to display the floating bars horizontally. The 3DChart has several methods that make this task easy. First you need to change the projection to horizontal left:

NChart1.Get3DView.SetPredefinedProjection pp2DHorizontalLeft

And the other thing to do is change the axis text position to reflect the new projection. The following code will properly position the axis texts on the front and categories axis.

NChart1.Axes(atFrontAxis).SetPredefinedTextPosition patpHorizontalLeft
NChart1.Axes(atCategoriesAxis).SetPredefinedTextPosition patpHorizontalLeft

By default all presentation groups are initially scaled on the left chart axis. Changing the presentation group axis is achieved by the following code:

floatbar.Common.DisplayOnAxis atLeftAxis, False ' do not scale on left axis
floatbar.Common.DisplayOnAxis atFrontAxis, True ' and scale on the front axis

The following image visually represents a Horizontal Floating bar chart.

figure 1

The legend texts of the floating bars also requires some explanation. Since the values for the bar begin and end are specified as date time you would like to display them as such (not as simple values). The following code shows the items labels and begin and end dates on the 3DChart legend.

floatbar.Common.LegendFormatString = "%L %D1(%x) %D2(%x)"

Related Examples. The usage of the NFloatBarPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\FloatingBars directory.


Pie Chart

Overview. Pie charts are created with the help of the NPiePresentGroup presentation group object. The style of the pies can be one of the following: Pie, Torus and Smooth Edge Pie. The user is also able to control the radius, depth and begin angles as well as the detachment of the pie segments from the pie center.

Data Requirements. The NPiePresentGroup requires major data type 2.

Data Usage. Value1 is the value of the pie segment.
Value2 is the detachment of the pie from the pie center in OpenGL units.

Creating Pie Charts. Pie charts are automatically created when the NPiePresentGroup is added to the presentation group collection. The user controls the style of the pie segments with the PieStyle property. When the pie style is set to psSmoothEdgePie the user can specify the size of the smooth edge in percents of the pie segment depth. The following code changes the style of the pie to smooth edge pie and sets the smooth edge to 30 percent.

Dim pie As NPiePresentGroup
Set pie = NChart1.PresentGroups.GetAt(0)
pie.PieStyle = psSmoothEdgePie
pie.PieEdgePercent = 30

The dimensions of the pie chart can be controlled trough the Depth and Radius properties. The BeginAngle property specifies the initial rotation of the first item. The NPiePresentGroup is an exclusive presentation group, which means that it cannot be combined with other presentation groups and will automatically hide the chart walls and axes. The TotalAngle property control the total angle (in degrees) in which pies are displayed. By default this property is of course 360.

Since the standard 2DHalf projection is not very suitable for pies you may consider switching the projection to 3DTop or 2DTop with elevation 45 degrees. The following code will load the 3DTop predefined projection and will set the elevation to 45 degrees.

NChart1.Get3DView.SetPredefinedProjection pp3DTop
NChart1.Get3DView.Elevation = 45

The following image visually represents a smooth edge pie chart.

figure 1

Pie slices can easily be sorted in ascending or descending manner. This is achieved with the help of the OrderMode property is set to pomAscending or pomDescending.

pie.OrderMode = pomAscending ' sort the pies ascending

And of course it can be disabled - just set the OrderMode property to pomNone.

Pie Grouping. The pie grouping is a feature designed to help you increase the readability of pie charts containing multiple small pie slices. The slices that cover a certain criteria are grouped in one slice. Pie grouping is enabled when the GroupMode is set to either pgmBelowValue or pgmBelowPercent. As their names suggest the first grouping mode groups slices that are smaller than a certain value, while the second grouping mode groups the slices that are smaller than a specified percent. In both cases this value (absolute or in percents) is specified with the help of the GroupValue property. The following table describes the properties of the NPiePresentGroup that control various aspects of the grouped pie slice:

Property | Description
GroupLabel | Specifies the label of the group slice
GroupDetachment | Detachment of the group slice
GroupFillEffect | Gives you access to the fill effect applied on the group slice
GroupMaterial | Gives you access to the material applied on the group slice
GroupBorder | Gives you access to the line properties controlling the appearance of the group slice border
GroupMouseResponse | Gives you access to the mouse response properties of the group slice
GroupTextEx | Gives you access to the NTextEx object controlling the appearance of the group slice texts (when the UniformMarks property of the NPresentGroupCommon object is set to False)
GroupAnnotation | Gives you access to the NAnnotation object controlling the appearance of the group slice annotations (when the UniformMarks property of the NPresentGroupCommon object is set to False)

Related Examples. The usage of the NPiePresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\Pie directory.


Doughnut Chart

Overview. Doughnut charts are created with the help of the NDoughnutPresentGroup presentation group object. The style of the doughnuts can be either segment or torus The user is also able to control the radius, begin angle and ring detachment of each individual ring.

Data Requirements. The NDoughnutPresentGroup requires major data type 4.

Data Usage. Value1 is the value of the doughnut segment.
Value2 is the detachment of the segment in OpenGL units.
Value3 is the orientation of the doughnut marks. 0 - horizontal texts, 1 - vertical texts.
Value4 is segment border mode. 0 - all borders, 1 - between rings only, 2 - between segments only, 3 - no borders at all

Creating Doughnut Charts. Doughnut charts are automatically created when you add the NDoughnutPresentGroup to the presentation group collection. The number of series contained in the presentation group range determine the number of rings displayed by the doughnut. The following code will create a doughnut chart:

Dim doughnut As NDoughnutPresentGroup
Set doughnut = NChart1.PresentGroups.Add(pgtDoughnut)

The style of the doughnut is controlled with the help of the DoughnutStyle property. Accepted values are dsSegment and dsTorus. The following code will change the doughnut style to torus.

doughnut.DoughnutStyle = dsTorus

By default all rings are displayed with the same parameters. The user is able to control the default ring radius, begin angle and default ring detachment with the help of the DefaultRingRadius, DefaultRingBeginAngle and DefaultRingDetachment properties. The BeginRadius property controls the radius of the inner rim of the first ring (by default 0). The following example modifies these properties:

doughnut.DefaultRingRadius = 0.4 ' all rings are by default 0.4 OpenGL units in width
doughnut.DefautRingBeginAngle = 30 ' sets the default begin angle of the rings to 30 degrees
doughnut.DefaultRingDetachment = 0.2 ' all rings are detached with 0.2 units from one another
doughnut.BeginRadius = 0.2 ' the doughnut has a hole in the center which is 0.2 OpenGL units in width

The image on figure 1 shows a typical doughnut chart.

figure 1

The user can set custom ring radius, begin angle and ring detachment with the help of the SetRingRadius, SetRingBeginAngle, SetRingDetachment methods. All these methods take as first argument the ring whose properties will be modified. The second argument is the value that overrides the default one. The following code modifies the radius, begin angle and detachment of the second ring.

doughnut.SetRingRadius 2, 0.6 ' ring 2 is 0.6 OpenGL units in width
doughnut.SetRingBeginAngle 2, 30 ' ring 2 begins from angle 30
doughnut.SetRingDetachment 2, 0.2 ' ring 2 is 0.2 OpenGL units detached from ring 1

At later development stage the user may want to revert some of the ring properties to their default values. The SetRingDefaultRadius, SetRingDefaultBeginAngle and SetRingDefaultDetachment methods perform this operation for the specified ring. The user can always query what the current ring radius, begin angle or detachment is with the help of the GetRingRadius, GetRingBeginAngle and GetRingDetachment methods.

doughnut.SetRingDefaultRadius 3 ' ring 3 now has the default radius
Dim detachment As Single
detachment = doughnut.GetRingDetachment 3 ' detachment is now holding the current detachment of the third ring

The user is able to show formatted texts and annotations in the ring segments. Text and annotations are visualized when the user sets the MarksType property of the NPresentGroupCommon object to mtText or mtAnnotation. The text mode is from special interest since the doughnut chart type applies orientation on the texts. By default texts are oriented horizontally or in other words parallel to the "imaginary" radian line connecting the doughnut segment center to with the doughnut chart center. The user can change this orientation to vertical (or in other words perpendicular to the radian lines) by setting the corresponding data points Value3 property to 1.

It is sometimes useful to be able to control the appearance of the doughnut segment border or more exactly on which sides of the segments it is displayed. The doughnut present group provides this functionality with the help of the Value4 property of each data point. When Value4 is 0 - all borders are displayed, 1 - ring separation borders only, 2 - segment separation borders only and finally value of 4 causes the component to do not display borders at all.

The image on figure 2 shows a doughnut chart with custom ring radiuses as well as segment texts which are horizontally and vertically oriented. The possibility to control the segment borders is also demonstrated.

figure 2

Related Examples. The usage of the NDoughnutPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\Doughnut directory.


Radar Chart

Overview. Radar charts (or also called spider charts) are created with the help of the NRadarPresentGroup presentation group object. The radar has as many axes as the categories occupied by the presentation group range. The user is able to visualize data point marks with custom style and size on the radar data points. Filled radar style is also supported.

Data Requirements. The NRadarPresentGroup requires major data type 1.

Data Usage. Value1 is the value of the data point (or distance from the radar center).

Creating Radar Charts. Just adding the NRadarPresentGroup to the presentation group collection automatically creates a radar chart. The properties of the radar axis and gridlines are automatically extracted from the left axis. The properties of the radar back plane are taken from the left chart wall. The user can show data point marks with various shapes and controlled size. The following code changes the radar points to pyramids with size 0.15.

Dim radar As NRadarPresentGroup
Set radar = NChart1.PresentGroups.GetAt(0)
radar.HasValuePoints = True
radar.PointStyle = psPyramid
radar.PointSize = 0.15

The user is also able to control the X and Y radius of the radar trough the XRadius and YRadius properties. The category labels are visualized at the end of each radar axis. The user can control the distance of these texts from the radar axis end with the help of the CategoryTextOffset property.
The text visualization itself is controlled by a NTextEx object to which you can gain access with the CategoryTextEx method. The following code detaches the category texts and makes their font bigger.

radar.CategoryTextOffset = 0.30
radar.CategoryTextEx.Font.Size = 15

The user can also apply solid filling to the radar area, but first he needs to switch the NRadarPresentGroup to rsFilledArea style.

radar.RadarStyle = rsFilledArea

The uniform appearances of the NRadarPresentGroup need special explanation. First of all they are created in pairs - one for the area and another for the data point. The component distributes pair of uniform appearances across the series occupied by the presentation group range. So if for example you intend to show two filled areas you must create two data series and add two more uniform appearance to the uniform appearance collection.

The image on figure 1 demonstrates a radar chart with two series and filled areas.

figure 1.

Related Examples. The usage of the NRadarPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\Radar directory.


Polar Chart

Overview. Polar charts are created with the help of the NPolarPresentGroup presentation group object. The user can display value point marks with various styles and controlled size. The radian gridlines can be configured with custom begin angle and step.

Data Requirements. The NPolarPresentGroup requires major data type 2.

Data Usage.Value1 is the radius of the polar coordinate.
Value2 is the angle of the polar coordinate.

Creating Polar Charts. The NPolarPresentGroup automatically creates a polar chart when you add it to the presentation group collection. The properties of the polar axis and gridlines are automatically extracted from the left axis. The properties of the polar back plane are taken from the left chart wall. The user can show data point marks with various shapes and controlled size. The following code changes the polar points to spheres with size 0.15.

Dim polar As NRadarPresentGroup
Set polar = NChart1.PresentGroups.GetAt(0)
polar.HasValuePoints = True
polar.PointStyle = psPyramid
polar.PointSize = 0.15

The user is also able to control the X and Y radius of the polar trough the XRadius and YRadius properties. The category labels are visualized at the end of each polar axis. The user can control the distance of these texts from the polar axis end with the help of the LabelOffset property.

The polar shows the angle of the radian grid lines at the end of each radian line. The user can control the appearance of these texts trough the NTextEx object accessible with the LabelTextEx method.

The angle values can be displayed as radians and degrees. The LabelFormat property controls the format string used for
the angle formatting. The following code displays the texts in degrees:

polar.LabelFormat = "%D(2)"

You can change the angle values to radians with the following code:

polar.LabelFormat = "%R(2)"

The user is able to control the radian begin angle and step with the BeginAngle and AngleStep properties of the NPolarPresentGroup object. The following code rotates the polar chart to 30 degrees and makes the radian gridlines step to 45 degrees.

polar.BeginAngle = 30
polar.AngleStep = 45

The uniform appearances of the NPolarPresentGroup need special explanation. First of all they are created in pairs - one for the line and another for the data point. The component distributes pair of uniform appearances across the series occupied by the presentation group range. So if for example you intend to show two data series you must add two more uniform appearance to the uniform appearance collection.

The image on figure 1 shows a typical polar chart.

figure 1.

By default the polar is connecting the first and the last polar data points with a polar segment line. The user can override this behavior with the help of the CloseContour property. When set to False this line is not displayed. For example:

polar.CloseContour = False

Windrose Labels. Instead of angle values the labels can be configured to show geographic directions (North, West, South, East). This mode is switched on when the WindRoseLabels property is set to True. The user can control the step of the wind-rose labels with the help of the WindRoseAngleStep property. This property accepts only the following values: 15, 30, 45 and 90. The following code creates a wind-rose polar chart with angle step 15

polar.WindRoseLabels = True
polar.WindRoseAngleStep = 15

The image on figure 2 shows a wind-rose polar whose contour is not closed.

figure 2.

R elated Examples. The usage of the NPolarPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\Polar directory.


Shmoo Chart

Overview. Shmoo charts are created with the NShmooPresentGroup object. Shoo charts are widely used in the semiconductor industry to show the device response to 2 or 3 parameters (2D and 3D shmoo charts). The user can show and hide individual bits as well as show the first fail ones for a particular parameter.

Data Requirements. The NShmooPresentGroup requires major data type 2.

Data Usage. Value1 is the pass - fail bit. Accepted values are 0 - fail and 1 - pass.
Value2 is the hide - show bit. Accepted values are 0 - show and 1 - hide.

Creating Shmoo Charts. Shmoo charts are automatically created when the user adds the NShmooPresentGroup object to the presentation group collection. To properly present the shmoo charts you need to manually switch the axes in dimension mode.

NChart1.Axes(atCategoriesAxis).ScaleMode = asmDimension
NChart1.Axes(atSeriesAxis).ScaleMode = asmDimension
NChart1.Axes(atLeftAxis).ScaleMode = asmDimension

It is often required to hide all fail bits. Instead of manually traversing the data storage to set the hide - show bit you can use the AllFailHidden property of the NShmooPresentGroup to do that.

Dim shmoo As NShmooPresentGroup
Set shmoo = NChart1.PresentGroups.GetAt(0)
shmoo.AllFailHidden = True

The HighlightFirstFail property of the NShmooPresentGroup switches on and off the algorithm, which highlights the first fail bits for one of the three possible parameters (chart dimensions). The following code will highlight all fail bits for the x dimension.

shmoo.HighlightFirstFail = True
shmoo.FirstFailType = fftFirstXFail

The uniform appearance collection of the NShmooPresentGroup has three entries for the pass, fail and first fail items respectively. By default the uniform appearances are enabled, but you can turn them off and set the appearances of the items manually.

The 3DChart supports custom tooltips for individual data items. By default the component displays the default tooltip which gives information about the data point index in the data storage. You can manually set a custom tooltip at a data point with code like this.

NChart1.DataAt(0,0,0).MouseResponse.SetTooltip "Hello World"

or show no tooltip at all:

NChart1.DataAt(0,0,0).MouseResponse.SetTooltip ""

The following image represents a typical shmoo charts.

figure 1.

Related Examples. The usage of the NShmooPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\Shmoo directory.


High Low Chart

Overview. High - Low charts are created with the help of the NHighLowPresentGroup object. High - Low charts represent two trends of data - for the low and high values. The low and high areas are filled with different fill effects.

Data Requirements. The NHighLowPresentGroup requires major data type 2 or 3. Major data type 3 is required when the UseXValue property is set to True.

Data Usage. Value1 is the high value.
Value2 is the low value.
Value3 is the X position of the data point when the UseXValue property is set to True.

Creating High - Low Charts. High - Low Charts are automatically created when you add the NHighLowPresentGroup to the presentation group collection. The following code will do this:

Dim highlow As NHighLowPresentGroup
Set highlow = NChart1.PresentGroups.Add(pgtHighLow)

The user can control the depth of the High - Low area with the help of the DepthPercent property, which specifies the depth of in percents of the serie depth. The default percentage is 50.

By default the NHighLowPresentGroups uses uniform appearances to fill the high low areas as well as to paint the high and low trend lines. There are four uniform appearances - two for the areas and two for the lines. The following table gives an explanation of their usage:

Uniform Appearance Index | Usage | Remarks
0 | Fills the High Area | Set the Transparency of the FillEffect to 100 if you want to display only the High- Low lines
1 | Used for the Low Line | Only the Border properties are used
2 | Fills the Low Area | Set the Transparency of the FillEffect to 100 if you want to display only the High- Low lines
3 | Used for the Low Line | Only the Border properties are used

Figure 1 shows a typical High - Low chart.

figure 1.

Since High - Low charts are widely used for financial charting purposes it is often required to control the x position of the data points and thus create High - Low date time charts. With 3DChart you can easily do that. The UseXValue property of the NHighLowPresentGroup enables it to use Value3 of each data point as x coordinate. You must also not forget to switch the categories axis in some of the value scale modes (asmValue, asmLogarithmic, asmDateTime). The following code accomplishes these tasks:

highlow.UseXValue = True
NChart1.Axes(atCategoriesAxis).ScaleMode = asmDateTime

The DropLines flag controls the visibility of the vertical lines connecting the high and low values. The DropLinesProps method gives you access to the NLineProperties object controlling the appearance of the drop lines. For example the following code will create yellow drop lines:

highlow.DropLines = True
highlow.DropLinesProps.Color = vbYellow

Figure 2 represents a date time high low charts with transparent high and low area fill effects.

Figure 2.

Related Examples. The usage of the NHighLowPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\HighLow directory.


Map Chart

Overview. Map charts are created with the help NMapPresentGroup object. Map charts represent a set of user defined polygons. The user is able to apply fill effects, material and border properties on the polygons as well an automatic or user defined palette. Since each of the polygons has an assigned value, this value is used in the determination of the palette color used to fill the polygon. There are no restrictions on the polygons displayed by the NMapPresentGroup - they can be non convex and self intersecting.

Data Requirements. This presentation type does not imply any requirements on the data storage, since the data it represents is not described in the data storage.

Creating Map Charts. The first thing you have to do is to add the NMapPresentGroup object in the presentation group collection:

Dim map As NMapPresentGroup
Set map = NChart1.PresentGroups.Add(pgtMap)

Then you need to create the shapes you want to display. The shapes displayed by the map are contained in a collection of NMapShape objects accessible with the help of the Shapes method of the NMapPresentGroup. For example the following code will create a new map shape.

Dim shape As NMapShape
Set shape = map.Shapes.Add()

Each map shape has a collection of points, which describe the contour of the polygon. This polygon is automatically closed (you do not need to manually set the last point of the contour to be identical with the first one). The code below creates a polygon with 5 points.

shape.AddPoint 1, 7
shape.AddPoint 3, 5
shape.AddPoint 4, 5
shape.AddPoint 4, 7
shape.AddPoint 5, 8

The GetPointAt, RemovePointAt, RemoveAllPoints and GetPointCount methods of the NMapShape object are self explanatory. With their help you can modify the points of the defined polygon.

Each map shape has fill effect, material, border, mouse response, label text and annotation properties accessible with the help the FillEffect, Material, Border, MouseResponse, TextEx and Annotation methods respectively. For example:

shape.FillEffect.SetSolidColor vbRed

will cause the shape to be painted in red. The image on figure 1 shows a map chart with custom defined fill effects.

figure 1

Palette. The defined polygons can be automatically filled with a palette. Palette filling is enabled when you turn on the UsePalette flag.

map.UsePalette = True

By default the map uses automatic palette filling, which means that the component is automatically creating a palette which begins from the minimal shape value and ends at the maximal one. The user can control the number of entries in this palette with the help of the PaletteSteps property. Figure 2 shows a map chart with automatic palette filling.

figure 2

The user can also manually create the palette. First the automatic palette generation must be turned off:

map.AutomaticPalette = False

Afterwards the user must create the entries in the palette. Each palette entry in the custom palette maps a color to the specified value. For example:

map.Palette.Add 0, vbGreen
map.Palette.Add 50, vbBlue
map.Palette.Add 100, vbRed

Will define a palette which displays all map shapes with values from 0 to 50 in green and all map shapes with values from 50 to 100 in Blue. Shapes with values bigger than 100 will be displayed in red. The user can also turn on palette smoothing with the help of the SmoothPalette property of the NMapPresentGroup. When enabled the control will gradient the palette on the map shapes. For example a map shape with value 75 will be displayed with magenta color when the palette smoothing is turned on.

Legend. The map presentation group legend integration needs special explanation. Since this presentation group does not operate on any data contained in the data storage the pglmCategories and pglmSeries modes will create an empty legend. The pglmDataItems will display the map shapes in the legend. If you are using palette filling to fill the map shapes it is very useful to show the current palette in the chart legend. This is achieved with the help of the pglmPresentGroupCustom mode. The following code switches the NMapPresentGroup in this legend mode:

map.Common.LegendMode = pglmPresentationGroupCustom

The legend format string used to format the texts displayed on the legend data items supports two commands that display the palette entries. The first one is P1. The following code will show all the palette entries of the map.

map.Common.LegendFormatString = "%P1(2,TRUE,1)"

The other command is P2 it is used with format command P1 to show a range of values displayed with the same color. In this mode the component automatically ignores the last palette element because it is not used. The following code displays value range colors.

map.Common.LegendFormatString = "%P1(2,TRUE,1) - %P2(2,TRUE,1)"

Shape Depth Order

The map shapes can be placed at different depth positions, so that overlapping shapes will be displayed properly. The ShapeDepthMode property determines the algorithm for assigning depth position to each map shape. The valid values for the property are: sdmNone, sdmByOrder and sdmByValue.

When the depth mode is set to sdmByOrder, the depth position of each shape is defined by the index of the shape in the Shapes collection. The first shape in the collection has the smallest depth value (it is topmost) and each next shape has a greater depth value. If the depth mode is set to sdmByValue, then the depth of a shape depends on its associated value. The shape with the smallest value is topmost. The sdmNone mode turns off turns the shape depth ordering.

R elated Examples. The usage of the NMapPresentGroup object is demonstrated in the example located in the Examples\NChart\VB\PresentationGroups\Map directory.


Arrow Chart

Overview. Arrow charts are created and managed with the help of the NArrowPresentGroup object. Each arrow’s length, direction and appearance are controlled from the data storage, and the width of the arrows can be defined from the presentation group.

Data Requirements. The NArrowPresentGroup requires major data type 4.

Data Usage. One data item in the data storage contains the necessary data for one arrow. Each arrow is defined by four coordinates.
Value1 is the x-coordinate of the arrow pointer (this is where the arrow points to).
Value2 is the z-coordinate of the arrow pointer.
Value3 is the x-coordinate of the point where the arrow starts.
Value4 is the z-coordinate of the point where the arrow starts.

In the following example Value1 = 1.0, Value2 = 0.5, Value3 = 0.0 and Value4 = 0.2:

Figure 1.

Creating Arrow Charts. The NArrowPresentGroup object is created and placed in the presentation groups collection with the following code:

NChart1.PresentGroups.Add pgtArrow

The ArrowWidth property controls the width of the arrows. The width is in OpenGL units and the default value is 0.2. The following code changes the width to 0.5:

Dim arrow As NArrowPresentGroup
Set arrow = NChart1.PresentGroups.GetAt(0)
arrow.ArrowWidth = 0.5

Arrow charts need the following settings for the axes: the vertical axes should be in Value mode (this is the default), the Categories axis should be in Value mode and the Series axis must be in Dimension mode.

Since the Categories axis is by default operating in Dimension mode you must manually switch it in Value Scale mode. This will ensure that the X coordinates specified by Value1 and Value3 of each data item are scaled properly. (For more help on the axes see the Axes topic).

It is also very useful to turn on the InflateMargins flag:

arrow.Common.InflateMargins = True

This will inflate the value range displayed by the axes with the necessary amount, so that all the arrows fit in the chart area.

Figure 2.

Arrow charts do not use multiple levels. The NRange object associated with an Arrow presentation group cannot have more than one level. Its EndZ property always equals the BeginZ. The InfiniteZ property of the range is always False. The following lines of code will not change the properties:

arrow.Common.Range.EndZ = 5
arrow.Common.Range.InfiniteZ = True

But the next line will set both BeginZ and EndZ to 4:

arrow.Common.Range.BeginZ = 4

Related Examples. The Examples\NChart\VB\PresentationGroups\Arrow directory contains an example demonstrating the usage of the NArrowPresentGroup object.


Error Chart

Overview. Error charts are created and managed with the help of the NErrorPresentGroup object. The user can control the style and the size of the error as well as the style and the width of the error lines. The Error presentation group supports six error styles and three line styles.

Data Requirements. The NErrorPresentGroup requires major data type 2.

Data Usage. Each item is defined by a base value and an error value (deviation from the base value).
Value1 is the base value.
Value2 is the deviation value. The deviation can be specified in two ways: as an absolute value or in percents of the base value (see the ErrorsInPercents property).

Creating Error Charts. The NErrorPresentGroup object is created and placed in the presentation groups collection with the following code:

Dim err As NErrorPresentGroup
NChart1.PresentGroups.Add pgtError

The LineStyle property determines the style of the error lines. The possible values are lpsTube, lpsTape and lpsLine (default). The following example changes the line style to tube:

err.LineStyle = lpsTube

The LineWidth property controls the width of the error lines. The width is in OpenGL units and the default value is 0.1. The following code changes the width to 0.06:

Dim err As NErrorPresentGroup
Set err = NChart1.PresentGroups.GetAt(0)
err.LineWidth = 0.06

If the LineStyle is lpsLine, then the LineWidth property will not affect the width of the line, because it is a simple borderline. In this case, the width is controlled from the border properties of the data item or from the border properties of the uniform appearances (if uniform appearances are enabled).

Dim app As NAppearance
Set app = err.Common.UniformAppearances.GetAt(0)
app.Border.Color = RGB(0, 255, 0)
app.Border.Width = 5

The ErrorWidthPercent property controls the width of the errors. The width is measured in percent of the grid cell. The default value is 50, which means that the errors occupy half of the grid cell. The following code changes the width percent to 70:

err.ErrorWidthPercent = 70

The ErrorStyle property specifies the shape of the errors. There are six different error shapes: epsTop, epsBottom, epsTopBottom, epsLeft, epsRight and epsLeftRight. The default style is Top-Bottom. The Top and Bottom styles can be used to represent positive and negative deviations. For the other error styles, the appearance of the errors doesn’t depend on the deviation sign.

The following code changes the style to Left-Right:

err.ErrorStyle = epsLeftRight

If the ErrorsInPercents property is set to True then the error values (Value2) are percents of the base values (Value1). For example if Value1 is 10 and Value2 is 50 then the error will have base value 10 and the deviation will be 50% from 10, which is 5. By default the ErrorsInPercents property is set to False.

Error charts use the default settings for the axes: vertical axes operate in value mode, categories and series axes - in dimension mode. It is often useful to turn on the InflateMargins flag, especially when the LineStyle property is set to lpsTube.

err.Common.InflateMargins = True

This will inflate the value range displayed by the axes with the necessary amount, so that all the error shapes fit in the chart area.

Figure 1.

Error charts do not use multiple levels. The NRange object associated with an Error presentation group cannot have more than one level. Its EndZ property always equals the BeginZ. The InfiniteZ property of the range is always False. The following lines of code will not change the properties:

err.Common.Range.EndZ = 5
err.Common.Range.InfiniteZ = True

But the next line will set both BeginZ and EndZ to 4:

err.Common.Range.BeginZ = 4

Related Examples. The Examples\NChart\VB\PresentationGroups\Error directory contains an example demonstrating the usage of the NErrorPresentGroup object.


Error Bar Chart

Overview. Error Bar charts are created and managed with the help of the NErrorBarPresentGroup object. The user can control the style and the size of the bars, the style of the error lines and optionally the position of the bars on the categories axis.

Data Requirements. The NErrorPresentGroup requires major data type 2. If the UseXValue property is set to True then the required major data type is 3.

Data Usage. Each item is defined by a base value and an error value (deviation from the base value).

Value1 is the base value.
Value2 is the deviation value. The deviation can be specified in two ways: as an absolute value or in percents of the base value (see the ErrorsInPercents property).

Optionally one more value can be used to determine the position of the error bar on the categories axis (see the UseXValue property):

Value 3 is the x-axis value.

Creating Error Bar Charts. The NErrorBarPresentGroup object is created and placed in the presentation groups collection with the following code:

NChart1.PresentGroups.Add pgtErrorBar

The shape of the Error Bar consists of two parts – bar and error. The Error Bar presentation group object provides different properties for determining the sizes and styles of these parts.

The BarStyle property defines the shape of the bar. There are eight bar styles, the possible values are: bsBar, bsCone, bsCutEdgeBar, bsCylinder, bsInvertedCone, bsInvertedPyramid, bsPyramid, bsSmoothEdgeBar and bsCutEdgeBar. The default style is bar. This code changes the style to smooth-edge bar.

Dim errorbar As NErrorBarPresentGroup
Set errorbar = NChart1.PresentGroups.GetAt(0)
errorbar.BarStyle = bsSmoothEdgeBar

When the style of the bars is smooth-edge bar or cut-edge bar the user is able to modify the BarEdgePercent property of the NErrorBarPresentGroup. It determines the size of the edge in percents from the smaller bar dimension (width or depth). The value of the BarEdgePercent property cannot be more than 50. The HasTopEdge and HasBottomEdge properties specify which edges of the bar are smoothed (in case of smooth-edge bar) or cut (in case of cut-edge bar).

errorbar.HasTopEdge = True
errorbar.HasBottomEdge = True
errorbar.BarEdgePercent = 40

The size of the bars (width and depth) is controlled with the help of the WidthPercent and DepthPercent properties respectively. The bar dimensions are measured in percents from the grid cell dimensions.

The LineStyle property determines the style of the error lines. The possible values are lpsTube, lpsTape and lpsLine (default). The following example changes the line style to tube:

errorbar.LineStyle = lpsTube

The LineWidth property controls the width of the error lines. The width is in OpenGL units and the default value is 0.1. The following code changes the width to 0.06:

errorbar.LineWidth = 0.06

If the LineStyle is lpsLine, then the LineWidth property will not affect the width of the line, because it is a simple borderline. In this case, the width is controlled from the border properties of the data item or from the border properties of the uniform appearances (if uniform appearances are enabled).

Dim app As NAppearance
Set app = errorbar.Common.UniformAppearances.GetAt(1)
app.Border.Color = RGB(0, 255, 0)
app.Border.Width = 5

If the ErrorsInPercents property is set to True then the error values (Value2) are percents of the base values (Value1). For example if Value1 is 10 and Value2 is 50 then the error will have base value 10 and the deviation will be 50% from 10, which is 5. By default the ErrorsInPercents property is set to False.

The UseXValue property specifies whether Value3 is used as a x-coordinate of the error bars. This feature may be very useful for example if you want to assign different date-time values to the error bars.

errorbar.UseXValue = True

The image on figure one shows a typical error bar chart with inflated margins, custom x position of the error bars and tube error shape.

Figure 1.

Error charts use the following settings for the axes: vertical axes operate in value mode, series axes operate in dimension mode. The categories axis settings depend on the UseXValue property. If UseXValue is False then the default mode is used – dimension. If UseXValue is True then the mode must be manually changed to value mode (for more information about axis scale modes please refer to the Axes topic).

It is often useful to turn on the InflateMargins flag, especially when the LineStyle property is set to lpsTube.

errorbar.Common.InflateMargins = True

This will inflate the value range displayed by the axes with the necessary amount, so that all the error bar shapes fit in the chart area.

When Uniform Appearances are enabled the Error Bar presentation group uses pairs of appearances – the first appearance is for the bar shape, the second - for the error shape. The pairs of uniform appearances are distributed by series if there are multiple series. Otherwise they are distributed by categories.

Error Bar charts do not make use of multiple levels. The NRange object associated with an Error Bar presentation group cannot have more than one level. Its EndZ property always equals the BeginZ. The InfiniteZ property of the range is always False. The following lines of code will not change the properties:

errorbar.Common.Range.EndZ = 5
errorbar.Common.Range.InfiniteZ = True

But the next line will set both BeginZ and EndZ to 4:

errorbar.Common.Range.BeginZ = 4

Related Examples. The Examples\NChart\VB\PresentationGroups\ErrorBar directory contains an example demonstrating the usage of the NErrorBarPresentGroup object.


Smooth Line Chart

Overview. Smooth-line charts are similar to line charts. The main difference is that the line segments between the successive data points are not straight lines but interpolated cubic splines. Smooth-line charts are created and managed with the help of the NSmoothLinePresentGroup object. It gives the user the possibility to control the width, the style and the smoothness of the line as well as the size and type of the data points. Custom x-axis position can be assigned to each data point.

Data Requirements. Smooth line charts require major type 1. Major type 2 is required in case the UseXValue property is set to True.

Data Usage. Value1 is the elevation of the current data point. If the UseXValue property is set to True, then Value2 is the x position of the data point.

Creating Smooth Line Charts. Smooth line charts are automatically created with the help of the NSmoothLinePresentGroup object. By default the style of the line is lpsTape and the data value points are not displayed. Figure 1 shows a smooth line chart with lpsLine style and bar shape for the data points.

Figure 1.

The following code creates a smooth line presentation group and sets the style of the line to lpsLine.

Dim sml As NSmoothLinePresentGroup
Set sml = NChart1.PresentGroups.Add(pgtSmoothLine)
sml.LineStyle = lpsLine

The visibility of the data points is controlled by the HasValuePoints property. The following code displays the data points:

sml.HasValuePoints = True

The style of the data points is controlled by the PointStyle property, and finally you can also control the width of the line and the size of the data points with the LineWidth and PointSize properties.

The uniform appearances of the NSmoothLinePresenetGroup are created in pairs - one for the line segments and one for the data point. The uniform appearances are distributed in pairs across the series occupied by the data range. The smooth line chart on figure 2 has four uniform appearances - two for each serie. Appearances 0 and 2 define the visual effects displayed on the tubes, while appearances 1 and 3 define the visual effects applied on the data points.

Figure 2.

There are two appearances in the uniform appearances collection by default.
The following code creates two more appearances and edits their visual effects.

sml.Common.UniformAppearances.Add "Line 2"
sml.Common.UniformAppearances.Add "Point 2"
sml.Common.UniformAppearances.GetAt(2).FillEffect.SetSolidColor vbGreen
sml.Common.UniformAppearances.GetAt(2).Material.SetAmbientDiffuseColor vbGreen
sml.Common.UniformAppearances.GetAt(3).FillEffect.SetSolidColor vbBlue
sml.Common.UniformAppearances.GetAt(3).Material.SetAmbientDiffuseColor vbBlue

The Smoothness property controls the number of line segments, which form the cubic splines. With the increasing of this number the line becomes smoother. If this value is set to 0, the splines actually turn into straight lines. Too big values for this property can cause loss of rendering performance, especially when the line style is lpsTube.

It is often required to place the data points at custom positions along the categories axis. The UseXValue allows you to specify the custom x-coordinates as Value2 of the items in the data storage. When the UseXValue is set to true, You are able to select the interpolation method with the help of the Interpolation2D property. If this property is set to False (the default), the elevation values (Value1) are regarded as a function of the x-values (Value2). When the Interpolation2D property is set to True, the line is interpolated as a free 2D line in the XZ plane. The following figures show two curves produced from the same data, but with different interpolation methods.

Figure 3: Interpolation2D = False

Figure 4: Interpolation2D = True

Related Examples. The Examples\NChart\VB\PresentationGroups\SmoothLine directory contains an example demonstrating the usage of the NSmoothLinePresentGroup object.


Function Chart

Overview. The function presentation group is a powerful and flexible tool for creation and displaying of various mathematical, statistical and financial functions. There are more than 20 built-in functions which you can apply directly or use them to define your own more complex formulae. Function charts are created with the help of the NFunctionPresentGroup object. Functions are represented as standard line charts with numerous properties, which control the line’s style, appearance and position.

Creating Function Charts. To create a function present group and place it in the presentation groups collection use the following code:

Dim func As NFunctionPresentGroup
Set func = NChart1.PresentGroups.Add(pgtFunction)

There are two important questions, which concern the creation of function charts. The first one is how do we define what function is calculated and displayed by the presentation group? This is done with the help of the Expression property. It is a string, which contains the formula of the function and actually determines what function is calculated and displayed by the chart. The expression abides by some syntax rules, which will be explained later. The second important issue is how do we define the source data, to which the function is applied - the arguments of the function. The arguments are divided into two types – arrays and constants. An array argument is defined with the help of the NCategoryRange object. Each function present group has a collection of such objects. The NCategoryRange object has a name with which it participates in the function formula. Besides that it has several properties with which it describes a one – dimensional range (array) in the data storage. In this way, a range is associated with a name. When the name is encountered in the function formula, this means that the function will operate with the data range associated with that name. We will illustrate this with a simple example. Imagine the following situation: we have one level, one series and several categories in the data storage. We want to add a certain constant value (for example 5.3) to Value1 of every category in the series. For that purpose we create an argument and assign some name to it (for example “Arg1”).

Step 1:

Dim arg As NCategoryRange
Set arg = func.Arguments.Add("Arg1", True)

Next we have to define the range, associated with that argument.

Step 2:

arg.LevelIndex = 0 ‘ select the first level
arg.SerieIndex = 0 ‘ select the first series
arg.BeginX = 0 ‘ from the first category
arg.InfiniteX = True ‘ to the last one
arg.ValueType = dvtValue1 ‘ we are interested in Value 1

After that, we set the function expression, which calls the ADD function with our argument “Arg1” and the constant 5.3 as parameters.

Step 3:

func.Expression = "ADD(Arg1, 5.3)"

The result is displayed on figure1. The line is the function we created and the bar chart is added just to show the original values.

Figure 1.

The values that we set in step 2 for the “arg” object are actually the default values for the NCategoryRange objects. So in our case we can skip step 2 and actually we can achieve the same results with only two lines of code:

func.Arguments.Add "Arg1", True
func.Expression = "ADD(Arg1, 5.3)"

As you noticed, the example uses the “ADD” function to perform addition of the values from the range with the constant 5.3. “ADD” is one of the basic built-in functions in the function presentation group. All the functions use a common syntax, although the type and the count of their arguments vary. The syntax of a function begins with the function name, followed by an opening parenthesis, the arguments for the function separated by commas, and a closing parenthesis. Here is a list of the built-in functions. Each of them will be discussed individually in the following topics.

Add | ADD
Subtract | SUB
Multiply | MUL
Divide | DIV
Power | POW
Absolute Value | ABS
High | HIGH
Low | LOW
Count | COUNT
Average | AVERAGE
Sum | SUM
Min | MIN
Max | MAX
Cumulative | CUMSUM
Standard Deviation | STDDEV
Exponential Average | EXPAVG
Simple Moving Average | SMA
Weighted Moving Average | WMA
Exponential Moving Average | EMA
Modified Moving Average | MMA
Momentum | MOMENTUM
Momentum Div | MOMENTUMDIV
Stochastic Oscillator | STOCHASTIC
Relative Strength Index | RSI
Bollinger Bands | BOLLINGER
True Range Indicator | TR
Positive Direction Index | (+DI) DI_POS
Negative Direction Index | (-DI) DI_NEG
Directional Movement Index | DMI

Note that the function expressions are case sensitive. All the function names are upper case. The names of the arguments must be typed in the expression the same way they are defined in the argument collection. The argument names must consist of alphabetic characters, digits and underscores, but cannot start with a digit. The argument names are unique inside one collection. When we setup the function present group to display some function, we must first add the arguments and after that set the expression. Before removing an argument that participates in the expression, we must first clear the expression.

Sometimes we need to use more than one array-argument. Imagine that we have two products – apples and bananas and the data for the sales of these products is displayed in a multi – column bar chart:

Now we want to add a function to display the total sales for each month by adding the values for the apples and the bananas.

Step 1: create the presentation group

Dim func As NFunctionPresentGroup
Set func = NChart1.PresentGroups.Add(pgtFunction)

Step 2: add the first argument. The data for the apples is in data level 0, so we don’t need to change any properties for this argument.

func.Arguments.Add "Apples", True

Step 3: add the second argument. The data for the bananas is in data level 1, so we have to change the LevelIndex property of the new NCategoryRange object to 1.

func.Arguments.Add("Bananas", False).LevelIndex = 1

Note: the second parameter of the Add method of the argument collection will be explained later. It is not significant for the current example.

Step 4: set the function expression.

func.Expression = "ADD(Apples, Bananas)"

The result is displayed on figure 3:

In the previous examples, the function results were arrays of values. There are functions, which do not return arrays but just a single value – such functions are for example AVERAGE or COUNT. The ADD function also returns a constant result if all of its arguments are constants (for example: “ADD(4.5, 7.8)” ). Unlike the array results, the constant results are displayed as a single line segment. The following chart uses the AVERAGE function to display the average value of the apple sales per month:

Here is the code for this example:

Dim func As NFunctionPresentGroup
Set func = NChart1.PresentGroups.Add(pgtFunction)
func.Arguments.Add "Apples", True
func.Expression = "AVERAGE(Apples)"

Of course, in the same way we can calculate the average sales for the bananas, just the last two lines must be changed to:

func.Arguments.Add("Bananas", True).LevelIndex = 1
func.Expression = "AVERAGE(Bananas)"

But what can we do if we want to calculate the average value of the total sales. One way to do this is to use the result of the ADD function as an argument for the AVERAGE function. Functions can be used as arguments for other functions. When a function is used as an argument, or nested, it is only required that it returns the same type of result that the outer level function needs. In our case the expression will be:

“AVERAGE( ADD(Aplles, Bananas) )”

The whole code will look like that:

Dim func As NFunctionPresentGroup
Set func = NChart1.PresentGroups.Add(pgtFunction)
func.Arguments.Add "Apples", True
func.Arguments.Add("Bananas", False).LevelIndex = 1
func.Expression = "AVERAGE( ADD(Apples, Bananas) )"

Various complex formulae can be composed with the help of the function nesting. For example, the formula of the Root Mean Square is:

The corresponding expression for this function is:

“POW(AVERAGE(POW(a, 2)), 0.5)”

In this formula ‘a’ is an array argument and ‘POW’ stands for the Power function which calculates the square of each element in ‘a’ and square root of the result of the AVERAGE function. In this case we have three levels of nesting. The argument ‘a’ is a category range but, of course, it can be replaced with a call to a function, which returns an array result.

Another example for function nesting is the financial function MACD (Moving Average Convergence Divergence). It is defined as the difference between a 26-day and 12-day exponential moving average. The expression for the MACD function is:

“SUB(EMA(Arg,12), EMA(Arg,26))”

Figure 6.

Figure 6 displays a high-low-close chart and a MACD function applied to the close values.

Both RMS and MACD are included in the function presentation group as predefined expressions. The LoadFunction method of the presentation group can be used to load any of the predefined expressions and the necessary arguments for them. It can help you skip the process of setting up arguments and expressions and reduce it to a single function call. The method provides frequently used expressions and arguments with standard settings. It receives as a parameter a constant of type PredefinedFunction which identifies the function that must be loaded. For example, the following code:

func.LoadFunction pfRSI

will load the expression “RSI(open, close, 14)” and the arguments “open” and “close”. Both arguments will have LevelIndex = 0 and SerieIndex = 0, but the ValueType property of “open” will be dvtValue1, while for “close” it will be dvtValue4. These values are set as defaults for the RSI (Relative Strength Index) because it is usually used with OHLC charts, which interpret Value 1 as open price and Value 4 as close price. Therefore, if you create an OHLC chart and load the RSI function, the 14 – day Relative Strength Index will be displayed.

With the help of several properties of the function presentation group, you are able to customize the position of the function line on the categories and the series axis. The XPositionRange property selects the range with which the x-position of the line will be synchronized. It is a string property and it contains the name of the range as it is defined in the argument collection. When the UseXValue is set to False the function line is positioned on the categories axis according to the BeginX property of the x-position range. When the UseXValue is set to True you can assign a custom x-position to every point of the function result. The x-coordinate values are the values determined by the XValueType property from the range that is defined by the XPositionRange property.

There are two rules, which have to be observed strictly:

1. It is obligatory to set a valid value for the XPositionRange range property. Otherwise, the function line will not be displayed.

2. The number of elements of the selected category range must be equal or greater than the size of the function result. Let’s for example add a range A1 with size 10 which we want to use as an argument for the ADD function: “ADD(A1, 5)”. The result of the function will be an array with size 10, so we will have to use as a x-position range some argument with size greater or equal to 10. Usually we set as a x-position range an argument, which participates in the expression (in this case A1), but this is not obligatory.

The value of the XPositionRange property can be set with the help of the Add method of the argument collection. The second parameter of this method is a boolean value. If it is True, then the range that is added will be set as a x-position range. The following code:

func.Arguments.Add "Arg1", False
func.XPositionRange = "Arg1"

is the same as:

func.Arguments.Add "Arg1", True

The next figure shows an error-bar chart and a function chart with custom x positions of the data points:

Similar to the XPositionRange property is the AppearanceRange property. It points to a range that contains appearances and labels for the line segments. If we want to assign individual appearances to every data point, we have to select some range as an appearance range and set the EnableUniformAppearance property to False. Unlike the x-position range, there are no special requirements for the size of the appearance range.

The y-position of the function line is controlled by the YPositionValue and the YAlignmentMode properties. The first one is a value on the series axis on which the line is placed, and the second selects one of the three possible alignment modes: center, front or back. The properties which control the outlook of the function line are: LineStyle, LineWidth, HasValuePoints, PointSize, PointStyle. They behave the same way as in the line presentation group.

Related Examples. The examples located in the Examples\NChart\VB\PresentationGroups\Functions directory demonstrate the capabilities of the function presentation group.


Absolute Value

Syntax:

ABS(A1)

Arguments:

Accepts one argument, which may be a constant or an array.

Result:

If the argument is a constant, the result is also a constant. If the argument is an array, the result is an array.

Description:

Each element of the result is equal to the absolute value of the corresponding element of the input argument.

Example:

arg1: -3 10 4 -7 -12
Expression: ABS(arg1)
Result: 3 10 4 7 12


Add

Syntax:

ADD(A1, A2 [, A3] ...)

Arguments:

Accepts two or more arguments, which may be either constants or arrays.

Result:

If all the arguments are constants, the result is a constant.

If there is at least one array-argument, the result is an array. The size of the result is equal to the size of the input array.

If there is more than one array-argument, the size of the result is equal to the size of the smallest array-argument.

Description:

Each element of the result is a sum of the corresponding elements of the input arguments.

Example 1: (two constants)

Expression: ADD(2.5 , 6.1)
Result: 8.6

Example 2: (array and constant)

arg1: 5.8 3.2 1.0 6.9 11
Expression: ADD(arg1, 10)
Result: 15.8 13.2 11.0 16.9 21

Example 3: (two arrays with equal sizes)

arg1: 5.8 3.2 1.0 6.9 11
arg2: 2.1 6.6 5.9 1.3 1.4
Expression: ADD(arg1, arg2)
Result: 7.9 9.8 6.9 8.2 12.4

Example 4: (three arrays, with different sizes)

arg1: 2.1 6.6 5.9 1.3 1.4
arg2: 4.0 2.1 3.0
arg3: 1.5 2.0 2.0 2.4
Expression: ADD(arg1, arg2, arg3)
Result: 7.6 10.7 10.9

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions1


ADX (Average Directional Movement Index)

Syntax:

The ADX is implemented as a composite function. It uses the Directional Movement Index function and the Modified Moving Average.

The expression is:

MMA(DMI(close, high, low, period1), period2)

Arguments:

The result of the DMI function is used as an argument for the MMA function. The arguments of the DMI are described in the “Directional Movement Index” topic.

Result:

The result is an array.

Description:

The ADX is a part of the Directional Movement System developed by J. Welles Wilder. The system consists of three lines:

  • The Positive Direction Indicator (+DI) summarizes upward trend movement

  • The Negative Direction Indicator (-DI) summarizes downward trend movement

  • The Average Directional Movement Index (ADX) indicates whether the market is trending or ranging

Declining ADX shows that the market is losing direction. When ADX falls below both +DI and -DI it signals a lifeless market. When ADX rises above both +DI and -DI it signals that the market is becoming overheated. The ADX is defined as a moving average of the Directional Movement Index. By default, the Modified Moving Average is used for smoothing with a period of 14 days. You can use another type of moving average by changing the original formula. For more information about the DMI and the MMA functions, see the “Directional Movement Index” and the “Modified Moving Average” topics.

Example:

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions7


Average

Syntax:

AVERAGE(A1 [, ByEveryN])

Arguments:

A1 must be an array.

ByEveryN is an optional argument – an integer constant, greater or equal to 1.

Result:

Returns a constant, which is the average value of the elements in the array A1.

If ByEveryN is supplied, then the function calculates the average value of every N successive elements and the result is an array.

Description:

Calculates the average of the elements in the input array, or the average of every N successive elements in the input array.

Example 1:

arg1: 11 7 3 5 6 1
Expression: AVERAGE( arg1 )
Result: 5.5

Example 2: (average by every 2 elements)

arg1: 11 7 3 5 6 1
Expression: AVERAGE( arg1, 2 )
Result: 9 4 3.5

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions2


Average True Range

Syntax:

The Average True Range is implemented as a composite function. It uses the True Range function and the Modified Moving Average. The expression is:

MMA(TR(cl, hi, lo), period)

Arguments:

The result of the TR (True Range) function is used as an argument for the Modified Moving Average function. The arguments of the TR are described in the “True Range” topic.

Result:

The result is an array.

Description:

Average True Range is an indicator from J. Welles Wilder that measures commitment by comparing the range for each successive day. The True Range indicator is the greatest of the following:

  • High for the day minus Low for the day.

  • High for the day minus Close for the previous day.

  • Close for the previous day minus Low for the current day.

The Average True Range is a moving average (typically 14-days) of the True Ranges.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions6


Boilinger Bands

Boillinger Bands

Syntax:

BOLLINGER(A1, period, deviation)

Arguments:

A1 must be an array.

The 'period' defines the period for the function - it must be a constant greater or equal to 1.

The 'deviation' defines the number of standard deviations the band is offset from the simple moving average of A1. For the upper band this must be a positive value and for the lower band - a negative value.

Result:

The result is an array. The first ‘period’ elements are marked as invalid.

Description:

Bollinger bands are drawn at a given number of standard deviations from a moving average of a price. Since standard deviation is a measure of volatility, the bands are self-adjusting: widening during volatile markets and contracting during calmer periods. Bollinger Bands were created by John Bollinger.

To draw the two Bollinger bands and the moving average, do the following:

1. Add three function presentation groups – one for the upper band, one for the lower band and one for the moving average.

2. Add one argument to the argument collection of each of the three presentation groups. Of course, the three arguments must point to the same data array.

3. For the upper band set the following expression in the first group:

“BOLLINGER(A1, 20, 2)”

4. For the lower band set the following expression in the second group:

“BOLLINGER(A1, 20, -2)”

5. For the moving average set the following expression in the third group:

“SMA(A1, 20)”

Mr. Bollinger recommends using "20" for the number of periods in the moving average, and using 2 standard deviations. He has also found that moving averages of less then 10 periods do not work very well.

Example:

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions5


Count

Syntax:

COUNT(A1)

Arguments:

A1 must be an array.

Result:

The function result is a constant.

Description:

The function returns the number of elements the input array.

Example:

arg1: 2.1 16 3.4 0 7.1
Expression: COUNT( arg1 )
Result: 5

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions3


Cumulative

Syntax:

CUMSUM(A1)

Arguments:

A1 must be an array.

Result:

The result is an array with the same size as A1.

Description:

The function calculates the cumulative sum of the elements in the input array.

Each element of the result is equal to the previous element of the result plus the current element of the input array.

Example:

arg1: 5 3 9 1.1 8
Expression: CUMSUM(A1)
Result: 5 8 17 18.1 26.1

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions3


Divide

Syntax:

DIV(A1, A2)

Arguments:

Accepts two arguments, which may be either constants or arrays.

Result:

If both arguments are constants, the result is a constant.

If at least one of the arguments is an array, the result is also an array. The size of the result is equal to the size of the input array.

If both of the arguments are arrays, the size of the result is equal to the size of the smallest input array.

Description:

Each element of the result is the quotient of the corresponding elements of the input arguments. If the division for a particular element is invalid (division by zero), then this element is marked as invalid in the result array.

Example 1:

arg1: 5 4 28 6 10
Expression: DIV(arg1, 2)
Result: 2.5 2 14 3 5

Example 2:

arg1: 5 4 28 6 10
arg2: 5 0 7 3 4
Expression: DIV(arg1, arg2)
Result: 1 - 4 2 2.5

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions1


DMI

Directional Movement Index

Syntax:

DMI(close, high, low, period)

Arguments:

The first three arguments are arrays – ‘close’ contains the closing prices, ‘high’ contains the high prices and ‘low’ – the low prices. The ‘period’ argument defines the period for the function - it must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements are marked as invalid.

Description:

The Directional Movement Index is developed by J. Welles Wilder. The DMI helps identify whether there is a definable trend in a market, and in which direction that trend is moving. The ADX function, which is a part of the Directional Movement System, is based on the DMI. The formula of the DMI is:

where (+DI) is the current value of the Positive Directional Index and (-DI) is the current value of the Negative Directional Index. For internal calculations the DMI function uses the modified moving average.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions7


Exponentian Average

Syntax:

EXPAVG(A1, weight)

Arguments:

A1 must be an array.

The 'weight' argument is the exponential weight - a constant between 0 and 1.

Result:

The result is an array.

Description:

The function calculates the exponential average of the input array.

The formula is:

Result[n] = A1[n] * weight + A1[n–1] * (1 – weight)

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions3


Exponensial Moving Average

Syntax:

EMA(A1, period)

Arguments:

A1 must be an array.

The 'period' argument must be a constant greater or equal to 1.

Result:

The result is an array.

Description:

A Moving Average is an indicator that shows the average value of a security's price over a period of time. An exponential (or exponentially weighted) moving average is calculated by applying a percentage of today's closing price to yesterday's moving average value. Exponential moving averages place more weight on recent prices.

The formula of the exponential moving average is:

EMA[n] = A1[n]*Exp_Percent + EMA[n-1]*(1 - Exp_Percent)

The exponential percentage is calculated internally from the ‘period’ parameter with the help of the following formula:

Exp_Percent = 2 / (Time_Periods + 1)

If you prefer to work with exponential percentages you can use the following formula to convert the percentages to time periods:

Time_Periods = (2 / Exp_Percent) – 1

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions4


High

Syntax:

HIGH(A1, A2 [, A3] ...)

Arguments:

Accepts two or more arguments, which may be either constants or arrays.

Result:

If all the arguments are constants, the result is a constant.

If there is at least one array-argument, the result is an array. The size of the result is equal to the size of the input array.

If there is more than one array-argument, the size of the result is equal to the size of the smallest array-argument.

Description:

Each element of the result is equal to the highest of the corresponding elements of the input arguments.

Example 1:

arg1: 5.8 3.2 1.0 6.9 1.7
Expression: HIGH(arg1, 5.0)
Result: 5.8 5.0 5.0 6.9 5.0

Example 2:

arg1: 5.8 3.2 1.0 6.9 1.7
arg2: 12 0 3.1 3.1 2.0
Expression: HIGH(arg1, arg2)
Result: 12 3.2 3.1 6.9 2.0

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions1


Low

Syntax:

LOW(A1, A2 [, A3] ...)

Arguments:

Accepts two or more arguments, which may be either constants or arrays.

Result:

If all the arguments are constants, the result is a constant.

If there is at least one array-argument, the result is an array. The size of the result is equal to the size of the input array.

If there is more than one array-argument, the size of the result is equal to the size of the smallest array-argument.

Description:

Each element of the result is equal to the lowest of the corresponding elements of the input arguments.

Example 1:

arg1: 5.8 3.2 1.0 6.9 1.7
Expression: LOW(arg1, 5)
Result: 5.0 3.2 1.0 5.0 1.7

Example 2:

arg1: 5.8 3.2 1.0 6.9 1.0
arg2: 12 0 3.1 3.1 2.0
Expression: LOW(arg1, arg2)
Result: 5.8 0 1.0 3.1 1.0

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Func


MACD

Moving Average Convergence Divergence (MACD)

Syntax:

The MACD is implemented as a composite function.

The expression is:

SUB(EMA(A1,12), EMA(A1,26))

Arguments:

A1 must be an array.

Result:

The result is an array.

Description:

The MACD is a trend following momentum indicator that shows the relationship between two moving averages of prices. It is calculated by subtracting the value of a 26-day exponential moving average from a 12-day exponential moving average. The MACD proves most effective in wide-swinging trading markets.

In a market which is accelerating upwards, the short moving average will rise faster than the longer moving average. This will lead to a rising MACD.

In a market which is accelerating downwards, the short moving average will fall faster than the longer moving average. This will lead to a falling MACD.

The MACD was developed by Gerald Appel.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions6


Max

Syntax:

MAX(A1 [, ByEveryN])

Arguments:

A1 must be an array.

ByEveryN is an optional argument – an integer constant, greater or equal to 1.

Result:

Returns a constant, which is the maximum value of the elements in the array A1.

If ByEveryN is supplied, then the function calculates the maximum of every N successive elements and the result is an array.

Description:

Calculates the max value of all the elements in the input array, or the max value of every N successive elements in the input array.

Example 1:

arg1: 7 11 3 5 6 1
Expression: MAX( arg1 )
Result: 11

Example 2: (max by every 2 elements)

arg1: 7 11 3 5 6 1
Expression: MAX( arg1, 2 )
Result: 11 5 6

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions2


Min

Syntax:

MIN(A1 [, ByEveryN])

Arguments:

A1 must be an array.

ByEveryN is an optional argument – an integer constant, greater or equal to 1.

Result:

Returns a constant, which is the minimum value of the elements in the array A1.

If ByEveryN is supplied, then the function calculates the minimum of every N successive elements and the result is an array.

Description:

Calculates the min value of all the elements in the input array, or the min value of every N successive elements in the input array.

Example 1:

arg1: 11 7 3 5 1 6
Expression: MIN( arg1 )
Result: 1

Example 2: (min by every 2 elements)

arg1: 11 7 3 5 1 6
Expression: MIN( arg1, 2 )
Result: 7 3 1

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions2


Modified Moving Average

Syntax:

MMA(A1, period)

Arguments:

A1 must be an array.

The 'period' argument must be a constant greater or equal to 1.

Result:

The result is an array.

Description:

A Moving Average is an indicator that shows the average value of a security's price over a period of time. The Modified Moving Average is actually the same as the Exponential Moving Average, but with one difference - the exponential percentage is calculated with the following formula:

Exp_Percent = 1 / Time_Periods

For comparison the exponential percent for the EMA is:

Exp_Percent = 2 / (Time_Periods + 1)

The formula for calculating the MMA is the same as the formula of the EMA:

MMA[n] = A1[n]*Exp_Percent + MMA[n-1]*(1 - Exp_Percent)

The two functions are equivalent, but for different values of the period parameter. For example a 14-day MMA is the same as 27 –day EMA. The MMA function is provided for convenience.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions4


Momentum

Syntax:

MOMENTUM(A1, period)

Arguments:

A1 must be an array.

The 'period' argument must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements are marked as invalid.

Description:

The Momentum indicator measures the amount that a security's price has changed over a given time span. It can be used as a trend-following oscillator similar to the MACD or as a leading indicator. The formula of the momentum is:

Momentum[n] = A1[n] – A1[n – period]

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions4


Momentum Div

Syntax:

MOMENTUMDIV(A1, period)

Arguments:

A1 must be an array.

The 'period' argument must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements are marked as invalid.

Description:

The Momentum Division function is similar to the Momentum indicator.

It calculates the ratio between a current value and the value which is ‘period’ days before the current value. The formula of the Momentum Division is:

MomentumDiv[n] = 100 * A1[n] / A1[n – period]

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions4


Multiply

Syntax:

MUL(A1, A2 [, A3] ...)

Arguments:

Accepts two or more arguments, which may be either constants or arrays.

Result:

If all the arguments are constants, the result is a constant.

If there is at least one array-argument, the result is an array. The size of the result is equal to the size of the input array.

If there is more than one array-argument, the size of the result is equal to the size of the smallest array-argument.

Description:

Each element of the result is a product of the corresponding elements of the input arguments.

Example 1:

arg1: 5 2 3 1 10
Expression: MUL(arg1, 2)
Result: 10 4 6 2 20

Example 2:

arg1: 5 2 3 1 10
arg2: 4 3 3 6 2
Expression: MUL(arg1, arg2)
Result: 20 6 9 6 20

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions1


Negative DI

Negative Direction Indicator (-DI)

Syntax:

DI_NEG(close, high, low, period)

Arguments:

The first three arguments are arrays – ‘close’ contains the closing prices, ‘high’ contains the high prices and ‘low’ – the low prices. The ‘period’ argument defines the period for the function - it must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements are marked as invalid.

Description:

The -DI function is a part of the Directional Movement System developed by J. Welles Wilder. The system consists of three lines:

  • The Positive Direction Indicator (+DI) summarizes upward trend movement

  • The Negative Direction Indicator (-DI) summarizes downward trend movement

  • The Average Directional Movement Index (ADX) indicates whether the market is trending or ranging.

For internal calculations the DI_NEG function uses the modified moving average.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions7


Positive DI

Positive Direction Indicator (DI)

Syntax:

DI_POS(close, high, low, period)

Arguments:

The first three arguments are arrays – ‘close’ contains the closing prices, ‘high’ contains the high prices and ‘low’ – the low prices. The ‘period’ argument defines the period for the function - it must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements are marked as invalid.

Description:

The +DI function is a part of the Directional Movement System developed by J. Welles Wilder. The system consists of three lines:

  • The Positive Direction Indicator (+DI) summarizes upward trend movement;

  • The Negative Direction Indicator (-DI) summarizes downward trend movement;

  • The Average Directional Movement Index (ADX) indicates whether the market is trending or ranging.

For internal calculations the DI_POS function uses the modified moving average.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions7


Power

Syntax:

POW(base, exponent)

Arguments:

The 'base' argument may be either constant or an array.

The 'exponent' argument must be a constant.

Result:

If ‘base’ is a constant, the result is a constant.

If ‘base’ is an array, the result is also an array with the size of ‘base’.

Description:

The POW function computes 'base' raised to the power of 'exponent'.

Example 1:

arg1: 3 2 6 0.5 7
Expression: POW(arg1, 2)
Result: 9 4 36 0.25 49

Example 2: (square root)

arg1: 25 9 59 16 107
Expression: POW(arg1, 0.5)
Result: 5 3 7.68 4 10.34

Example 3: (1 / x)

arg1: 3 1 4 7 2
Expression: POW(arg1, -1)
Result: 0.33 1 0.25 0.14 0.5

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions3


Relative Strength Index

Syntax:

RSI(open, close, period)

Arguments:

RSI is usually used with OHLC charts.

The first two arguments are arrays: 'open' contains the open prices and 'close' contains the close prices. The 'period' parameter defines the period for the calculations – it must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements of the result are marked as invalid.

Description:

Relative Strength Index (RSI) is a popular momentum oscillator developed by J. Welles Wilder. The Relative Strength Index compares upward movements in closing price to downward movements over a selected period. The RSI ranges between 0 and 100. The formula of the RSI is:

RSI[n] = 100 – (100 / (1 + U[n] / D[n]))

U[n] – average value of the upward price change for the given period

D[n] – average value of the downward price change for the given period

Relative Strength Index is smoother than the Momentum or Rate of Change oscillators and is not as susceptible to distortion from unusually high or low prices at the start of the window.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions6


Root Mean Square

Syntax:

The Root Mean Square is implemented as a composite function.

The expression is:

POW(AVERAGE(POW(A1, 2)), 0.5)

Arguments:

A1 must be an array.

Result:

The result is a constant.

Description:

The formula of the Root Mean Square is:

Where ‘a’ is an array of elements and n is the number of the elements.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions3


Simple Moving Average

Syntax:

SMA(A1, period)

Arguments:

A1 must be an array.

The 'period' argument must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements are marked as invalid.

Description:

A Moving Average is an indicator that shows the average value of a security's price over a period of time. A simple, or arithmetic, moving average is calculated by adding the price of the security for a number of time periods (e.g., 12 days) and then dividing this total by the number of time periods. The result is the average price of the security over the time period. Simple moving averages give equal weight to each daily price.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions4


Standartd Deviation

Standard Deviation

Syntax:

STDDEV(A1)

Arguments:

A1 must be an array.

Result:

The result is a constant.

Description:

The function calculates the standard deviation for the elements in the array A1.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions3


Stochastic Oscilator

Syntax:

STOCHASTIC(close, high, low, period)

Arguments:

Stochastic is usually used with OHLC charts.

The first three arguments are arrays: 'close' contains the close values, 'high' contains the high values and 'low' contains the low values.

The 'period' parameter defines the period for the function and must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements of the result are marked as invalid.

Description:

The Stochastic Oscillator compares where a security's price closed relative to its price range over a given time period. The formula of the function is:

result[n] = (close[n] – LL) / (HH – LL)
LL is the current lowest low value for the given time period.
HH is the current highest high value for the given time period.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions6


Substract

Syntax:

SUB(A1, A2)

Arguments:

Accepts two arguments, which may be either constants or arrays.

Result:

If both arguments are constants, the result is a constant.

If at least one of the arguments is an array, the result is also an array. The size of the result is equal to the size of the input array.

If both of the arguments are arrays, the size of the result is equal to the size of the smallest input array.

Description:

Each element of the result is the difference between the corresponding elements of the input arguments.

Example 1:

arg1: 5 7 3 2

Expression: SUB(arg1, 5)

Result: 0 2 -2 -3

Example 2:

arg1: 5 7 3 2
arg2: 4 6 6 0

Expression: SUB(arg1, arg2)

Result: 1 1 -3 2

Example 3:

arg1: 5 7 3 2
Expression: SUB(0, arg1)
Result: -5 -7 -3 -2

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions1


Sum

Syntax:

SUM(A1 [, ByEveryN])

Arguments:

A1 must be an array.

ByEveryN is an optional argument – an integer constant, greater or equal to 1.

Result:

Returns a constant, which is the sum of the elements in the array A1.

If ByEveryN is supplied, then the function calculates the sum of every N successive elements and the result is an array.

Description:

Calculates the sum of all the elements in the input array, or the sum of every N successive elements in the input array.

Example 1:

arg1: 11 7 3 5 6 1
Expression: SUM( arg1 )
Result: 33

Example 2: (sum by every 2 elements)

arg1: 11 7 3 5 6 1
Expression: SUM( arg1, 2 )
Result: 18 8 7

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions2


True Range

Syntax:

TR(close, high, low)

Arguments:

True Range is usually used with OHLC charts. The three arguments are arrays: 'close' contains the close values, 'high' contains the high values and 'low' contains the low values.

Result:

The result is an array.

Description:

The True Range indicator is the greatest of the following:

  • High for the day minus the Low for the day.

  • High for the day minus the Close for the previous day.

  • Close for the previous day minus the Low for the current day.

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions6


Weighted Moving Average

Syntax:

WMA(A1, period)

Arguments:

A1 must be an array.

The 'period' argument must be a constant greater or equal to 1.

Result:

The result is an array. The first ‘period’ elements of the result are marked as invalid.

Description:

A Moving Average is an indicator that shows the average value of a security's price over a period of time. A weighted moving average is designed to put more weight on recent data and less weight on past data. A weighted moving average is calculated by multiplying each of the previous day's data by a weight (the weight is the index of the data).

Related Examples. Examples\NChart\VB\PresentationGroups\Function\Functions4


Overview

3DChart possesses an integrated legend that can display various information about the chart. The flexible design of the integrated legend helps you to customize the displayed data with ease.

The NLegend object encapsulates the legend functionality. The user can gain access to the chart legend object with the help of the Legend method of the NChart object.

Dim legend As NLegend
Set legend = NChart1.Legend()

The following topics will teach you how to control various aspects of the integrated legend.

Note that we intentionally omitted how you can work with multiple legends - this is covered in detail in the Multiple charts and legends topic.


Legend modes

Currently the legend can operate in three modes: lmDisabled, lmAutomatic and lmManual. To change the legend mode you must modify the LegendMode property of the NLegend object. For example the following line of VB code disables the legend:

legend.LegendMode = lmDisabled

It is easy to guess that in lmDisabled mode the legend is not displayed, but how do the other modes function?

In lmAutomatic the legend displays information supplied by the presentation groups. Each presentation group has a NPresentGroupCommon object, which has several properties concerning the legend automatic mode. The first one is ShowInLegend. It controls whether the presentation group adds any entries to the chart legend. The LegendMode property controls what data about the presentation group is displayed in the chart legend. The following table gives explanation to the different presentation group legend modes.

Legend Mode | Comment
pglmCategories | The group will add in the legend the category labels of the categories in the presentation group range. The fill effect of the legend marks will be synchronized with the fill effect of the items
pglmSeries | The group will add in the legend the serie labels of the series in the presentation group range. The fill effect of the legend marks will be synchronized with the fill effect of the items
pglmDataItems | The group will add in the legend all data items in the presentation group range and format the legend texts with the LegendFormatString
pglmUniformAppearances | The group will add the Uniform Appearances in the legend. The legend mark labels will display the names the of the Uniform Appearances.
pglmPresentationGroup | The group will add only one item in the legend and the label of this item will be the name of the presentation group.
pglmPresentationGroupCustom | The group will add group specific information

Choosing lmAutomatic is most appropriate if the information that you want to display is contained in some way in the chart e.g. when you want to display categories, series, data items, uniform appearances or presentation groups in the integrated legend.

If you want to display some other information you should choose lmManual and feed the data in the legend manually. Each legend data item is represented by a NLegendData object. The legend data items are contained in a NLegendDataCollection object accessible with the help of the LegendDataCollection method of the NLegend object. Each NLegendData object has properties controlling the legend mark shape, text, mark fill effect, mark border and line properties.

Important: You are not able to pass data in the legend through the object if the legend is not in lmManual state. You must also have in mind that every time you change the legend mode the legend automatically deletes all manual items. This is why for example the following code will clear the legend:

NChart1.Legend.LegendMode = lmAutomatic
NChart1.Legend.LegendMode = lmManual


Positioning the legend

After choosing the legend mode you may also want to alter the position of the legend. The legend position is specified relatively to the control window with the help of the XMargin and YMargin properties:

NChart1.Legend.MarginX = 65
NChart1.Legend.MarginY = 25

In addition you can also specify how the legend must align relatively to the x and y margins. This is achieved with the help of the VerticalAlign and HorizontalAlign properties. The possible values for the VerticalAlign property are: vaCenter, vaBottom and vaTop. You can assign haCenter, haLeft and haBottom for the HorizontalAlign property respectively. The following screenshots illustrate how the legend positioning works:

Left horizontal and top vertical align | Center vertical and horizontal align

As you can see from the pictures above with the help of the MarginX, MarginY, HorizontalAlign and VerticalAlign properties you can position your legends virtually anywhere in the chart window. Following are some code snippets that define the most common legend positions:

1. Left

NChart1.Legend.HorizontalAlign
 = haRight
NChart1.Legend.VerticalAlign = vaCenter
NChart1.Legend.MarginX = 5
NChart1.Legend.MarginY = 50

2. Right

NChart1.Legend.HorizontalAlign
 = haLeft
NChart1.Legend.VerticalAlign = vaCenter
NChart1.Legend.MarginX = 95
NChart1.Legend.MarginY = 50

3. Top

NChart1.Legend.HorizontalAlign = haCenter
NChart1.Legend.VerticalAlign = vaTop
NChart1.Legend.MarginX = 50
NChart1.Legend.MarginY = 5

4. Bottom

NChart1.Legend.HorizontalAlign = haCenter
NChart1.Legend.VerticalAlign = vaBottom
NChart1.Legend.MarginX = 50
NChart1.Legend.MarginY = 95


Stretching the legend

Another very useful feature of the legend is the ability to stretch its width and height according to the control window dimensions. To illustrate when this feature may come handy lets imagine that you have to build a chart which is used to create thumbnail and large size images of some company sales on the web. One of the problems that you'll meet is that the legend dimension is determined by the size of the data items texts, font and mark size. All these components are specified in device units (pixels). When you produce the thumbnail the legend will look larger than in the original image. To avoid this side effect you can define the legend width and height in percents of the control window width and height respectively. Thus when you scale the image the legend proportions relatively to the control window will remain the same. The following VB code instructs the legend to stretch to 20% of the control window width and 50% of the control window height:

NChart1.Legend.StretchHeight = True
NChart1.Legend.StretchWidth = True
NChart1.Legend.WidthPercent = 20
NChart1.Legend.HeightPercent = 50


Modifying the legend appearance

Now after we covered how you can position and stretch your legends its time to show you how to decorate them. Each legend has two backplanes - legend base and legend shadow. By default the shadow backplane is disabled but you may wish to enable it:

NChart1.Legend.ShadowBackplane.Visible = True

and probably set the Transparency value of the NFillEffect object associated with the backplane to 50% to obtain a more realistic shadow effect:

NChart1.Legend.ShadowBackplane.FillEffect.Transparency = 50

In addition you can also change the legend base and shadow form to Rectangle, Ellipse, Circle, Cut edge rectangle or Smooth edge rectangle. The following code modifies the legend base shape:

NChart1.Legend.Backplane.Style = bpsSmoothEdgeRectangle ' I want my legend base to be a smooth edge rectangle

The shadow and base backplane objects are both instances of the NBackplane object which is described in detail in the "Working with backplanes" topic, so a complete discussion of the properties of this object is out of the scope of this topic.

Finally you should know that the legend data items can be displayed as a grid. This is achieved by enabling the Horizontal and Vertical lines of the legend:

NChart1.Legend.HorizontalLinesProps.EnableLines = True
NChart1.Legend.VerticalLinesProps.EnableLines = True

in addition you can also modify the legend border with the help of the OuterHorizontaLinesProps and OuterVerticalLinesProps methods which allow you to gain access to the NLineProperties objects controlling the outer legend borders.


Adding headers and footers

The integrated legend can also display a header and footer text and to draw separator lines between them and the rest of the legend data. The header and footer separator lines are not drawn if the header or footer is empty respectively and are disabled by default.

To control the displayed header and footer you must modify the Header and Footer properties of the NLegend object. The following example sets a header to the current active legend called "Sales data". It also modifies the separator line to a thick red line.

NChart1.Legend.Header = "Sales data"
NChart1.Legend.HeaderSeparatorLineProps.EnableLines = True
NChart1.Legend.HeaderSeparatorLineProps.Width = 2
NChart1.Legend.HeaderSeparatorLineProps.Color = RGB(255, 0, 0)

Sometimes the you may need more space for the legend header or footer. In such cases you may take advantage of the InflateHeaderHeight, InflateHeaderWidth, InflateFooterHeight and InflateFooterWidth properties. The following example increases the header cell:

NChart1.Legend.InflateHeaderHeight = 40
NChart1.Legend.InflateHeaderWidth = 40

Finally you should know that you can change the text properties (font, orientation etc.) of the header and footer texts by modifying the properties of the FooterTextEx and HeaderTextEx objects. To illustrate this suppose that you must increase the size of the header texts - the following line of code will successfully accomplish this:

NChart1.Legend.HeaderTextEx.Font.Size = 20


Multiple charts and legends

Multiple charts and legends

One of the most impressive features delivered by 3Dchart is the ability to display multiple charts and legends. The goal of this chapter is to teach you how you can automate the control in order to take full advantage of these new features.

1. Adding a new chart.

By default the control has only one chart. You add a new chart by using the Add method of the NChartCollection object:

NChart1.ChartCollection.Add

To modify the new chart properties you have two options:

- the first one is to access the chart from the chart collection. For example:

NChart1.ChartCollection.GetAt(1).MarginBackplane.Visible = True

Will make the second chart margin back plane visible.

- the second strategy is to make the second chart the active chart. The active chart is the chart whose properties are exposed by the main automation interface e.g. when you call methods and properties of NChart1 directly. By default the chart control has only one chart and this chart is the active one so this is why until now you were not forced to work with the NChartCollection object. To make the second chart the active one you must use the ActiveChart property of the NChartCollection:

NChart1.ChartCollection.ActiveChart = 1
NChart1.MarginBackplane.Visible = True

This will produce the same effect as the code above except that now the second chart is the active chart and all subsequent call to the main chart interface will modify it instead of the first one.

2. Deleting a chart

When you want to get rid of some of the charts in the chart collection you must use the RemoveAt method:

NChart1.ChartCollection.RemoveAt 1

This line of code will remove the chart we added in the beginning of this topic. If you want to remove all charts in the collection you can take advantage from the RemoveAll method:

NChart1.ChartCollection.RemoveAll

3. Adding a new legend

To add a new legend you must generally follow the same programming pattern as we used when we added a new chart:

NChart1.LegendCollection.Add

By default the chart has only one legend which is also the active one. The active legend is the one which is accessible via the Legend method of the NChart object:

NChart1.Legend.Backplane.Visible = True

Will make the backplane of the active legend visible.

To change the active legend you must use the ActiveLegend property of the NLegendCollection:

NChart1.LegendCollection.ActiveLegend = 1

Now all calls via the NChart1.Legend object will be dispatched to the second legend. You can also gain access to an arbitrary object in the collection by using the GetAt method of this collection:

NChart1.LegendCollection.GetAt(0).LegendMode = lmAutomatic

4. Assigning a target legend to the chart.

After we discussed how to add and modify new legends and charts it is time to take a closer look at how charts and legends work together. When the chart control is initially instanciated it creates by default one chart and one legend. When you modify some of the properties of the chart such as presentation groups, categories and series the legend displays information about the chart content. What happens however if we add a new chart and a new legend? How does the chart control know how to associate each chart and legend? The answer lies in the DisplayOnLegend property. The following lines of code change the target legend of the first chart in the NChartCollection:

NChart1.ChartCollection.ActiveChart = 0
NChart1.DisplayOnLegend = 1

Or

NChart1.ChartCollection.GetAt(0).DisplayOnLegend = 1

You may also wish not to display chart relevant information on any legend. In this case all you have to do is to assign –1 to the DisplayOnLegend property.

NChart1.ChartCollection.GetAt(0).DisplayOnLegend = -1

Disconnects the chart from the legends.

It is very important to know that once you assign a legend to some of the charts the legend collection automatically tries to prevent this relationship from destructive access. For example if you try to delete a legend from the NLegendCollection you must first detach it from the chart it has been attached to. You can accomplish this again by using the DisplayOnLegend property. For example:

NChart1.ChartCollection.GetAt(0). DisplayOnLegend = -1
NChart1.LegendCollecton.RemoveAt(0)

Will successfully delete the first legend in the legend collection.

Related examples. The multiple charts and legend example located in 3DChart\VB\MultipleCharts\General directory illustrates how to work with multiple charts and legends in practice.


Advanced Chart Export

The 3DChart component can export the data presented by it to several media types. Two types of export are supported – entire data storage export or specific presentation group export. Each presentation group exports group dependant information regarding the usage of the different data point values.

File Formats

Depending on the selected media the generated output has a different format. Following is a description of the used formats:

1. Tab Delimited Text File

The exported text file has the following format:

  • First a header is generated, which describes the type of the performed export. For the data storage export it is the following string:

    Export type: Data Storage; Generated by: 3DChart Control

    While for presentation group export the following header is generated:

    Export type: Presentation Group; Type: <group_type>; Generated by: 3DChart Control

    Where <group_type> is the type of the presentation group being exported.

  • Afterwards the data is exported level by level where each level data has the following format:

    --------------------------------------------------------------
    <level_1>
    <serie_1> <category_1> <category_2> <category_3>
    --------------------------------------------------------------
    <Value1_Name> 10.00 20.00 30.00
    <Value2_Name> 0.00 0.00 0.00
    <Value3_Name> 0.00 0.00 0.00
    …
    --------------------------------------------------------------
    serie 2
    --------------------------------------------------------------
    <Value1_Name> 0.00 0.00 0.00
    <Value2_Name> 0.00 0.00 0.00
    <Value3_Name> 0.00 0.00 0.00
    …
    --------------------------------------------------------------

    where:
    <ValueX_Name>     - is simply ValueX (Value1, Value2, ... or Value6) or a presentation group specific interpretation (discussed in detail later in this topic)

2. HTML

When the user exports to HTML media type the generated document has the following format:

  • First a header is generated, which describes the type of the performed export. For the data storage export it is the following string:

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Export type: Data Storage; Generated by: 3DChart Control</title>
    </head>
    <body>

    While the presentation group export generates the following header string:

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Export type: Presentation Group; Type:<group_type>; Generated by: 3DChart Control</title>
    </head>
    <body>

    Where <group_type> is the type of the presentation group being exported.

  • Afterwards the data is exported level by level where each level data has the following format:

    <p>

    <table border="1" width="100%" cellspacing="0" cellborders="0">

    <tr>
    <td width="100%" colspan="4">level 1<td>
    </tr>

    <tr>
    <td>serie 1</td>
    <td>category 1</td>
    <td>category 2</td>
    <td>category 3</td>
    </tr>

    <tr>
    <td><Value1_Name></td>
    <td>10.00</td>
    <td>20.00</td>
    <td>30.00</td>
    </tr>

    <tr>
    <td><Value2_Name></td>
    <td>0.00</td>
    <td>0.00</td>
    <td>0.00</td>
    </tr>

    <tr>
    <td><Value3_Name></td>
    <td>0.00</td>
    <td>0.00</td>
    <td>0.00</td>
    </tr>

    <tr>
    <td>serie 2</td>
    <td>category 1</td>
    <td>category 2</td>
    <td>category 3</td>
    </tr>

    <tr>
    <td><Value1_Name></td>
    <td>0.00</td>
    <td>0.00</td>
    <td>0.00</td>
    </tr>

    <tr>
    <td><Value2_Name></td>
    <td>0.00</td>
    <td>0.00</td>
    <td>0.00</td>
    </tr>

    <tr>
    <td><Value3_Name></td>
    <td>0.00</td>
    <td>0.00</td>
    <td>0.00</td>
    </tr>

    </table>
    </p>

    where

    <ValueX_Name>     - is simply ValueX or a presentation group specific interpretation (discussed in detail later in this topic)

3. XML

The XML export has the following format.

  • The generated XML is encapsulated in the <Export> tag, which for the data storage export type has the following attributes:

    ExportType="Data Storage"
    Component="3DChart"

    while for the presentation group export type the attributes are:

    ExportType = “Presentation Group"
    GroupType = “Bar”
    Component = “3DChart"

    Direct descendants of the <Export> tag are the <LEVEL> tags which have only one attribute: the name of the level i.e.

    Name = “Level1”

    Descendants of the level tag are the <SERIE> tags, which also have only one attribute – the name of the serie i.e.

    Name = “Serie1”

    Encapsulated in the <SERIE> tag are the categories contained in the data storage at this (level, serie) index each represented by a <CATEGORY> tag. The latter also has only one attribute – the name of the category.

    Name = “Category1”

    Inside each category are the <VALUE> tags. They have two attributes – the name of the data point value and the value itself.

    Name = “<ValueX_Name>”

    where <ValueX_Name> is simply ValueX or a presentation group specific interpretation (discussed in detail later in this topic)

    Value = “10”

4. Presentation Group Interpretation

Since the different presentation groups use the data point values in different ways when the user exports data using the presentation group export the names of the data point values are replaced with the interpretation that the respective presentation group gives to these values. The following table describes this substitution in detail.

Presentation Group Type | Data Point Value | Export Condition | Alias name in exported file
Bar | Value1 | Always | Value
Stack Bar | Value1 | Always | Value
Area | Value1 Value2 | Always If UseXValue is set to True | Value XPosition
Stack Area | Value1 | Always | Value
Line | Value1 Value2 Value3 | Always If UseXValue is set to True If UseYValue is set to True | Elevation XPosition YPosition
Stack Line | Value1 | Always | Value
Surface | Value1 | Always | Value
Point | Value1 Value2 Value3 | Always If UseXValue is set to True If UseYValue is set to True | Elevation XPosition YPosition
Bubble | Value1 Value2 Value3 | Always Always Always | XPosition YPosition Size
Stock Chart | Value1 Value2 Value3 Value4 Value5 Value6 | Always Always Always Always If HasVolume is set to True If UseXValue is set to True | Open High Low Close Volume XPosition
Float Bar | Value1 Value2 | Always Always | Begin End
Pie | Value1 Value2 | Always Always | Value Detachment
Doughnut | Value1 Value2 Value3 Value4 | Always Always Always Always | Value Detachment TextOrientation BorderMode
High Low | Value1 Value2 | Always Always | High Low
Map | NA | NA | NA
Radar | Value1 | Always | Distance
Polar | Value1 Value2 | Always Always | Distance Rotation
Shmoo | Value1 Value2 | Always Always | Pass-Fail Hide-Show
Arrow | Value1 Value2 Value3 Value4 | Always Always Always Always | EndX EndY BeginX BeginY
Error | Value1 Value2 | Always Always | BaseValue Deviation
Error Bar | Value1 Value2 | Always Always | BaseValue Deviation
Smooth Line | Value1 Value2 | Aways If UseXValue is set to True | Elevation XPosition
Function | Not Exported | Not Exported | Not Exported

Programming model

Programmatically the functionality of the advanced export is exposed via the NAdvancedExport object. The user gains access to this automation object with the help of the GetAdvancedExport method of the NImportExport object. The following code demonstrates this:

Dim AdvancedExport As NAdvancedExport
Set AdvancedExport = NChart1.ImportExport.GetAdvancedExport()

The NAdvancedExport object has two methods – ExportDataStorage and ExportPresentGroups. The first method exports the entire data storage and has the following parameters:

bstrFile As String – specifies the name of the export file
media As AdvancedExportMedia – specifies the target media
bExportCategories As Boolean – specifies whether the Category labels should be exported
bExportSeries As Boolean - specifies whether the Serie labels should be exported
bExportLevels As Boolean - specifies whether the Levels labels should be exported

The following code for example will export the entire data storage with the Categories, Series and Levels labels in the c:\\temp\\ds.txt text file:

AdvancedExport.ExportDataStorage “c:\\temp\\ds.txt”, aemText, True, True, True

The second method exports the data presented by a set of presentation groups specified by the user. The method has the following parameters:

bstrFile As String – specifies the name of the export file
media As AdvancedExportMedia – specifies the target media
arrPresentGroups As Variant – holds a SAFERARRAY containing the indexes of the presentation groups that should be exported
bExportCategories As Boolean – specifies whether the Category labels should be exported
bExportSeries As Boolean - specifies whether the Serie labels should be exported
bExportLevels As Boolean - specifies whether the Levels labels should be exported

The following code for example will export the first and the third presentation groups:

Dim arrPresGroups() As Long
ReDim arrPresGroups(2)
arrPresGroups(0) = 0
arrPresGroups(1) = 2
AdvancedExport.ExportPresentGroups “c:\\temp\\pg.txt”, aemText, arrPresGroups,
 True, True, True

Relateted Examples. The example located in the Examples\NChart\VB\ImportExport\AdvancedExport directory demonstrates the advanced chart export.


Code Generation

The 3DChart component can generate the code necessary to recreate the current chart state with the help of one the following programming languages:

Visual Basic
VBScript
JScript
C++
C#

With the help of this amazing feature the generation of chart templates and pre made charts has never been easier.

The user is also able to control for which automation objects the chart will generate code. The following objects can be present or not in the code generated by the control.

Fill Effects
Materials
Borders
Texts
Annotations
Mouse Response
Frames
Export Labels

By default the custom constants defined by the 3DChart component are exported with their human readable names. For example the Type property of the NFillEffect object can be equal to one of the following values: fetSolidColor, fetGradient, fetImage, fetAnimation, fetPattern or fetAdvancedGradient. Thus if the NFillEffect object currently represents a solid color the generated code will be:

fe.Type = fetSolidColor

Sometimes it is useful to export the custom type properties with their numeric equivalents. For example if you intend to generate VBScript code for an ASP page and you do not want to include the .inc containing the definitions of the custom constants. In the context of the previous example the generated code will be:

fe.Type = 0

Programmatically this functionality is exposed with the help of the SetCodeExportOptions and GenerateCode methods of the NImportExport object. The first one tunes the code generation by specifying which objects should be present in the generate code. The second method performs the actual code generation – the result of the operation is stored in the string returned by the GenerateCode method.

The following example generates code for Visual Basic, which does not contain code for the Annotations and Mouse Response objects. The custom type properties are exported with their numeric equivalents (specified by the last parameter of the SetCodeExportOptions method):

Dim code As String
Dim ie As NImportExport
Set ie = NChart1.ImportExport
ie.SetCodeExportOptions True, True, True, True, False, False, True, True,
 True
code = ie.GenerateCode(cmtVisualBasic)

Relateted Examples The example located in the Examples\NChart\VB\CodeGeneration directory demonstrates the 3DChart code export feature.


Step by Step Guidelines

This topic discusses a simple scenario for creating a chart with the 3DChart ActiveX control. If you are interested in seeing some real code you can look at the examples for Visual Basic and Visual C++ that come along with this ActiveX product. The examples come with numerous comments describing the actual effect of the code and are a nice and useful tutorial.

  1. Initially the data storage has one level but has no categories and series.
    Example:
    NChart1.Categories.Add “New York”, True
    NChart1.Categories.Add “Chicago”, True
    NChart1.Categories.Add “Philadelphia”, True

    NChart1.Series.Add “Data 1”, True
    NChart1.Series.Add “Data 2”, True
    NChart1.Series.Add “Data 3”, True

    After these lines of code the data storage will have the following dimensions: X = 3, Y = 3, Z = 1. You can achieve the same effect from the Data Property Page.

  2. Controlling the size of the chart along the chart dimensions is easy. You can do that from the General Property Page. The following code makes the charts height bigger:

    NChart1.ChartHeight = 3

  3. Now lets change some values in the data storage. You can do that by directly editing the Data Grid in the Data Property Page or with the following commands:

    NChart1.DataAt(0, 0, 0).Value = 12
    NChart1.DataAt(1, 1, 1).Value = 6

  4. Well you have some data, so now is the time to present it somehow. Let’s create a bar chart. You can do that from the Presentation Groups Property Page by clicking the Add.. button. Then you can just follow the Add Presentation Group Wizard. Programmatically you do that with the following code:

    Dim Bar As NBarPresentGroup
    Set Bar = NChart1.PresentGroups.Add(pgtBar)

  5. Applying fill effects and materials on data points can be done in two ways. The first one directly assigns fill effects and materials on the items in the data storage:

    NChart1.DataAt(0, 0, 0).FillEffect.SetSolidColor vbRed
    NChart1.DataAt(1, 1, 1).FillEffect.SetSolidColor vbBlue

    The other one involves Uniform Appearances and is used like this:

    ‘ enable Uniform Appearances and make all bars red
    bar.Common.EnableUniformAppearance = True
    bar.Common.UniformAppearances.GetAt(0).FillEffect.SetSolidColor vbRed

  6. You can control the chart walls from the Walls Property Page or with code similar to that:

    NChart1.Walls(cwtFloor).Visible = True
    NChart1.Walls(cwtFloor).Width = 0.10

    This code for example will make the chart floor bigger.


Nevron LLC 3D ActiveX Standard

To ease the user to operate with all Nevron LLC components in an intuitive and consistent manner, Nevron LLC have created a set of automation objects and automation property pages, which are common for all Nevron components and that is why they were called The Nevron LLC 3D ActiveX Standard. Following is a brief description of these objects.

Fill Effects. One of the most important things in 3d imaging controls is the filling of 3d objects and surfaces. Every surface or 3D object in the components developed by Nevron has an attached NFillEffect object, through which the user can control its filling from both visual and automation interfaces. The visual interface of the NFillEffect can also be shown at runtime. There are six types of fill effects:

  • Solid color - the user can also specify a standard window color and the component will automatically synchronize it with the current machine settings.

  • Gradient - 22 types of Excel like gradients.

  • Texture - apply a texture extracted from an image file. Currently the control supports the Bitmap, GIF, JPEG, Tiff, Targa, WMF and PNG file formats.

  • Animated filling - this cool feature enables you to apply an animated texture extracted from an AVI file.

  • Pattern - 40 Excel like patterns.

  • Advanced gradient - allows the user to create gradients based on an arbitrary number of color points with different style, position and intensity. In addition there is a set of 360 predefined advanced gradients grouped in 24 advanced gradient schemes.

The gradient, texture, animated texture, pattern and advanced gradient filling types also have properties controlling their actual mapping on the surface. Three different map types are supported. The user can also choose from seven mapping layouts. The size and orientation of the applied filling can also be controlled. In general you will seldom have to deal with these properties directly, because the component automatically uses the best configuration for the current filling type, but they are a nice thing to have if you want to be more specific about the way you map your textures. The snapshots below show bars with different fill effects.

Solid Color | Gradient | Texture | Pattern | Advanced gradient

Fill effects can be synchronized with the general settings for antialiasing and grayscaling.

Materials. Except a fill effect each 3d object has properties describing the way it reflects light. The programmer can control the surface ambient, diffuse and specular reflection colors as well as the object shininess and self - illuminance with the help of the standard NMaterial object. As far as lighting is concerned Nevron components can generally operate in two modes - with or without lightning. When the lighting is disabled then the material properties of the 3d objects and surfaces are discarded and do not affect the generated image in any way. When lighting is turned on material properties work closely together with the fill effect to determine the final object filling. When solid color is specified as a fill effect of a particular object, only the material properties are taken into account. Other kinds of fill effects work in conjunction with material properties to determine the final surface appearance. The NMaterial object also has a visual interface, which can be displayed at runtime. The snapshots below show spheres with different materials.

Sphere with red ambient and diffuse colors | Sphere with blue ambient and yellow diffuse color

Line Properties. All lines and 3d objects that have borders use the NLineProperties object to specify the line width, color, style and line factor. The NLineProperties object has a visual interface, which can be invoked at runtime. The snapshots below show lines with different color, width and style. Lines can be synchronized with the general settings for antialiasing and grayscaling.

Dash line with green color | Line with dash dot style and red color

Frame Properties. Frame properties are used to specify frame surrounding of a particular area. The frame properties of an object are exposed to the programmer via the NFrameProperties automation object. The NFrameProperties object also has a visual interface, which can be invoked at runtime. The most common usage of this object is for the surrounding of the control background. Frames also appear on 2d texts, labels, legends and margin backplanes.

Texts. Each text displayed by the Nevron LLC components has properties controlling its appearance. These properties are exposed to the programmer via the NTextEx automation object. NTextEx supports 3D and 2D text modes. When the component visualizes 2D texts the user is able to control the font style, font size, boldness, italic and text orientation. Besides this the texts can be displayed with a back plane surrounded by a frame. This feature is very useful especially in the case of labels which are primarily used to display headers and footers. The 3D texts on the other hand use OpenGL rendering primitives and are displayed in the 3D space of the component. The user is able to apply gradients and textures on 3D texts as well as to control their extrusion.

Each of the two technologies has its advantages and drawbacks. The 2D texts are very useful when you have to display texts that must be very small (like texts with font size 9 for example), but still must be readable. Such texts appear on top of the bars in a bar chart or along the different axes. Another very useful feature of the 2D texts is that they always face the viewer and are independent from the current zoom factor applied on the 3D scene. You can also use alpha blending (transparency) on 2D texts. A certain disadvantage of 2D texts is that you are not able to apply more advanced fill effects like gradients, textures, animations or patters. 2D texts are also not affected by lighting.

Unlike 2D texts 3D texts are zoom dependable. Amongst the advantages of using 3D texts is that you can apply transformations (like rotations around the XYZ axes, scaling and translation). There is a normal vector associated with each 3D glyph (character) so lighting effects and material properties do influence the text visualization. The possibility to determine a 3D bounding rectangle around the text also makes the implementation of fill effects like gradients, textures, animations and patterns a trivial task. 3D texts also support transparency. All this makes 3D texts ideal when you want to display impressing texts. As you might expect there is a dark side. The first one is that when using 3D texts for displaying small texts they often become jagged and unreadable. The other one is that positioning a 3D text so that it faces the viewer is not an easy task and there is still no automated way in Nevron controls to do that.

The following table demonstrates 2d and 3d texts.

2D text with Arial bold font | 2D text with orientation 45 degrees | 2D text with a back plane
3D text with Arial bold font and gradient fill effect | 3D text with extrusion | 3D text with back plane

Import / Export functionality. The ActiveX components developed by Nevron come equipped with build in import / export capabilities exposed by the NImportExport automation object. With it you can load and save the current state of the component in .nsv files (the extension is an abbreviation from Nevron Save File). These save files are not only backward compatible (new versions will be able to read old save files) but are also component independent. This means that you can use the nsv file created from the 3DChart component to load the background of a 3DPieChart component for example. The nsv file can be loaded from URL addresses.

The NImportExport object also gives you the possibility to save the currently rendered image as a bitmap, png, jpeg, tiff and targa image file formats. The visual interface of this automation object is displayed with the ShowDialog method. The components also have an Import / Export verb which also displays the same dialog (in Visual Basic the verbs are shown in the menu when you click the right mouse button on the component).

3D View. Another important feature of the Nevron components is the ability to control the users view on the 3d scene. This is done trough the standard N3DView object. The Elevation, Rotation and Viewer rotation properties help you look at the scene from different positions and angles. The Zoom property helps you to zoom in and out the image. The OffsetX and OffsetY properties move the image along the X and Y axes. Through the N3DView object you can also set an Orthogonal projection which is very helpful when you want to display a 2d images. The 3DView property page visually exposes the functionality of the N3DView object of the component.

Lighting. All components developed by Nevron can have up to 8 lights to lit the scene. All lights can be individually controlled with properties specifying their lighting emission, position, light distribution and in the case of a directed light source - it's direction. Three automation objects programmatically expose this functionality - NLightModel, NLightSource and NLightCollection. The Lights property page visually exposes the functionality of these three objects. The preview window helps you to visually see the result of the lights that you create.

Labels. All Nevron controls can display labels. Labels are 2d texts which are displayed on top of all scene elements and are used to describe the image. The components expose two objects that are responsible for controlling labels: NLabel and NLabelCollection. The first one as its name suggests allows you to control the properties of a single label and the second one manages all the labels in the control allowing you to add new labels and to delete and edit existing ones. The following picture show the common Labels property page:

Annotations. Annotations are visual objects that can be used to mark or draw attention to some items or areas in the component. There are two types of annotations – Balloons and Arrows. They are 2D objects similar to labels, but with different functions and purpose. Like most objects in the Nevron components they have fill effects, border properties, mouse response and texts that can be modified. Annotations are represented by the NAnnotation object. The NAnnotation objects are placed in a collection of type NAnnotationCollection.


Working with Fill effects and Materials

One of the major Nevron common objects are the NFillEffect and NMaterial. The first one is designed to apply a fill effect on a particular scene element. The fill effect defines the way an object is filled - currently it can be a solid color, gradient, texture, animation, pattern or advanced gradient. The material on the other hand defines the way this object reflects light coming from the light sources of the scene.

When you render the scene without lighting all material properties are discarded. That is why in this mode the only thing that defines the way an object is filled is the fill effect. When you render the scene with lighting however the material also influences the visual representation of the object. When the fill effect is a solid color the roles change - the only thing that defines the color of the object is it’s material. This is the reason why some objects may appear white although their fill effect is solid black. To change the color of the object you should modify the material properties. For example if you want your objects to appear green you should write the following code in VB:

SceneObject.Material.AllColors = vbBlack
SceneObject.Material.EmissiveColor = vbGreen

When the fill effect is a gradient, texture, animation, pattern or advanced gradient the RGB values generated from the fill effect and the material are added together. In this case both the FillEffect and the Material properties have an impact on the visual representation of the object.

For more information on applying fill effects read the Fill effects book in this guide as well as the NFillEffect object description in the Object Reference.

For more information on applying materials see the NMaterial topic in the Object Reference.


Differences between 2D and 3D texts

Working with texts

Nevron controls use two technologies to draw texts. In the documentation they are referred to as 2D and 3D texts. 2D texts (as their name suggests) are used to display text in the “usual” Windows GDI manner. In this mode the control is generating bitmaps for the font characters. These bitmaps are then drawn on the control's surface.

The underlying technology used for 3D texts is completely different. In this mode the control uses the wglUseFontOutlines OpenGL function. This function creates display lists for the font characters. Display lists describe the characters of the font using 3D primitives such as polygons and lines, which allows characters to be displayed in the three dimensional space and also makes possible to apply transformations like rotation, scale and translation on the text.

Each of the two technologies has its advantages and drawbacks. 2D texts are very useful when you have to display texts that must be very small (like texts with font size 9 for example), but still must be readable. Such texts appear on top of the bars in a bar chart or along the different axes. Another very useful feature of the 2D texts is that they always face the viewer and are independent from the current zoom factor applied on the 3D scene. You can also use alpha blending (transparency) on 2D texts. The disadvantages related with 2D texts is that you are not able to apply more advanced fill effects like gradients, textures, animations or patters. 2D texts are also not affected by lighting.

3D texts on the other hand use 3D primitives such as polygons and lines to draw themselves on the screen. Unlike 2D texts they are zoom dependable. Amongst the advantages of using 3D texts is that you can apply transformations (like rotations around the XYZ axes, scaling and translation). There is a normal vector associated with each 3D glyph (character) so lighting effects and material properties do influence the text visualization. The possibility to determine a 3D bounding rectangle around the text also makes the implementation of fill effects like gradients, textures, animations, patterns and advanced gradients an easy task. 3D texts also support transparency. All this makes 3D texts ideal when you want to display impressing texts. As you might expect there is a dark side. The first one is that when using 3D texts for displaying small texts they often become jagged and unreadable. The other one it that positioning a 3D text to face the viewer is not easy and there is still no automated way in Nevron controls to do that.

There are two very special points related with every text object that you see displayed by the control. They are the base point and the origin point. It is essential to understand their meaning because they work together to determine the final text position on the screen. The base point is specified by the control and cannot be changed. For example when you have a bar present group it will position the base points for the texts at the tops of each bar. Another example is the categories axis which positions the base points at the major axis ticks. The origin point is always specified relative to the base point. For example - "twenty pixels left from the base point" or "at polar coordinates (Rotation, Elevation, Distance) from the base point" in the 3D case. This enables you to move your texts relatively from the base point.

This topic discusses in detail the working with texts with the use of the NTextEx object which is attached to all texts in the control.

The NTextEx object is used to control both 2D and 3D Texts. You switch the mode of the NTextEx object by modifying the Use2DText property. For example to change to 2D mode you must write the following code in VB:

TextEx.Use2DText = TRUE 'I want to use 2D (GDI like) texts

The rest of this topic is divided into three categories. The first one describes the properties common for both 2D and 3D texts. The second one is dedicated to the properties relevant when the NTextEx object is in 2D mode. And finally the last one describes the properties responsible for 3D texts. For more information see the NTextEx object description in the Object Reference.

Common properties

Font

The font property controls the font used by the text object. You can modify the font size as well as the bold and italic properties. You cannot display underlined texts, because they are not supported by the current OpenGL implementation. The following examples changes the font to "Black Arial", 12, Bold.

NTextEx.Font = "Black Arial"
NTextEx.Font.Size = 12
NTextEx.Font.Bold = TRUE

Important: The component accepts only True Type fonts. This restriction arises from limitations of the current OpenGL implementation for the Windows platform.

Backplane

Returns a reference to the NBackplane object controlling the backplane associated with the texts. Backplanes can be very useful if your texts merge with the background. In such cases you may consider putting a background plane behind them. This can make your texts much more readable.

NTextEx.Backplane.Visible = TRUE ' I want to have a back plane behind my text
NTextEx.Backplane.Style = bpsSmoothEdgeRectangle ' change the style of the backplane to smooth edge rectangle.

To learn more about the NBackplane object properties and methods refer to the "The NBackplane object" topic.

HorzAlign, VertAlign

The HozrAlign and VertAlign properties control how the text will be aligned relative to the origin point.

FillEffect, Material

These properties control the appearance of the text. For more information see the NTextEx object description in the Object Reference.

2D Mode properties

TextOverlapsImage

When this property is FALSE the Z coordinate assigned to the 2D text will be equal to the Z coordinate of the origin point. This is why the text can be hidden if there are 3D object with a smaller Z coordinate. Otherwise the Z coordinate is 0 which results in 2D text that are always on top of the other 3D objects.

NTextEx.TextOverlapsImage = TRUE 'I want to use the Z coordinate of the origin point

OffsetX

The X offset of the text origin point from the base point.

NTextEx.OffsetX = 20 ' move the ext 20 pixels to the left

OffsetY

The Y offset of the text origin point from the base point.

NTextEx.OffsetY = 20 ' move the text 20 pixels to the bottom

Orientation

The orientation of the text in degrees.

NTextEx.Orientation = 45

3D Mode properties

OriginRotation, OriginElevation, OriginDistance

The polar coordinates of the text origin point from the text base point.

NTextEx.OriginRotation = 45
NTextEx.OriginElevation = 45
NTextEx.OriginDistance = 0.2

RotateAroundXAxis, RotateAroundYAxis, RotateAroundZAxis

The rotation of the text around the X, Y and Z axis respectively.

NTextEx.RotateAroundXAxis = 45
NTextEx.RotateAroundYAxis = 45
NTextEx.RotateAroundZAxis = 45

Extrusion

The extrusion (depth) of the 3D text characters in OpenGL units. You may consider to increase this property if you want a 3D text with a bigger depth

NTextEx.Extrusion = 0.5 ' set some big extrusion


Working with palettes

Overview. In all Nevron components the user has flexible control over the palette used in the solid color selection dialogs. In this way the user is able to create stylish charts in the tonality that he sees fit.
There are two types of palettes - predefined and custom. In the case of a predefined palette the user is not able to change the name of the palette and its colors - his actions are limited to only reading this information. The component comes along with 40 predefined palettes with the following names:

Standard
Pencil
Pencil 2
Assorted
Buildup
Candy
Earth
Elevation
Equal
Flesh
Gray
Gray region
Hex 1
Hex 2
Hex 3
Hex 4
Hex 5
Hex 6
Hex 7
Key
Jacarand
Key
Lovebird
MAC
Muted
Netscape
Oils
Oils 2
Final
Pantone
Pastels
Pastels 2
Purpish
Rich Oil
Saturate
Solids
Spectrum
Spring
Violet
Weaving
Windows

The user can easily create custom palettes, which are saved in the registry for later use.

Programming Model. Programmatically the palettes functionality is exposed via the NPaletteManager and NSystemPalette objects. Each NSystemPalette object represents a custom or predefined palette. The PredefinedPalette property determines the type of the palette. If this property is True the user is not allowed to modify the palette name and its colors. The name of the palette is specified by the PaletteName property. The user can get the palette color at a specific index with the help of the GetColor method. With the SetColor method the user modifies the palette color at a specific index.

The NPaletteManager object contains all available palettes. The user can gain access to a specific palette either by its index or by its name with the help of the GetPaletteAtIndex and GetPaletteByName methods. The following code demonstrates the usage of these methods for gaining access to the palettes.

Dim syspal As NSystemPalette

' Get the palette at index 12
Set syspal = NevronControl.Settings.PaletteManager.GetPaletteAtIndex(12)

' Get the "Rich Oil" palette
Set syspal = NevronControl.Settings.PaletteManager.GetPaletteByName("Rich
 Oil")

The GetPaletteCount method returns the number of palettes contained in the palette manager collection.

nPalCount = NevronControl.Settings.PaletteManager.GetPaletteCount()

New palettes are added with the help of the AddPalette method. The only argument that you pass to this function is the name of new palette.

Set syspal = NevronControl.Settings.PaletteManager.AddPalette("Rich Oil")

The user can delete the custom palettes contained in the palette manager with the help of the RemovePaletteAtIndex and RemovePaletteByName methods. These methods return a boolean value indicating whether the palette was successfully removed from the collection. The methods will fail if you attempt to delete a predefined palette.

Dim bRes As Boolean

' this call will fail, since the palette at index 12 is predefined (the first 40 palettes are predefined)
bRes = NevronControl.Settings.PaletteManager.RemovePaletteAtIndex(12)

' this call will also fail, since the "Rich Oil" palette is predefined
bRes = NevronControl.Settings.PaletteManager.RemovePaletteByName("Rich Oil")

' this call will succeed if the "My Palette" palette is present in the palette manager
bRes = NevronControl.Settings.PaletteManager.RemovePaletteByName("My Palette")

With the help of the SetCurrentPalette method the user selects the palette which will be displayed in the component's solid color selection dialogs. The following code will change the current palette to "Rich Oil":

NChart1.Settings.PaletteManager.SetCurrentPalette "Rich Oil"

The user can retrieve the name of current palette with the help of the GetCurrentPalette method:

Dim palname As String
palname = NevronControl.Settings.Palettemanager.GetCurrentPalette()

The NPaletteManager object possesses a visual interface, which can be invoked at runtime with the help of the ShowDialog method.


Overview

Sometimes it is very useful to be able to save the state of the component or an image generated by it to a file or memory storage. For example if you want to implement custom Undo and allow your user to revert to some previous state. Another possible use of the export functionality is when you have an ASP server that displays graphics generated from real time data. Or if you want to just copy your image into the clipboard and then paste it in Word (or some other text editor). Or if you are writing an Excel like application and want to be able to save the chart into the structured storage file used by it....

This group of topics will teach you how you can achieve the above tasks with the help of the NImportExport object which is supported by all Nevron components.


Importing and Exporting control state

Importing and Exporting the control state

Importing and exporting the control state is vital for every component. In addition it is very useful to be able to save the component state to a memory handle or an OLE stream.

The following table summarizes the import / export capabilities for the control state:

Function | File | Memory | Stream | URL | Drag and Drop | Clipboard
Import | Yes | Yes | Yes | Yes | Yes | Yes
Export | Yes | Yes | Yes | No | Yes | Yes

As you can see from the table above you can import from almost anything you can think of. The export also supports quite a lot of target medias except exporting to URL. The Drag and Drop import export is explained in detail in the Drag and Drop topic.

Loading the control state

To load the component state from a file, memory, stream or the clipboard you must use the Load member function of the NImportExport object. The function has the following definition:

Function Load(ByRef vFile As Variant) As Boolean

The type of the media is determined by the vFile type (notice that vFile is not a string but a Variant type). The following table lists the possible variant types:

Type of vFile | Meaning
String (VT_BSTR) | The string contains the name of a file. If the string is empty then the control uses the Clipboard.
Long (VT_I4) | A memory handle allocated with the Windows GlobalAlloc API function. The control will use the memory pointed by this handle to read its state.
Stream (VT_UNKNOWN) | A pointer to an IStream interface that represents a stream in a structured storage object.

Lets illustrate the above with a few VB code snippets:

1. Load the component state from a file:

NChart1.ImportExport.Load "c:\temp\chart.nsv"

2. Load the component state from a memory handle

Dim vFile As Variant
vFile = CLng(dwHandle)
NChart1.ImportExport.Load vFile 'dwHandle must contain the chart state in a native chart format

3. Paste from the clipboard

Dim vFile As Variant
vFile = ""
NChart1.ImportExport.Load vFile

By default when you import the control state the component will also automatically resize according to the dimensions stored in the .nsv file. There are some cases when this is not desirable - for example when you want to keep the layout of your form. To instruct the control to discard the stored dimensions you must set the LoadControlDimensions property of the NImportExport object to False:

NChart1.ImportExport.LoadControlDimensions = False ' discard stored control dimensions
NChart1.ImportExport.Load "D:\temp\surface.nsv"

Loading the control state from a URL address

To load the component state from a URL you must use the LoadFromURL. It takes as parameters a URL string identifying the location of the .nsv file that you want to load and a boolean parameter specifying whether or not the component must show a download progress indicator:

NChart1.ImportExport.LoadFromURL "http://www.myserver.com\report.nsv", TRUE ' keep me updated about the download progress

It is important to know that the component will fire notification events informing you about the data download progress as well as if the data download failed or completed successfully. The OnDownloadDataProgress event is fired to notify that a change in the download progress has occurred. It has the following definition:

void OnDownloadDataProgress(long nPercent)

where nPercent varies from 0 to 100. This event may not be fired only if the data is immediately available to the control due to a fast internet / intranet connection or if the requested file has already been cached from the system.

The OnDownloadDataAvailable event is fired when the control has finished downloading the control state from the URL passed to the LoadFromURL function. In response to this event you may wish to include client code which additionally customizes the control. The definition of this event is:

void OnDownloadDataAvailable()

or in other words it does not pass any parameters. Finally the control also fires the OnDownloadDataFailed event when it is unable to download the requested state file. This may happen when the connection is terminated or when the URL is invalid. This event also does not pass any parameters:

void OnDownloadDataFailed()

The NImportExport object supports a method called TerminateDownload which enables you to terminate the current download:

NControl.ImportExport.TerminateDownload ' stop the current download

The load from URL relevant features can be very useful when you create HTML pages using the component. Following is a simple HTML page which instantiates 3DChart on the client and downloads the state from a URL:

<html>
<head>
<title>LoadStateFromURL function</title>
</head>
<body>

<OBJECT classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
<PARAM NAME = "LPKPATH" Value="NControl.lpk">
</OBJECT>

<OBJECT classid="clsid:B5CE1CD3-3AB9-11D3-9502-525400E61EDC"
 height=400 id=Chart1 width=400 id=chart1
codebase="NevronDownload\3DCHARTMEA.CAB" Standby="Loading...">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="31750">

<PARAM NAME="_ExtentY" VALUE="20320">
<PARAM NAME="_StockProps" VALUE="-1">
<PARAM NAME="Windowless" VALUE="-1">
<PARAM NAME="Transparent" VALUE="0">
<PARAM NAME="ShowDownload" value="0">
<PARAM NAME="Datapath" value>
</OBJECT>

<SCRIPT LANGUAGE = "VBScript">
Sub Window_onLoad()
chart1.ImportExport.LoadFromURL "http://www.myserver.com/surface.nsv",true
End Sub

Sub chart1_OnDownloadDataAvailable()
chart1.Background.FillEffect.SetImage "http://www.myserver.com/back.bmp"
end sub
</SCRIPT>

</p>
</body>
</html>

Notice that we intercepted the OnDownloadDataAvailable event in order to download a texture for the background.

Exporting the control state

Exporting the control state is similar to importing except that you must use the Save function of the NImportExport object. It takes as a parameter a variant which determines the target media. The following examples illustrate exporting to a file, memory or the clipboard.

1. Save the component state to a file:

NChart1.ImportExport.Save "c:\temp\chart.nsv"

2. Save the component state to a memory handle

Dim vFile As Variant
vFile = CLng(dwHandle)
NChart1.ImportExport.Save vFile 'dwHandle will contain the chart state in a native chart format

There is one small detail that must be underlined here. It is that the control allocates the handle and returns it in the vFile parameter (this is why this parameter was defined as "ByRef"). This is required because you cannot know the size of the memory block required to save the component state when you pass the memory handle.

3. Copy to the clipboard

Dim vFile As Variant
vFile = ""
NChart1.ImportExport.Save vFile

Using the visual interface of the NImportExport object

You can also import and export the control state using the NImportExport object visual interface. To invoke the Import / Export... dialog right click on the component and then select "Import / Export..." from the menu. For more information on working with this dialog box check out the Import / Export property sheet topics in the Visual interface guide.


Exporting static images

The ability to export images in various image formats to different medias is indispensable for every component dealing with graphics. This is why Nevron has implemented export support for the most common file formats (excluding GIF because of the licensing required by Unisys Corporation). Furthermore we have given the programmer the ability to control various format dependent parameters of the image export as well as the color depth. The last one is very important because it isolates your code from the settings of the target machine which makes your code more portable. For example you're able to generate 24 bit color images on a server with color settings of 8 bits per pixel.

The extensive support for image export in Nevron components enables them to act as server side components driven by ASP or ASPX scripts. For more information on this read the topics under "Building Internet and Intranet Applications" book.

The following table illustrates the image export capabilities of the current version.

Image format | File | Memory | Stream | Clipboard | Color depth | Other options
JPEG | Yes | Yes | Yes | No | 1, 4, 8. 16 and 24 | Quality, Smoothing, Quantize
PNG | Yes | Yes | Yes | No | 1, 4, 8. 16 and 24 | Transparent
TIFF | Yes | No | No | No | 1, 8. 16 and 24 | Transparent (24bpp only)
TARGA | Yes | Yes | Yes | No | 8. 16 and 24 | Transparent (24bpp only)
Bitmap | Yes | Yes | Yes | Yes | 1, 4, 8. 16 and 24 | No

As you can see TIFF support is limited only to files, because it requires some special file settings that make the implementation of TIFF export to Memory and Stream more difficult.

Bitmaps can be copied to the clipboard. They are copied to the clipboard as Bitmap handles. However because of the automatic conversion performed by Windows your applications can also request a DIB (Device Independent Bitmap) when they try to paste.

To export your image in the desired format you must use one of the following member functions of the NImportExport object - SaveJPEGImage, SaveBitmapImage, SaveTargaImage, SaveTiffImage and SavePNGImage. They all follow the following format

Save<Format name>Image(ByRef vFile As Variant, UseWindowDimensions As Boolean, Width As Long, Height As Long, <Format specific parameters>, BitsPerPixel As Long) As Boolean

The first parameter is vFile (of type Variant). This variant's content is treated in the same way as in the import / export functions for the control state. Note that the control will perform a check whether the specified media is supported by the requested image format. If not the control will generate an error. For example if you try to export a Tiff image to the clipboard the control will complain about it by generating the following error : "Tiff export is supported only for files.".

After you specify the target media all functions require three more parameters. They are UseWindowDimensions, Width and Height. When UseWindowDimensions is set to TRUE the Width and Height parameters are discarded and the dimensions of the exported image are synchronized with the current control dimensions. Otherwise Width and Height define the size of the image. Be careful when using UseWindowDimensions because sometimes the control dimensions are invalid. For example if you instantiate your control in an ASP environment it does not have a window and control dimensions. In this case you must explicitly specify the Width and Height of the generated image.

PNG, JPEG, TIFF and TGA allow you to modify some options of the image export. PNG allows you to modify the Transparent option. When set to TRUE the control will generate a transparent PNG image. In 16 and 24 bits per pixel transparency is achieved by adding an alpha channel to the PNG. In 8bpp because there is no alpha channel support for this mode transparency is achieved by choosing a transparent color. This leads to a small decrease in quality (because you loose one color), but it is not noticeable. Transparency can be very useful when you want to generate images for web sites and would like to integrate them with the web site layout. Note however that 16 and 24 bpp transparent PNGs are not supported by the current versions of IE and Netscape. This is why for this purpose it is recommended to use 8bpp PNGs.

In JPEG mode you can control the Quantize, Quality and Smoothing factors. Usually the value for Quality is 75%, but you may wish to increase it to 100% if you want to render JPEGs with better quality.

TIFF and TGA allow you to export with the transparent option also. This feature however is limited to 24bpp only.

Following the format specific options is the BitsPerPixel parameter which controls the color depth of the image. Nevron controls render images independently from the current video settings. This is why you can set this value to 24bpp even if your current video adapter settings specify 8 bits per pixel. The possible values for this parameter are 8, 16 and 24.

Now after we have described the parameters required by the image export functions lets look at some real code examples.

1. Generate 24bpp, 200x300, quantized, not smoothed JPEG image

NevronControl.ImportExport.SaveJPEGImage sFileName, FALSE, 200, 300, TRUE, 100, 0, 24

2. Generate a 24bpp, 200x200 bitmap image

NevronControl.ImportExport.SaveBitmapImage sFileName, FALSE, 200, 200, 24

3. Generate a 24bpp, 300x300, not transparent Targa image

NevronControl.ImportExport.SaveTargaImage sFileName,False , 300, 300, False, 24

4. Generate a 24bpp, 400x400, not transparent TIFF image

NevronControl.ImportExport.SaveTiffImage sFileName, FALSE, 400, 400, FALSE, 24

5. Generate a 24bpp, 500x500, not transparent PNG image

NevronControl.ImportExport.SavePNGImage sFileName, FALSE, 500, 400, FALSE, 24

For more information on image export see the description of the NImportExport object in the Object Reference as well as the VB examples for Import and Export (Examples\VB\ImportExport).

Using the visual interface of the NImportExport object

You can also import and export static images using the NImportExport object visual interface. To invoke the Import / Export... dialog right click on the component and then select "Import / Export..." from the menu. When the dialog box appears click on the image tab. For more information on working with this dialog box check out the Import / Export property sheet topics in the Visual interface guide.


Exporting HTML and SVG Image maps

The NImportExport object posses a function called SaveImageMap which is probably the most complex function in the whole component. It allows you to generate an HTML or SVG image map at runtime. The function definition is:

VARIANT_BOOL SaveImageMap(
[in, out] VARIANT* vImageFile,
[in, out] VARIANT* vImageMapFile,
[in] BSTR sImageMapName,
[out] BSTR *pImageMap,
ImageMapType nImageMapType,
VARIANT_BOOL UseWindowDimensions,
int Width,
int Height,
[defaultvalue(3)] int GridCellSize,
[defaultvalue(0)] VARIANT_BOOL UseAverageColor,
[defaultvalue(imfPNG)] ImageMapFormat nImageFormat,
[defaultvalue(0)] VARIANT_BOOL Quantize,
[defaultvalue(100)] long Quality,
[defaultvalue(0)] long Smoothing,
[defaultvalue(0)] VARIANT_BOOL Transparent,
[defaultvalue(24)] long BitsPerPixel,
[in, defaultvalue(0)] VARIANT_BOOL Unicode,
[defaultvalue(cssVBScript)] ClientSideScript ClientSideScript);

although at first glance it looks a little bit frightening working with it is not so difficult. Lets take a look at the different parameters one by one.

The first parameter (vFile) passed to this function is of type VARIANT and specifies the location where the image generated along with the image map will be stored. As with the other image export functions you can export the image to a file, memory handle or OLE stream. You may pass an empty variant to this parameter. In this case it will not store the generated image to a file.

The second parameter (vImageMapFile) is again of type VARIANT and specifies the location where the image map will be stored. As you might expect you can export the image map to a file, memory handle or OLE stream. You may pass an empty variant to this parameter. In this case it will not store the generated image map to a file.

The sImageMapName parameter is of type BSTR and specifies the image map name. To better understand this parameter lets investigate a simple image map

<script LANGUAGE = "VBScript">
...
VBScript code
...
</script>

<MAP NAME="NCF20020621180723_9DIWY">
...
Map description
...
</MAP>

<IMG ALT=""
 SRC="/NevronTemp/NCF20020621180722_8T284.png" ID ="IMG_NCF20020621180723_9DIWY"
 usemap="#NCF20020621180723_9DIWY">

In this example the image map name is "NCF20020621180723_9DIWY". As you can see it appears both in the image tag and in the map name. This is how the browser will understand to link the image map with the appropriate image in the HTML document.

Following is the pImageMap parameter which receives the generated image map in the form of a string. This is very convenient if you're interested only in the generated string and would like not to generate an image file or store the image map to file. In this case you should pass the empty variants to vFile and vImageMapFile and the function will return only the text associated with this image map.

The nImageMapType parameter defines the type of the image map - HTML or SVG and accepts a constant of type ImageMapType. Possible values are: imtHTML and imtSVG.

The UseWindowDimensions, Width and Height parameters define the dimensions of the image map in pixels. When UseWindowDimensions is set to False the Width and Height parameters are discarded and the image map has the same dimensions as the control window. Otherwise the Width and Height parameters define the image map width and height respectively.

The GridCellSize parameter defines the size of the internal grid used to produce the image map. UseAverageColor defines how the control will map the grid cells to objects in the 3D scene. For more information on this properties please take a look at the Image maps topic.

The ImageFormat defines the type of the exported image - it can be imfJPEG, imfPNG or imfBitmap. As the constant names suggest the possible formats are JPEG, PNG and Bitmap.

The Quantize, Quality and Smoothing parameters are used only when the ImageFormat is imfJPEG and specify the options for JPEG export as explained in the previous topic.

The Transparent parameter is used when the ImageFormat is imfPNG and specifies whether or not the control should generate a transparent PNG image.

The BitsPerPixel parameter defines the color bits per pixel used to encode the generated image.

The Unicode parameter deservers special interest. When set to True the returned image map may contain Unicode characters depending whether the user has used Unicode strings in tooltip texts for example. Otherwise all Unicode strings will be internally converted to ANSI strings. You should pass True to this parameter if you intend to generate an image map using Unicode.

The last parameter is ClientSideScript and it accepts values of cssVBScript and cssJScript. As you might expect when set to cssVBScript the resulting image map will use VBScript and vice versa.

Now when we've examined all parameters of the SaveImageMap function lets take a look at a simple VB example demonstrating how to create a small image map and to export it to a file named myimagemap.htm. The corresponding image file will be named myimagemap.png:

Dim NChart1 As Object
Dim bar As NBarPresentGroup
Dim ImageMapString As String

' create the chart component on the server
Set NChart1 = CreateObject("3DCHART.NChart.7")
NChart1.Redraw = False

' set 2d half projection type
NChart1.Get3DView.SetPredefinedProjection pp2DHalf

' set gradient background
NChart1.Background.FillEffect.SetGradient gsHorizontal, gvVariant1, RGB(255, 0, 0), RGB(255, 255, 0)
NChart1.Background.MouseResponse.SetTooltip "Click here to go to Microsoft Web Site"
NChart1.Background.MouseResponse.URL = "http://www.microsoft.com" ' demonstration of absolute URLs

' first clean up categories and series
NChart1.Categories.RemoveAll
NChart1.Series.RemoveAll

' clean presentation groups
NChart1.PresentGroups.RemoveAll

' create a bar presentation group to show the data
Set bar = NChart1.PresentGroups.Add(pgtBar)
bar.Common.Range.InfiniteX = True
bar.Common.Range.InfiniteY = True
bar.Common.Range.InfiniteZ = True

' set the bar style from the form combo selection
bar.BarStyle = bsBar

' show values on top of bars
bar.Common.MarkType = mtText

' add cagegories and series
NChart1.Categories.Add "Apples", True
NChart1.Categories.Add "Oranges", True
NChart1.Categories.Add "Pears", True
NChart1.Categories.Add "Bananas", True
NChart1.Series.Add "Fruits", True

' fill the data from the form some data and set the proper URL jump links
NChart1.DataAt(0, 0, 0).Value1 = 12
NChart1.DataAt(0, 0, 0).MouseResponse.SetTooltip "Click here to go to Apple sales"
NChart1.DataAt(0, 0, 0).MouseResponse.URL = "Apples.htm" 'relative URL to this asp page

NChart1.DataAt(1, 0, 0).Value1 = 22
NChart1.DataAt(1, 0, 0).MouseResponse.SetTooltip "Click here to go to Orange sales"
NChart1.DataAt(1, 0, 0).MouseResponse.URL = "Oranges.htm" 'relative URL to this asp page

NChart1.DataAt(2, 0, 0).Value1 = 15
NChart1.DataAt(2, 0, 0).MouseResponse.SetTooltip "Click here to go to Pear sales"
NChart1.DataAt(2, 0, 0).MouseResponse.URL = "Pears.htm" 'relative URL to this asp page

NChart1.DataAt(3, 0, 0).Value1 = 18
NChart1.DataAt(3, 0, 0).MouseResponse.SetTooltip "Click here to go to Bananas sales"
NChart1.DataAt(3, 0, 0).MouseResponse.URL = "Bananas.htm" 'relative URL to this asp page

' set fill effects of the bars, but first tunr off uniform appearances
bar.Common.EnableUniformAppearance = False

NChart1.DataAt(0, 0, 0).Material.SetAmbientDiffuseColor
 vbYellow
NChart1.DataAt(0, 0, 0).FillEffect.SetSolidColor vbYellow
NChart1.DataAt(1, 0, 0).Material.SetAmbientDiffuseColor vbGreen
NChart1.DataAt(1, 0, 0).FillEffect.SetSolidColor vbGreen
NChart1.DataAt(2, 0, 0).Material.SetAmbientDiffuseColor vbRed
NChart1.DataAt(2, 0, 0).FillEffect.SetSolidColor vbRed
NChart1.DataAt(3, 0, 0).Material.SetAmbientDiffuseColor vbBlue
NChart1.DataAt(3, 0, 0).FillEffect.SetSolidColor vbBlue

' increase the size of the chart floor
NChart1.Walls(4).Width = 0.1

' set standard lightning
NChart1.LightModel.SetLightScheme lsStandard
Set Header = NChart1.LabelCollection.AddHeader("Sales report")
Header.TextEx.Backplane.Visible = True
Header.TextEx.Backplane.Style = bpsSmoothEdgeRectangle
Header.TextEx.Backplane.FillEffect.Transparency = 50
Header.TextEx.FillEffect.SetSolidColor RGB(255, 255, 0)
Header.TextEx.Font.Size = 12

NChart1.Redraw = True
NChart1.EventManager.MouseMove = mmTooltip ' enable tooltips
NChart1.ImportExport.SaveImageMap "c:\temp\myimagemap.png", "c:\temp\myimagemap.htm", "SimpleImageMap", ImageMapString, imtHTML, False, 300, 300, 2, False, imfPNG, False, 100, 100, False, 24, cssVBScript, False

Related examples. The example located at the NControl\ImportExport\ImageMap demonstrates how to use the image map export capabilities of the control.


Printing

Nevron controls support two ways of printing an image generated with the OpenGL 3D engine. They provide a flexible and easy to use interface to print your charts, graphs and texts. The following two topic show to techniques that can be used to print your images.

Printing with the NPrintManager

Printing by using the NPicture interface

Printing by using the NPicture interface under VB .NET


Printing with the NPrintManager

The component has a build in Print Manager that also provides a visual interface for configuring the NPrintManager object properties. Lets investigate how you can work with NPrintManager by starting with the following line of VB code:

NControl.PrintManager.BeginPrint

This will print a page on your default printer using the default values of the print manager. But how do you specify a more customized print configuration (for example a landscape with an image occupying the top left corner of the page)? The answer of course is by modifying the other properties of the NPrintManager object. The LeftMargin, RightMargin, TopMargin and BottomMargin properties allow you set the margins for printing. For example:

NControl.PrintManager.LeftMargin = 0
NControl.PrintManager.TopMargin = 0
NControl.PrintManager.RightMargin = 50
NControl.PrintManager.BottomMargin = 50
NControl.PrintManager.BeginPrint

Will print the control on the upper left part of the paper. Besides the position you can also modify the quality of the printing. The following code prints with better quality:

NControl.PrintManager.QualityPercent = 200
NControl.PrintManager.BeginPrint

But is as you might expect a little bit slower. For a more detailed discussion of the QualityPercent property see the NPrintManager description in the Object Reference.

To summarize the following example prints two copies of the image at the upper left corner, using landscape paper orientation and better quality:

With
 NControl.PrintManager
.LeftMargin = 0
.TopMargin = 0
.RightMargin = 50
.BottomMargin = 50
.PaperOrientation = poLandscape
.Copies = 2
.QualityPercent = 200
End With

NControl.PrintManager.BeginPrint

The Copies property as its name suggest instructs the control to print the generated image multiple times. There is a also a way to let the control to determine the best QualityPercent value based on the resolution of your printer. This is achieved by turning on the AutomaticQualityPercent property of the NPrintManager object.

NControl.PrintManager.AutomaticQualityPercent = True

When this property is on the control will detect the logical pixel per inch of your printer and scale the image according to the following formula:

fScaleX
 = PrinterDC.GetDeviceCaps(LOGPIXELSX) / ScreenDC.GetDeviceCaps(LOGPIXELSX);
fScaleY = PrinterDC.GetDeviceCaps(LOGPIXELSY) / ScreenDC.GetDeviceCaps(LOGPIXELSY);
if (fScaleY > fScaleX)
fQualityPercent = fScaleY *
 100;
else
fQualityPercent = fScaleX *
 100;

afterwards the QualityPercent is clamped to the range [100, 10000].

When the image is scaled 2D objects like texts, legends, annotations and labels are also scaled accordingly. However in case you wish to keep their normal size you can turn off this scaling by using the Scale2DFonts property:

NControl.PrintManager.Scale2DFonts = False

To further improve the quality of your printed images you can consider to use the jittering feature of the control. Jittering is explained in detail in the "Special visual effects" book in this User's guide. For the purpose of this topic we'll illustrate how to enable jittering in a few lines of code:

NControl.Settings.UseJittering = True
NControl.Settings.JitteringSamples = 4

Related examples. The example in the NControl\VB\Printing\PrintManager directory shows the NPrintManager object in action.


Printing using the NPicture interface

Another approach on printing is to obtain an IPicture object from the control and use is to draw on the Printer device. This is technique is certainly more flexible than printing with the NPrintManager, because you can also include texts or other images in the page. However it requires intimate knowledge on device context and printing in general. This topic will just underline some of the techniques that you can use in order to use this approach on printing.

Lets start with some sample code:

Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.ScaleHeight = 100
Printer.ScaleWidth = 100
Printer.PaintPicture NevronControl.Picture(NChart1.Picture(False, nWidth, nHeight, 24), nLeft, nTop, nWidth, nHeight
Printer.EndDoc

Note that we first initialize the properties of the printer and set the number of units for the horizontal (ScaleWidth) and vertical (ScaleHeight) measurement. This ensures that we work with percent like values to measure the printer device width and height.

The NevronControl.Picture function retrieves an IPicture object from the control. You can then use this object to paint on a device, pass it to a VB Image control or anything else that can be done with a picture. The function takes four parameter and has the following declaration:

IPictureDisp* Picture(VARIANT_BOOL UseWindowDimensions, long Width, long Height, [defaultvalue(24)]int BitsPerPixel);

as you can see the function returns an IPictureDisp pointer to a picture object. The parameters UseWindowDimensions, Width and Height determine the picture dimensions. If UseWindowDimensions is True then the Width and Height are discarded and the resulting picture has the dimensions of the control in the container. You must turn on this property with caution because there are cases when the control dimensions are invalid. This is the case when the control is instantiated in ASP or other environment which does not create a control window. If you want to render the picture with custom dimensions all you have to do is to set the UseWindowDimensions to False and specify the required width and height via the Width and Height parameters. The BitsPerPixel parameter is optional. If you do not supply it the control will assume that you want to render a 24bpp image. The possible values for this parameter are -1, 8, 16 and 24. A -1 value for this parameter defines that you want to synchronize the color resolution of the generated image with the color resolution of the screen. Thus the Picture method will render a 16bpp image on a 16bpp display, a 24bpp image on a 24bpp display and so on. This effectively releases you from the burden to check for the display color resolution when this is required in a very elegant way.

Sometimes it is required to scale your image when you print because very often printers have greater resolution than the display. However passing scaled Width and Height parameters to the Picture function is not enough to produce nice scaling. This is because 2D objects like texts, legends, labels and annotations will still keep their original size because they use 2D fonts. 2D fonts are not scaled when the control is resized because their size is specified in device units. To scale the 2D objects in the scene you can take advantage of the Scale2DObjectsPercent property:

NControl.Settings.Scale2DObjectsPercent = 200 ' scale my objects twice

Finally you should know that the jittering visual effect can greatly improve the quality of the printing. For a complete description of this feature take a look at the "Jittering" topic in the Special visual effects book.

Related examples. The example located in the NControl\VB\Printing\NPicture directory shows how you can use this printing technique in practice.


Printing by using the NPicture interface under VB .NET

The purpose of this topic is to teach you how to leverage the component ability to export images using the IPicture interface in .NET environment.

The first step you need to accomplish when you decide to print in a .NET environment is to obtain a reference to a PrintDocument object and to intercept the Print_Page event triggered by this object when you need to paint a page on the printer.

Dim pd As New PrintDocument()

AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage

Afterwards you must select the target printer using the PrinterName property of the PrinterSettings object attached to the PrintDocument and then start the print process using the PrintMethod. It is also a good idea to guard this code in a try catch block:

Try
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage

' Specify the printer to use.
pd.PrinterSettings.PrinterName = "MyPrinter"

If pd.PrinterSettings.IsValid Then
pd.Print()
Else
MessageBox.Show("Printer is invalid.")
End If

' Finally make some clean up
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Now after you initialized your printer you're ready to implement the PrintPage event:

' The PrintPage event is raised for each page to be printed.
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)

Dim leftMargin As Single = ev.MarginBounds.Left
Dim topMargin As Single = ev.MarginBounds.Top
Dim ChartImage As Image
Dim Left, Top, Width, Height As Integer

Left = LeftMarginHScroll.Value
Top = TopMarginHScroll.Value
Width = 100 - (LeftMarginHScroll.Value + RightMarginHScroll.Value)
Height = 100 - (BottomMarginHScroll.Value + TopMarginHScroll.Value)

' convert the print margins
 according to the margins set for the printer page
Left = ev.MarginBounds.Left + ev.MarginBounds.Width * Left / 100
Top = ev.MarginBounds.Top + ev.MarginBounds.Height * Top / 100
Width = ev.MarginBounds.Width * Width / 100
Height = ev.MarginBounds.Height() * Height / 100

If UseWindowDimensionsCheck.CheckState = System.Windows.Forms.CheckState.Checked Then
ChartImage = NChart1.Picture(True, 0, 0, GetBitsPerPixel())
Else
ChartImage = NChart1.Picture(False, ImageWidthHScroll.Value, ImageHeightHScroll.Value, GetBitsPerPixel())
End If

ev.Graphics.DrawImage(ChartImage, Left, Top, Width, Height)
ev.HasMorePages = False

End Sub

The above code was taken directly from the VB7 NPicture example of the control. Notice how we scaled the PrintMargin bounds so that we can work in percent like values. You can additionally modify the code where an chart image is obtained:

ChartImage = NChart1.Picture(False, ImageWidthHScroll.Value, ImageHeightHScroll.Value, GetBitsPerPixel())

and apply some additional scaling according to the printer resolution. This can greatly increase the quality of the printed image. You can also consider to use the Scale2DObjectsPercent property of the NSettings object in order to increase the size of the 2D objects like texts, legends, headers and annotations.

Related examples. The example located in the Visual Basic 7\Printing\NPicture shows how you can accomplish the above in a real VB7 application.


Installing on the Server

The installation of the component on your web server is easy and straightforward.

1. Make sure that your user account has the necessary privileges to perform the installation. The best case of course is if you're running under the Administrator account.

2. Run the installation utility on the server machine. It will automatically copy the control’s ocx files to the Windows system directory and register them. Make sure to reboot your system if you're prompted to.

3. Check whether your ASP/ASP .NET server is working properly.

3.1 For ASP servers make the following test page.

<script LANGUAGE="VBScript"
 RUNAT="Server">
Response.Write(Now)
</script>

Save this page to a to a file called TestAsp.asp and residing in the wwwroot directory and point your browser to

http://localhost/testasp.asp

The page must display the current time.

3.2 For ASP .NET servers create a page called TestAspX.aspx and insert the following line of code:

<%=Now()%>

again when you point your browser to:

http://localhost/testaspx.aspx

it must display the current time.

4. Make sure that you can access the control ocx file via the Internet guest account - this is the account used by IIS when an ActiveX control is executed on the web server.

5. Make sure that the control can be instantiated safely in your script.

5.1. For ASP servers the following code illustrates how to accomplish this:

<script LANGUAGE="VBScript" RUNAT="Server">
Set NChart1 = Server.CreateObject("3DCHART.NChart.6")
NChart1.Background.FillEffect.SetGradient 0, 0, RGB(255, 0, 0), RGB(255, 255, 0)
</script>

5.2. For ASP .NET servers you must insert the following code:

Again point your browser and if it does not display an error message this means that the component can be safely instantiated.

5. Run the NServerConfig utility located in the Program Files directory. From the Virtual web servers list select the desired web server and press the "Update server..." button. The utility will display "The server update succeeded" if everything was Ok. Note that before that it will prompt you that the NevronTemp directory rights are about to change. For more information on how to configure your webserver see the "Fine tuning your server" book.

Now you're ready to use Nevron controls on the server side.


Building Internet and Intranet Applications

Using the Controls on the Client Side

Nevron Components support VBScript and this makes possible their embedding in ActiveX containers that use this language. When it comes to building an Internet or Intranet charting solutions there is always one question – where does the component reside – on the client or on the server machine? In this topic we will discuss the usage of Nevron components on the client side.

In this case we assume that the component is already installed on the client machine (see Deploying Nevron ActiveX Components for more information). Inserting the control in HTML pages is done with the help of the <OBJECT> tag.

Example:

<OBJECT classid=clsid:B5CE1CD3-3AB9-11D3-9502-525400E61EDC
 height=370 id=Chart1
style="HEIGHT: 370px; LEFT: 0px; TOP: 0px; WIDTH: 492px" width=492>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="13018">
<PARAM NAME="_ExtentY" VALUE="9790">
<PARAM NAME="_StockProps" VALUE="0">
<PARAM NAME="Windowless" VALUE="1">
<PARAM NAME="Transparent" VALUE="1">
</OBJECT>

This piece of code will add the 3DChart component in an HTML page. See the Deploying Nevron ActiveX Components to get a list of the components CLSIDs.

The first four properties are part of the standard MFC control properties. The last ones are of special interest when it comes to HTML pages. When the Windowless property is set to True the component does not have a window – it is instead displayed as a bitmap by the container. When Windowless is set to True you can also set the Transparent property to True, which will discard the currently activated background and replace it with the background of the container. This feature is very useful in HTML pages with applied background images or themes and gives the page more consistent outlook, because the chart seems to be a part of the image.

The components can be controlled programmatically with scripting and can also load their state from files located on an Internet or Intranet address. This is achieved with the help of the Load And LoadFromURL methods of the NImportExport object. You can use this feature to load the component’s state created on a server machine residing on the Intranet or the Internet.

Another feature that can come handy is the ability to instruct the control to download its state with the help of the properties in the <OBJECT> tag. In terms of the previous example if you want to load the state of the component from a server called "myserver" you must place the following object tag in your HTML page:

<OBJECT classid=clsid:B5CE1CD3-3AB9-11D3-9502-525400E61EDC
 height=370 id=Chart1
style="HEIGHT: 370px; LEFT: 0px; TOP: 0px; WIDTH: 492px" width=492>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="13018">
<PARAM NAME="_ExtentY" VALUE="9790">
<PARAM NAME="_StockProps" VALUE="0">
<PARAM NAME="Windowless" VALUE="1">
<PARAM NAME="Transparent" VALUE="1">
<PARAM NAME="SHOWDOWNLOAD" VALUE="1">
<PARAM NAME="DATAPATH" VALUE="http://www.myserver.com/chart.nsv">
</OBJECT>

The "SHOWDOWNLOAD" property indicates whether the component will display download progress information. The "DATAPATH" property informs the control where the native control state resides on the server.

Important: The release version of the component is licensed. This means that you're not able to instantiate on non licensed machines. To use the component from an HTML page which is accessed from the Internet or the Intranet you must use the License package file (lpk) supplied with the control:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="http://www.myserver.com/download/NControl.lpk">
</OBJECT>

 <OBJECT
 CLASSID="CLSID:B5CE1CD3-3AB9-11d3-9502-525400E61EDC"
TYPE="application/x-oleobject"
WIDTH="400" HEIGHT="300" ID="NChart1" CODEBASE="http://www.myserver.com/download/3DChartMEA.cab#Version=6,0,0,0">
<PARAM NAME="WINDOWLESS" VALUE="0">
<PARAM NAME="TRANSPARENT" VALUE="0">
<PARAM NAME="SHOWDOWNLOAD" VALUE="1">
<PARAM NAME="DATAPATH" VALUE="http://www.myserver.com/download/mystate.nsv">
</OBJECT>

Note that you can also take advantage of the CODEBASE attribute - in the above case if 3DChart is not present on the client the browser will download the component .cab file and install the component.

Related Examples: Examine the Internet Explorer examples to see some real code about the usage of the components in HTML pages.


Configuring the directory structure

When the control is integrated in ASP it assumes that certain directories and files exist on the server. These directories are subdirectories of the root directory of the server and are used from the control for various purposes. The directories and their content is automatically created with the help of the NServerConfig utility.

You can see the directory structure from the main panel of the NServerConfig utility.

On the left side are enumerated the installed web servers. The right side shows the directory structure related to the component. The "Auto delete..." button invokes the "Auto delete configuration" dialog which enables you to specify when the control must delete temporary files. For more information see the "Configuring temporary file handling" topic.

By default IIS uses the IUSR_MachineName account to instantiate the control on the server when you call Server.CreateObject in your ASP script. Checking the Allow ASP to access the temp directory button assigns write permissions to the NevronTemp directory for this account. The Allow ASP .NET to access the temp directory check box performs the same with the difference that is assigns write permissions to the ASPNET account which is used by ASP .NET.

The "Auto response..." button shows the "Auto response configuration" dialog. From this dialog you can configure the automatic response as well as various parameters of the different response types. For example for image response types (such as JPEG, PNG etc.) you can modify the bits per pixel, quality, smoothing and so on. For more information on this see the "Configuring response types" topic.

The "Update server" button configures the specified web server. When you press this button the NServerConfig utility will perform the following steps:

1. Create the NevronInclude directory under wwwroot. This directory contains .inc files (server side include) containing the constants needed by Nevron components. These .inc files are needed because VBScript does not support custom types. Be very careful when coding in ASP without including an .inc file because instead of complaining that it does not recognize the custom type VBScript will simply replace it with zero. This may lead to hard to find bugs and a lot of confusion. To change the default location of the NevronInclude directory press the "..." on the left side of the "Include" edit and the "Choose folder" dialog will appear:

From the directory tree you can choose a different folder than the default one. In the "Current directory" edit you can also type the path of a directory that does not exist on the server and the server configuration utility will try to create it the next time you press the "Update server" button. Please note that the directory must be a subfolder of the wwwroot directory although it is not necessary to be a direct descendant.

2. Create the NevronTemp directory under wwwroot. This directory is used by the component to store the temporary files generated during the interaction between the client and the server. Note that this directory is created with write permissions to the Internet guest account used by IIS when it establishes a connection with the client. Otherwise the control will not be able to generate images on the server. As with the include directory you can change the location of your temp directory to some of the descendants of the wwwroot.

3. Create the NevronDownload directory under wwwroot. This directory contains the .cab files for the control, the client ATL control (NClientCommonControl.cab) and the license package file (NControl.lpk) used to store the component license key. When the control generates active response is assumes that the NevronDownload directory is created and that the NClientCommonControl.cab file is present in it. Otherwise the client browser will not be able to install the client control on the client machine. This .cab file is authenticated, time stamped and marked as safe for scripting so you do not need to worry about the security settings of the client browser. When the response type is tFullControl the control will also take care to send an appropriate .cab file depending on the locale settings for this response type. It is also possible to change the location of the DownloadDirectory by pressing the "..." button on the left side of the Download edit control.

4. Create the NevronConfig directory under wwwroot. This directory contains the NConfig.cfg file, containing the configuration settings for the different response types, the browser detection rules and the settings related with automatic temporary file handling. All controls that use the NAspManager object automatically try to load this file. If they do not succeed then you are not able to use the EmbedInHtml function of the NAspManager object. You cannot change the location of the NevronConfig directory - it is always placed in the wwwroot directory on your server. The NConfig.cfg file contains the server settings in simple text format. Following is a typical configuration file:

[WebServer]
AutoDeleteEnabled=True
AutoDeleteInterval=1
Days=0
Hours=1
Minutes=0
Seconds=0
EnableWapMapping=True
WAPActiveXBpp=1
WAPActiveXFormat=BMP
WAPFullControlBpp=1
WAPFullControlFormat=BMP
WAPImageMapBpp=1
WAPImageMapFormat=BMP
WAPJPEGBpp=1
WAPJPEGFormat=BMP
WAPPNGBpp=1
WAPPNGFormat=BMP
WAPTARGABpp=1
WAPTARGAFormat=BMP
WAPTIFFBpp=1
WAPTIFFFormat=BMP
WAPSVGBpp=1
WAPSVGFormat=BMP
DownloadDirectory=d:\inetpub\wwwroot\NevronDownload
TempDirectory=d:\inetpub\wwwroot\NevronTemp
IncludeDirectory=d:\inetpub\wwwroot\NevronInclude
[WebServer.ResponseType.JPG]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
Smoothing=0
Quality=100
Quantize=False
[WebServer.ResponseType.PNG]
DefaultResponse=True
BitsPerPixel=24
BrowserCount=0
Transparent=False
[WebServer.ResponseType.Tiff]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
Transparent=False
[WebServer.ResponseType.Targa]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
Transparent=False
[WebServer.ResponseType.Bitmap]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
[WebServer.ResponseType.ImageMap]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
CellSize=2
UseAverageColor=False
ImageMapFormat=PNG
ClientSideScript=VBScript
Transparent=False
Quantize=False
Smoothing=0
Quality=100
[WebServer.ResponseType.ActiveX]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
ShowDownload=True
Transparent=False
[WebServer.ResponseType.FullControl]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
ControlVersion=0
ShowDownload=True
[WebServer.ResponseType.SVG]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
SVGFormat=PNG
Transparent=False
GenerateInteractiveSVG=True
GenerateXMLTagForSVGContent=True
Quantize=False
UseAverageColor=False
Smoothing=0
Quality=100
CellSize=2

as you can see the file is divided into section describing the behavior of the component.

1.The WebServer section contains general information about the websver - its directory structure and the parameters used by the auto delete function. The fact that the directory information is stored in plain text format can be very helpful when you do not have access to your server. In this case you can just replicate the directories on your test server and manually modify the directory fields in the WebServer section. Note that the control automatically determines the wwwroot directory and that the control configuration file must always reside in the NevronConfig directory which is always a direct descendant of wwwroot.

2. Immediately after the WebServer section come the JPG, PNG, Bitmap, TIFF, Targa, ActiveX, FullControl and SVG sections. They describe the parameters used by the control when it generates image response. Let's examine the JPG section in more detail:

DefaultResponse=False
BitsPerPixel=24
BrowserCount=0
Smoothing=0
Quality=100
Quantize=False

The first line tells the control not to use JPG as the default server response. Following after that are the parameters of the image export - bits per pixel, smoothing, quality, quantize. The BrowserCount property deserves special attention. Each response type can have an arbitrary number of browser that it responds to and this number is defined by the BrowserCount property. The following piece of the .cfg file shows how the control is instructed to respond with active content (ActiveX) to all versions of the Microsoft IE browser.

[WebServer.ResponseType.ActiveX]
DefaultResponse=False
BitsPerPixel=24
BrowserCount=1
BrowserType0=NevronDetectBrowser
ShowDownload=True
Transparent=False
[WebServer.ResponseType.ActiveX.NevronDetectBrowser0]
BrowserType=IE
FromMajorVersion=0
FromMinorVersion=0
MatchIfBiggerVerion=True
ToMajorVersion=0
ToMinorVersion=0

Finally if all the steps are accomplished without any errors the NServerConfig utility displays "Server update succeeded".

We'll cover the details about the Auto delete and Auto response buttons in the next two topics. The purpose of the WAP settings and User Impersonation buttons is discussed in the Preparing to run the WAP examples and the Impersonation topics respectively.


Configuring temporary file handling

In the process of interaction between the client and the server Nevron controls generate temp files that contain the requested images (.jpg, .png, .bitmap, .tif or .tga), active content (.nim) or native control state (.nsv). You can instruct the controls to delete some of these temporary files when they are no longer needed. To do this from the NServerConfig main panel press the "Auto delete...". The following dialog box will appear:

Check the "Enable auto delete of expired temp files" check box to enable temporary file deletion for this web server. A file is expired when the time span defined by the Days, Hours, Minutes and Seconds fields expires. The server controls will perform a check for expired temporary files depending from the "Auto delete interval" value. This value defines how many response generations must be processed before launching the check. For example if this value is two this means that on every second response generation the control will clean up the NevronTemp directory from the expired temporary files.

The control determines the creation date and time of the file by using its name. The temporary file names follow a predefined format. Lets look at the following temp file name:

NCF20001203165101_3A4Z6.png

The first letter 'N' means Nevron and is common for all temp file names. The second letter indicates the type of the control that generated the temporary file. 'C' stands for 3DChart, 'P' stands for 3DPieChart, 'T' stands for 3DText, 'L' stands for 3DLegend and finally 'O' stands for 3DClock. Following is the time when the image was generated. It has the following format - YYYYMMDDHHMMSS or Year, Month, Day, Hour, Minute, Second. Afterwards come five random generated digits or characters that ensure that if you have two controls generating images at the same time they would not generate colliding file names. The random suffix at the end of the file name also increases the security of your website because it is practically impossible for a malicious person to generate a valid file name and request it from the server. At the end is the file extension. It indicates the file type and can be jpg, png, bmp, tif, tga, nim or nsv. The .nim extension means that the file is a "Nevron image map". These files are read from the client controls and contain a PNG image plus some descriptive information about it enabling the client control to emulate that the server control was installed on the client's machine.


Configuring response types

Configuring the response types

From the NServerConfig main panel press the "Auto response..." button. The following dialog box will appear:

On the left side are enumerated the possible response types. You can change the response type priority by moving it with the "Move up" and "Move down" buttons. The response type at the top has the highest priority whereas the response type at the bottom has the lowest. The priority is important when the control is generating an auto response. In this case it tries to match the current browser with the browsers specified for the different response type. It begins the search from the top until it reaches the bottom response type. If a match is made then the search is terminated and the control generates a response with the found type. For example if you have specified that the control must response to IE 4.0 with a JPEG and PNG response the actual response will be JPEG (because it is higher in the list). If in the process of the search the control is unable to find a match it generates the default response. The default response is only one and is painted in red. You can change the default response from the Properties dialog box.

To specify that you want to respond to a particular browser with a certain response type select a response type and add the browsers that you want this type to respond to with the "Add browser..." and "Add custom browser..." buttons. The "Add browser..." displays the following dialog box:

From the browser type combo select the desired browser and specify the version. The "Match if bigger" instructs the control to generate a match if the version is bigger than the starting version. Currently Nevron controls have build in detection for Internet Explorer and Netscape. To test your server response you can use the following user agent strings:

User agent string for IE

Mozilla/4.0 (compatible; MSIE 4.01; Windows95)

User agent string for Netscape Navigator

Mozilla/4.04 [en] (Win95; I)

User agent string for Opera

Mozilla/3.0 (compatible; Opera/3.0; Windows95/NT4)

These strings can also be loaded from the Load predefined user agent string combo at the bottom of the Auto response configuration dialog.

The general rule used to detect a browser is the following - The control searches for the "compatible" word in the user agent string. If it is not present then this must be a Netscape browser. Otherwise if it also finds "MSIE" then this is Internet Explorer. If it cannot find "MSIE" then the control assumes that this is a browser from an unknown type (Other browser).

For Netscape Navigator the version information is extracted from the digits immediately following the "Mozilla" string. For IE on the other hand from the digits following the "MSIE" keyword. Version detection is not supported for the "Other browser" option.

If you want to specify another browser you must use the custom detected browser capability. The "Add custom browser..." shows a dialog box where you can type a template string that will be used to make the match. You can also use wildcards (*) and ? characters, as well as enumerations. Following are some example template strings:

*SomeCompany*ver[4].[234]*

*SomeCompany*ver?.[234]*

The first one will generate a match for all SomeCompany's browsers that have version 4.2 4.3. and 4.4 and the second template string will generate a match for all version that have a minor version of 2, 3 or 4. Note that '*' characters are computationally expensive because they require recursive algorithms so whenever possible try to replace them with '?'.

You can also change the response type properties by selecting the response type in the tree and then pressing the "Properties..." button. Each response type has different properties. They are as follows:

- JPEG - quality percent, smoothing, bits per pixel

- PNG - transparent, bits per pixel

- TIFF - bits per pixel, transparent if bits per pixel is equal to 24

- TARGA - bits per pixel, transparent if bits per pixel is equal to 24

- BMP - bits per pixel

- ActiveX - show download progress, show tooltips, transparent, bits per pixel. The following screenshots illustrate the effect of these properties.

The following screenshots illustrate the effect of these properties of the show download progress and show tooltips properties.

- Image map - image format for the generated image (PNG, JPEG or Bitmap), bits per pixel, grid cell size, client side script and use average color plus additional properties relevant to PNG and JPEG. A detailed explanation on these properties can be found in the "Image maps" topic later in this book.

- Full control - in this mode the control generates a .nsv file and sends an object tag to instantiate itself on the client. The properties relevant to this response type are show download progress and client side .cab. The latter instructs the control to send a localized version to the client. The default is English US ANSI version. Nevron is planning support for the following languages in the near future: Brazilian Portuguese, Catalan, Chinese simplified, Chinese traditional, Danish, Dutch, French, German, Italian, Japanese, Polish , Russian and Spanish.

- SVG - - image format for the generated image (PNG, JPEG or Bitmap), bits per pixel, grid cell size, use average color plus additional properties relevant to PNG and JPEG. A detailed explanation on these properties can be found in the "Generating SVG content" topic later in this book.


Using .inc files

Before we start the discussion about the different options that you have to integrate the component in ASP you must have in mind that the language used for server side scripting (VBScript) that we've used to create the examples and that you'll probably use to code your server side scripts does not support custom types. This is why you cannot directly write and test your code in VB and then simply paste it into your asp page. If you do it however VBScript will not complain, but will instead replace all custom constants with 0.

To correct this problem you must use Server Side Include and include the .inc file supplied with the component. For example the line:

<!-- #include virtual="NevronInclude\3DChart.inc" -->

will include the 3DChart.inc file into your script. This file contains a server side script that assigns values to the custom constants.

<script RunAt="Server" Language="VBScript">
'--------------------------------------------------------------------
' Nevron Include File
' (c) 2002 Nevron, LLC. All Rights Reserved.
'
' Nevron Include File for VBScript/JScript
'
'--------------------------------------------------------------------

' AGPointStyle
Const agpsCircle = 0
Const agpsRectangle = 1
Const agpsLine = 2

' AnnotationType
Const atBalloon = 0
Const atArrow = 1

' AntialiasingType
Const atSynchronizeWithControl = 0
Const atUseAntialiasing = 1
Const atDoNotUseAntialiasing = 2

...

' BrowserNavigate
Const bnOpenInNewWindow = 1
Const bnNoHistory = 2
Const bnNoReadFromCache = 4
Const bnNoWriteToCache = 8
Const bnAllowAutosearch = 16
Const bnBrowserBar = 32

...

' DropEffect
Const deNone = 0
Const deCopy = 1
Const deMove = 2
Const deLink = 3
Const deScroll = 4

...

</script>

For your convenience Nevron has also included an .inc file which defines the most common color constants. The .inc file is called NColors.inc and is automatically copied to your NevronInclude directory when you press the "Update server" button. This file will release you from the burden to use boring RGB macros when you have to hard code some colors and replace them with more human readable constant names. Please note that the constants defined in this file do not begin with the "vb" prefix as you might expect. Following is an extract of the NColors.inc file:

<script RunAt="Server" Language="VBScript">
'--------------------------------------------------------------------
' Nevron Include File For Color Constants
' ' (c) 2002 Nevron, LLC. All Rights Reserved.
'
' Nevron Include File for VBScript/JScript
'
'--------------------------------------------------------------------
Const aliceblue = 13400304
Const antiquewhite = 13401082
Const aqua = 13434624
Const aquamarine = 13375359
Const azure = 13402096

...

Const darkslategrey = 13413167
Const darkturquoise = 13422080
Const darkviolet = 13420692
Const deeppink = 13414655
Const deepskyblue = 13418240

...

Const sunburn = 13370578
Const teal = 13402112
Const thistle = 13402072
Const tomato = 13434879
Const turquoise = 13426752
Const violet = 13382382
Const wheat = 13428469
Const white = 13375487
Const whitesmoke = 13434357
Const yellow = 13375487
Const yellowgreen = 13393306
</script>

To use the NColors.inc file you must include the following line in your asp page:

<!-- #include virtual="NevronInclude\3DChart.inc" -->


Generating static images on the server

All Nevron components can be used on the server side to generate static images in response to client requests. They can be used from any server that supports server side scripting and ActiveX. The following table summarizes the image export capabilities of the current version.

Image format | Bits per pixel | Compression | Transparent | Options
JPEG | 1, 4, 8, 16 and 24 | Yes | No | Quality, Smoothing, Quantize
PNG | 1, 4, 8, 16 and 24 | Yes | Yes | No
TIFF | 1, 8, 16 and 24 | No | No | No
TARGA | 8, 16 and 24 | No | Yes (24 bpp only) | No
Bitmap | 1, 4, 8, 16 and 24 | No | Yes (24 bpp only) | No

From the table is clear that only the JPEG and PNG file formats have compression, which makes them more suitable if you’re using the component to generate images that will be later posted on the web. There is one thing that you must notice here – the PNG compression is looseless and does not decrease the image quality. This is a certain advantage of this format over JPEG and makes it the preferred image format for web applications. The PNG images are also smaller than their JPEG equivalents if you do not use special visual effects like gradients or lighting.

The Bitmap file format can be particularly useful if you want to be 100% sure that the client browser will be able to read the image file. Due to its easy to implement support and wide use (bitmap is the native image format for Windows) it is almost guaranteed that the client browser will support Bitmap images. The transparent feature is supported only from PNG. However you must have in mind that not all browsers do support it. The current support for the transparent feature in both IE and Netscape is poor. IE supports transparency only if the color depth is 8 bits per pixel. In this mode transparency is achieved with the use of a transparent color which leads to a small decrease in the color resolution, which fortunately is not noticeable. This makes this mode very useful if you want to render images that must be integrated into your web site layout.

There are two ways to integrate the components in your ASP script to generate static images.

1. Using the NASPManager object

This mode is easier to implement and is based on using the EmbedInHtml function in the ASP manager object. For example to insert a simle 3DChart PNG graphic in in your ASP page you must write:

<script LANGUAGE="VBScript" RUNAT="Server">
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")
Response.Write(NChart1.AspManager.EmbedInHtml(400, 400, 2, "SomeID", "NChart1"))
</script>

As you can see the actual work is done with only one line of code! Of course this chart is not displaying anything useful but this is the amount of code that you need to write if you want to integrate the chart into your ASP application. The control will take care to create a temporary file and will generate a correct IMG tag that will be returned from the EmbedInHtml function. It will also release you from the burden to check when this file expires and will automatically delete it when it is no longer needed. For more information on this method see the NAspManager object documentation in the Object reference.

You must have in mind that before using the NAspManager object you must configure the web server. This is required because otherwise the control does not know the location of the NevronTemp file directory where the generated images will reside as well as parameters for the image export like the color depth for example.

You may also wonder what happens if you want to customize the IMG tag returned by the EmbedInHtml function. The solution is to modify the ImageTemplateTag property of the NAspManager object. By default it is <IMG SRC=<image_file>>. For example if you want to add a border around the image you can change it to <IMG BORDER=4 SRC=<image_file>>. The control will replace all occurances of <image_file> with the generated temporary file name.

2. Using the NImportExport object

The other approach is to use the functionality exposed from the NImportExport object. With the help of this object you can export your control to any of the image formats supported by Nevron. When you use this method you are responsible for the generation and afterwards the deletion of the temporary files.

There are a lot of strategies to generate a temp file and it is hard to tell which one is better. In this guide we'll just try to give you some useful ideas. The common in all of them is that you must implement a naming mechanism that generates unique image file names.

You can use the Session ID with a time stamp:

’generate the image file names as a concatenation of the session id and a time stamp
JPEGfile = "Chart" & Session.SessionId & Replace(Time,".","") & ".jpg"

Other useful techniques can use GUIDs or randomly generated values. After the session with the user is over the application must delete the rendered images. You can also implement a custom application or a simple .bat file which deletes expired files on the server and schedule it for launching by using the Windows NT/2K "at" command. For a list of the "at" command options go to the Windows system directory and type:

e:\winnt\system32\at /?

Except the naming problem the usage of the NImportExport object for the creation of static images on the server is straight forward. The first thing you have to do is to create the component on the server.

' create the chart component on the server
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

After you have already created the component you can modify it’s properties and finally render the image in a JPEG file:

' render the image as a JPEG with 100% quality
NChart1.ImportExport.SaveJPEGImage "c:\Temp\Chart.jpg", False, 600, 400, True, 100, 0

Now that we have the JPEG image we can easily place it in the resulting HTML with the following code:

<img SRC=“c:\ImageDir\Chart.jpg”>


Generating active content

Today's users and programmers are not satisfied with the ability to generate a static image of a chart or other presentation graphic on the web site. They also want interactivity on the client side which will improve their web surfing experience. To achieve this Nevron has introduced the "active response". The idea of active response is simple - instead of sending a static image in the HTML response the control will send an object tag that looks like this:

<OBJECT CLASSID="CLSID:87805514-AE62-11D4-BE10-525400E8E9BC"
 TYPE="application/x-oleobject"  WIDTH="400" HEIGHT="400"
 ID="NChart1" CODEBASE="\NevronDownload\NClientCommonControl.cab#Version=7,0,0,0">
<PARAM NAME="SHOWDOWNLOAD" VALUE="1">
<PARAM NAME="DATAPATH" VALUE="\NevronTemp\NCF20001211134731_4AG4T.nim">
</OBJECT>

When the client browser reads this object tag it will perform the following steps:

1. It will check whether the control identified by the CLASSID is installed on the client machine.

2. If not it will download the cab file specified with the CODEBASE attribute (\NevronDownload\NClientCommonControl.cab), extract it and install the NClientCommonControl on the client machine. This CAB file is Authenticated and will be downloaded even if you user has set the IE security settings to High.

3. The browser will instantiate the client control and pass it the properties specified by the params attributes. The properties accepted by the client control are Showdownload and Datapath. As its name suggests when the Showdownload property is True the client control will show a progress bar indicating the download progress of the .nim file specified by the Datapath property. This can be very useful if you have a slow Internet or Intranet connection and do not want to leave your users "wondering in the dark". The Datapath property specifies the location from where to download the Nevron Image Map file (.nim). Internally the .nim file contains a PNG image and descriptive information about it that helps the client control to generate automation events and to display tooltips.

4. Once the client control finishes the download it will display the requested image and start to process mouse input from the user.

Active content on the server side

In your ASP script you generate active content by inserting the tag returned from the EmbedInHtml function into the HTML response. The following ASP code will insert an object tag into the HTML send to the user.

<script LANGUAGE="VBScript" RUNAT="Server">
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")
Response.Write(NChart1.AspManager.EmbedInHtml(400, 400, 6, "NChart1", ""))
</script>

Of course the displayed chart will not show anything, but it will be capable of displaying tooltips and generating events. Lets enhance our chart a little bit and add two data items and one presentation group.

<script LANGUAGE="VBScript" RUNAT="Server">

Set NChart1 = Server.CreateObject("3DCHART.NChart.7")
Set bar = NChart1.PresentGroups.Add(0)
bar.Common.Range.InfiniteX = True
bar.Common.Range.InfiniteY = True
bar.Common.Range.InfiniteZ = True

' show values on top of bars
bar.Common.MarkType = 1 'mtText

' add cagegories and series
NChart1.Categories.Add "Apples", True
NChart1.Categories.Add "Oranges", True
NChart1.Series.Add "Fruits", True

' fill the data from the form some data
NChart1.DataAt(0, 0, 0).Value1 = 10
NChart1.DataAt(0, 0, 0).MouseResponse.SetTooltip "Apple sales"
NChart1.DataAt(0, 0, 0).MouseResponse.URL = "AppleSales.htm"
NChart1.DataAt(1, 0, 0).Value1 = 20
NChart1.DataAt(1, 0, 0).MouseResponse.SetTooltip "Orange sales"
NChart1.DataAt(1, 0, 0).MouseResponse.URL = "OrangeSales.htm"

Response.Write(NChart1.AspManager.EmbedInHtml(400, 400, 6, "NChart1",
 ""))

</script>

This time the generated chart displays a little bit more information and is capable of doing more things. Notice that in the above script we modified the NMouseResponse object attached to the data items of the chart. The code

NChart1.DataAt(0, 0, 0).MouseResponse.SetTooltip "Apple sales"

Instructs the chart to replace the standard tooltip for data item (0, 0, 0) which is "Data item X:0 Y:0 Z: 0" with the more friendly "Apple sales". Now when the user moves the mouse over the first bar the client control will display "Apple sales". The line of code immediately following after that is:

NChart1.DataAt(0, 0, 0).MouseResponse.URL = "AppleSales.htm"

It tells the client control to direct the browser to "AppleSales.htm" when the user left clicks with mouse on the bar. You can assign both relative and absolute URL paths to this property. For more information on the NMouseResponse object see the Object Reference.

Active content on the client side

As we mentioned earlier the client control can fire events that can be intercepted from client side scripts. This feature is very useful when you want to add interactivity which is client dependent. The most important things related with event handling are of course what is the ID of the control and the event's names. In the previous examples when we inserted the control in the HTML response we used the following line of code:

Response.Write(NChart1.AspManager.EmbedInHtml(400, 400, 6, "NChart1", ""))

The fourth parameter defines the ID of the client control. With its help you can write some client script that will be send to the client when your ASP page is processed. To illustrate how you can accomplish this we'll generate an empty chart and detect when the user clicks on the background.

<script LANGUAGE="VBScript" RUNAT="Server">
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")
Response.Write(NChart1.AspManager.EmbedInHtml(400, 400, 6, "NChart1", ""))
</script>

<script LANGUAGE = "VBScript">
Sub NChart1_BackgroundMouseEvent(MouseState)
if MouseState.MouseAction = 0 then
MsgBox "You clicked on the background"
end if
</script>


Direct push to browser

Some websites require higher levels of security than normal, because they display information which is strictly confidential. Such sites may serve corporations, banks or government agencies. The fact that a chart image is residing somewhere on the server may already pose a potential risk to the security of the website. This is why in such cases you may consider using the Direct push to browser feature.

The SendImageToBrowser function of the NAspManager object is an alternative method for generating images on the server.

It creates an image with dimensions and type, specified by the user and sends it directly to the browser through the Response object. The major difference between this method and EmbedInHtml is that SendImageToBrowser does not save temporary files on the server. This leads to several important advantages. No additional hard disk space is needed and a higher level of security for the image content is provided because there is actually no possibility an unauthorized user to access the images.

The function is defined as follows:

SendImageToBrowser(nWidth As Long, nHeight As Long, imgType as ImageMapFormat)

where nWidth and nHeight are respectively the width and the height of the image in pixels and imgType defines the type of the image. The image formats that are supported by this function are Jpeg, Png and Bitmap (respectively the values are: imfJPEG, imfPNG, imfBitmap).

The function automatically sets the content type according to the image format it generates: for JPEG - image/jpeg, for PNG - image/png and for Bitmap – image/bmp. This means that the asp scripts that call SendImageToBrowser must not contain html tags, because this will change the content type to text/html. This of course does not mean that the image cannot be placed into an html page. Here follows a simple example how to do this.

mychart.asp (an asp script that generates an image)

<%@ LANGUAGE = VBSCRIPT %>
<%Response.Expires = -1 %>
<%
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

‘ … place here some automation code for the chart
NChart1.AspManager.SendImageToBrowser 320, 240, imfPNG
%>

myhtml.html (an html page where we want to place the image)

<HTML>
<HEAD> <TITLE>Document Title</TITLE> </HEAD>
<BODY>
<B>Example with PNG image</B>
<P>
<IMG SRC="mychart.asp"/>
</BODY>
</HTML>

Note that the image source is mychart.asp.


Image maps

The ability to generate an HTML image map is an indispensable feature for every server side component. Image maps are very convenient because they have a few advantages over ActiveX controls on the client side.

1. The first advantage is that HTML image map are supported from almost all browsers. This makes this response type less browser sensitive.

2. The client does not need to install anything on his (her) machine. This is a very important advantage because some users will simply not agree to install a client side component.

To generate an HTML image map you must again use the EmbedInHtml function of the NAspManager object. The following line of VB script code on the server will generate an image map:

<%@ LANGUAGE = VBSCRIPT %>
<%Response.Expires = -1 %>
<%
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

‘ … place here some automation code for the chart
Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, 7, "NChart1", ""))
%>

The example uses the numeric value for tImageMap (7). Note that you do not need to code with numeric values if you use server side include. For more information on .inc files read the Using .inc files topic.

Now after we've seen how easy it is to generate an image map lets take a look at a more advanced example which illustrates how you can make your image map interactive. The image maps generated by all Nevron component support the following features:

1. Browser redirection - you can navigate the client side browser or open a new browser window when the user clicks on some object.

2. Tooltips - the client side image map can display tooltips when the user moves the mouse over the objects in the scene.

3. Mouse cursor - the image map can also change the default cursor. This can be very useful if you want to prompt the user that something will happen if he clicks with the mouse over the selected object. The combination of a tooltip and mouse cursor change makes the image map much more user friendly.

You configure all these features with the help of the NMouseResponse object. In fact in order to configure them to work with image maps you must follow the same programming pattern as with the more simple client side scenario. The following topics can be very useful if you want to learn in detail how to enable browser redirection, tooltips and mouse cursor changes.

Browser redirection

Tooltips

Mouse cursor

The following simple example demonstrates a simple sales report chart which will redirect the user to a product dedicated page. The script creates a bar chart with four categories for each product (Apples, Oranges, Pears and Bananas). By modifying the NMouseResponse properties for each data item you instruct the client browser to redirect to a relative URL with more information about the product. You can also specify absolute URL's. In this particular example we modified the background URL to point to the Microsoft Home page.

<script LANGUAGE="VBScript" RUNAT="Server">
' create the chart component on the server
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")
NChart1.Redraw = False

' set 2d half projection type
NChart1.Get3DView.SetPredefinedProjection pp2DHalf

' set gradient background
NChart1.Background.FillEffect.SetGradient gsHorizontal, gvVariant1, RGB(255,
 0, 0), RGB(255, 255, 0)NChart1.Background.MouseResponse.SetTooltip "Click
 here to go to Microsoft Web Site"
NChart1.Background.MouseResponse.URL = "http://www.microsoft.com"
 ' demonstration of absolute URLs
NChart1.Background.MouseResponse.ChangeMouseCursor = True

NChart1.Background.MouseResponse.MousePointer = 14 ' link select

' first clean up categories and series
NChart1.Categories.RemoveAll
NChart1.Series.RemoveAll

' clean presentation groups
NChart1.PresentGroups.RemoveAll

' create a bar presentation group to show the data
Set bar = NChart1.PresentGroups.Add(0) 'bar present group

bar.Common.Range.InfiniteX = True
bar.Common.Range.InfiniteY = True
bar.Common.Range.InfiniteZ = True

' add cagegories and series
NChart1.Categories.Add "Apples", True
NChart1.Categories.Add "Oranges", True
NChart1.Categories.Add "Pears", True
NChart1.Categories.Add "Bananas", True
NChart1.Series.Add "Fruits", True

' fill the data from the form some data and set the proper URL jump links
NChart1.DataAt(0, 0, 0).Value1 = 12
NChart1.DataAt(0, 0, 0).MouseResponse.SetTooltip "Click here to go to Apple sales"
NChart1.DataAt(0, 0, 0).MouseResponse.URL = "Apples.htm" 'relative URL to this asp page
NChart1.DataAt(0, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(0, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(1, 0, 0).Value1 = 14
NChart1.DataAt(1, 0, 0).MouseResponse.SetTooltip "Click here to go to Orange sales"
NChart1.DataAt(1, 0, 0).MouseResponse.URL = "Oranges.htm" 'relative URL to this asp page
NChart1.DataAt(1, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(1, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(2, 0, 0).Value1 = 17
NChart1.DataAt(2, 0, 0).MouseResponse.SetTooltip "Click here to go to Pear sales"
NChart1.DataAt(2, 0, 0).MouseResponse.URL = "Pears.htm" 'relative URL to this asp page
NChart1.DataAt(2, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(2, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(3, 0, 0).Value1 = 10
NChart1.DataAt(3, 0, 0).MouseResponse.SetTooltip "Click here to go to Bananas sales"
NChart1.DataAt(3, 0, 0).MouseResponse.URL = "Bananas.htm" 'relative URL to this asp page
NChart1.DataAt(3, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(3, 0, 0).MouseResponse.MousePointer = 14 ' link select

' set fill effects of the bars, but first tunr off
 uniform appearances
bar.Common.EnableUniformAppearance = False
NChart1.DataAt(0, 0, 0).Material.SetAmbientDiffuseColor vbYellow
NChart1.DataAt(0, 0, 0).FillEffect.SetSolidColor vbYellow

NChart1.DataAt(1, 0, 0).Material.SetAmbientDiffuseColor vbGreen
NChart1.DataAt(1, 0, 0).FillEffect.SetSolidColor vbGreen

NChart1.DataAt(2, 0, 0).Material.SetAmbientDiffuseColor vbRed
NChart1.DataAt(2, 0, 0).FillEffect.SetSolidColor vbRed

NChart1.DataAt(3, 0, 0).Material.SetAmbientDiffuseColor vbBlue
NChart1.DataAt(3, 0, 0).FillEffect.SetSolidColor vbBlue

' increase the size of the chart floor
NChart1.Walls(4).Width = 0.10

' set standard lightning
NChart1.LightModel.SetLightScheme 0

NChart1.EventManager.MouseMove = 36 ' tooltip + change mouse cursor

Set bar = nothing
NChart1.Redraw = True

Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, 7, "NChart1", ""))

</script>

Notice that besides modifying the properties of the individual NMouseResponse object attached to the data items we also touched the MouseMove property of the NEventManager object:

NChart1.EventManager.MouseMove = 36 ' tooltip + change mouse cursor

The value 36 assigned to the MouseMove property is produced by adding together the mmTooltip and mmMouseCursor constants.

Now lets move out attention from the scripting and concentrate on another feature closely related with image maps. This is of course the Image map response properties dialog:

At this point you were probably wondering how you can configure the image send to the browser along with the map or the client side script used to encode the tooltips and browser redirection functions. This dialog enables you to accomplish exactly this. Most of the properties must already be familiar to you - more specifically we've already discussed the properties in the JPEG and PNG control groups.

The Image map format and Bits per pixel combo boxes define the image type and color resolution.

To understand better the other properties we'll shortly describe the internal method used in the control to generate the image map. The first step is to break the image into a grid. Then for each grid cell the control determines the object in the 3D scene that covers most of it. Afterwards the control uses a complex polygon merging algorithm to merge the grid cells into polygons and sends this to the client browser.

The Grid cell size defines the granularity of the image grid. By increasing this value you reduce the accuracy of the image map, but gain speed because the image grid contains less cells which makes it easier to process.

The Use average color is closely related with the Grid cell size setting because it determines the way the control determines the object that is attached to each cell in the image grid. Turning off this property will reduce the computations required to generate the image map, but will again diminish the accuracy.

The Client side script combo defines the encoding of the image map - possible values are VBScript and JScript.

We'll end the discussion on image maps with a few points that depict the advantages and disadvantages of image maps.

Advantages

1. Image maps are browser independent.

2. They do not require the installation of special client side ActiveX controls.

Disadvantages

1. Images maps do not fire client side automation events.

2. If the client already installed the client side ActiveX control supplied with the component (Active response feature) the networking traffic is smaller when you use the active response feature instead of image maps.

3. Image map generation is more computationally expensive than the generation of Active response.


Full control response type

The most complex response type is the Full control response type. With this response type the client receives the full control. This control is initialized from a .nsv (Nevron save file) file residing on the server with the help of the LoadFromURL feature of the control, which de facto transfers the state of the server side component to the client side. Lets explain all the steps in this process in detail:

1. The server side script creates and configures the control. During this step you may perform a connection to a server side database or use some other means to feed the data.

2. After executing the EmbedInHtml function with response type parameter tFullControl the control will save its state to a temporary .nsv file which resides in the NevronTemp directory. Afterwards it will insert a client side <OBJECT> tag in the response send to the client. The following example accomplishes step 1 and 2.

<%@ LANGUAGE = VBSCRIPT %>
<%Response.Expires = -1 %>
<%
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

‘ … place here some automation code for the chart
Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, 8, "NChart1", "")) ' 8 stands for tFullControl
%>

The object tag generated by the above code is:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="/NevronDownload/NControl.lpk">
</OBJECT>

 <OBJECT
 CLASSID="CLSID:B5CE1CD3-3AB9-11d3-9502-525400E61EDC"
TYPE="application/x-oleobject"
WIDTH="400" HEIGHT="300" ID="NChart1" CODEBASE="/NevronDownload/3DChartMEA.cab#Version=7,0,0,0">
<PARAM NAME="WINDOWLESS" VALUE="0">
<PARAM NAME="TRANSPARENT" VALUE="0">
<PARAM NAME="SHOWDOWNLOAD" VALUE="1">
<PARAM NAME="DATAPATH" VALUE="/NevronTemp/NCF20011126190006_B0RVE.nsv">
</OBJECT>

As you can see the server component will actually instruct the browser to create two objects. The first one is an ActiveX control which is distributed with IE and is used to create licensed controls. The problem with licensed controls is that in order to be created they need a license key. The first object does just that - it downloads the NControl.lpk (lpk means license package file) which contains the control license key in an encrypted form and passes this license key and the corresponding CLSID to the browser. Later when the browser tries to create the Nevron control it already knows the valid license key. Also you're bound by the terms of the license agreement not to redistribute the NControl.lpk file to third parties.

Now lets take a closer look at the second object tag. In this particular example we're dealing with a 3DChart object tag, bug the discussion is valid for all Nevron components. The Widht, Height and ID parameters as you might notice are exactly the same as the parameters passed to the EmbedInHtml function executed on the server. The CODEBASE attribute instructs the browser to download the appropriate .cab (cabinet) file for 3DChart. The following table shows the meaning of all the abbreviations.

Language | Unicode or ANSI variant | .CAB name
English | ANSI | NControlMEA.cab
English | Unicode | NControlMEU.cab
Brazilian Portuguese | ANSI | NControlMBPA.cab
Brazilian Portuguese | Unicode | NControlMBPU.cab
Spanish Catalan | ANSI | NControlMSCA.cab
Spanish Catalan | Unicode | NControlMSCU.cab
Chinese Simplified | ANSI | NControlMCSA.cab
Chinese Simplified | Unicode | NControlMCSU.cab
Chinese Traditional | ANSI | NControlMCTA.cab
Chinese Traditional | Unicode | NControlMCTU.cab
Danish Ansi | ANSI | NControlMDA.cab
Danish | Unicode | NControlMDU.cab
Dutch | ANSI | NControlMDUTA.cab
Dutch | Unicode | NControlMDUTU.cab
French | ANSI | NControlMFA.cab
French | Unicode | NControlMFU.cab
German | ANSI | NControlMGA.cab
German | Unicode | NControlMGU.cab
Italian | ANSI | NControlMIA.cab
Italian | Unicode | NControlMIU.cab
Japanese | ANSI | NControlMJA.cab
Japanese | Unicode | NControlMJU.cab
Polish | ANSI | NControlMPA.cab
Polish | Unicode | NControlMPU.cab
Russian | Unicode | NControlMRU.cab
Russian | ANSI | NControlMRA.cab
Spanish | Unicode | NControlMSU.cab
Spanish | ANSI | NControlMSA.cab

You configure the .cab file send to the client from the Full control properties dialog in the NServerConfig utility. Note that the .cab file path name is followed by version information. This helps the client browser to check whether it needs to update the control installed on the client machine. This can greatly reduce network traffic.

The remaining parameters are WINDOWLESS, TRANSPARENT, SHOWDOWNLOAD and DATAPATH. Their meaning is discussed in detail in the "Using the Controls on the Client Side" topic.

The following code illustrates how you can generate the simple sales report chart we created in the previous topic with the Full control response. Note that this response type also allows context menus and trackball.

<script LANGUAGE="VBScript" RUNAT="Server">
' create the chart component on the server
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")
NChart1.Redraw = False

' set 2d half projection type
NChart1.Get3DView.SetPredefinedProjection pp2DHalf

' set gradient background
NChart1.Background.FillEffect.SetGradient gsHorizontal, gvVariant1, RGB(255,
 0, 0), RGB(255, 255, 0)NChart1.Background.MouseResponse.SetTooltip "Click
 here to go to Microsoft Web Site"
NChart1.Background.MouseResponse.URL = "http://www.microsoft.com"
 ' demonstration of absolute URLs
NChart1.Background.MouseResponse.ChangeMouseCursor = True

NChart1.Background.MouseResponse.MousePointer = 14 ' link select

' first clean up categories and series
NChart1.Categories.RemoveAll
NChart1.Series.RemoveAll

' clean presentation groups
NChart1.PresentGroups.RemoveAll

' create a bar presentation group to show the data
Set bar = NChart1.PresentGroups.Add(0) 'bar present group

bar.Common.Range.InfiniteX = True
bar.Common.Range.InfiniteY = True
bar.Common.Range.InfiniteZ = True

' add cagegories and series
NChart1.Categories.Add "Apples", True
NChart1.Categories.Add "Oranges", True
NChart1.Categories.Add "Pears", True
NChart1.Categories.Add "Bananas", True
NChart1.Series.Add "Fruits", True

' fill the data from the form some data and set the proper URL jump links
NChart1.DataAt(0, 0, 0).Value1 = 12
NChart1.DataAt(0, 0, 0).MouseResponse.SetTooltip "Click here to go to Apple sales"
NChart1.DataAt(0, 0, 0).MouseResponse.URL = "Apples.htm" 'relative URL to this asp page
NChart1.DataAt(0, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(0, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(1, 0, 0).Value1 = 14
NChart1.DataAt(1, 0, 0).MouseResponse.SetTooltip "Click here to go to Orange sales"
NChart1.DataAt(1, 0, 0).MouseResponse.URL = "Oranges.htm" 'relative URL to this asp page
NChart1.DataAt(1, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(1, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(2, 0, 0).Value1 = 17
NChart1.DataAt(2, 0, 0).MouseResponse.SetTooltip "Click here to go to Pear sales"
NChart1.DataAt(2, 0, 0).MouseResponse.URL = "Pears.htm" 'relative URL to this asp page
NChart1.DataAt(2, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(2, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(3, 0, 0).Value1 = 10
NChart1.DataAt(3, 0, 0).MouseResponse.SetTooltip "Click here to go to Bananas sales"
NChart1.DataAt(3, 0, 0).MouseResponse.URL = "Bananas.htm" 'relative URL to this asp page
NChart1.DataAt(3, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(3, 0, 0).MouseResponse.MousePointer = 14 ' link select

' set fill effects of the bars, but first tunr off
 uniform appearances
bar.Common.EnableUniformAppearance = False
NChart1.DataAt(0, 0, 0).Material.SetAmbientDiffuseColor vbYellow
NChart1.DataAt(0, 0, 0).FillEffect.SetSolidColor vbYellow

NChart1.DataAt(1, 0, 0).Material.SetAmbientDiffuseColor vbGreen
NChart1.DataAt(1, 0, 0).FillEffect.SetSolidColor vbGreen

NChart1.DataAt(2, 0, 0).Material.SetAmbientDiffuseColor vbRed
NChart1.DataAt(2, 0, 0).FillEffect.SetSolidColor vbRed

NChart1.DataAt(3, 0, 0).Material.SetAmbientDiffuseColor vbBlue
NChart1.DataAt(3, 0, 0).FillEffect.SetSolidColor vbBlue

' increase the size of the chart floor
NChart1.Walls(4).Width = 0.10

' set standart lightning
NChart1.LightModel.SetLightScheme 0

NChart1.EventManager.MouseMove = 36 ' tooltip + change mouse cursor

' enable the trackball
NChart1.EventManager.MouseDragMode = 1 'mdTrackball

' enable the context menus
NChart1.EventManager.RMouseButtonClick = 8 ' mmContextMenu

Set bar = nothing
NChart1.Redraw = True

Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, 8, "NChart1", ""))

</script>

To summarize lets examine the advantages and drawbacks of the Full control response type:

Advantages

1. The client receives the full component and can interact with it. You can for example enable the trackball and write client side script that modifies the chart without having to reload the HTML page. This enables you to create entire online chart presentations with ease.

2. Once the component is installed on the client machine there is no need to reinstall it if he (or she) tries to access the page later.

Drawbacks

1. The .cab file of the component is too big for slow Internet connections (over 1MB).

2. This features requires the Microsoft Internet Explorer browser versions 4.0 or greater (e.g. it is browser sensitive).


Generating SVG content

The SVG abbreviation stands for Scalable Vector Graphics, a language for describing two-dimensional vector and mixed vector/raster graphics in XML. All Nevron component can generate image maps for this XML format, that can redirect the browser to a specified URL. Although the SVG support is somewhat limited because the generated image map contains an image rather than being composed from a vector description this feature can be very handy if the client already has an SVG viewer or if the component is being integrated into a website which extensively uses SVG.

Preparing your computer to run the SVG example

Before you start to use the build in SVG response type you must register the MIME type for SVG. Otherwise the component will not be able to dynamically change the response type. This is of course very easy - all you have to do is to follow these steps:

1. Open Control Panel

2. Open Administrative Tools

3. Open the Internet Services Manager

4. Choose the Web site on which the component will run

5. Invoke the properties for this web site (right click)

6. Select the "HTTP headers" tab and click "File Types"

7. Add the following associations

Associated extension | Content type (MIME)
.svg | image/svg+xml

Automating the control on the server side

To generate a simple SVG image map from your ASP code you must pass a tSVG value to the TagType parameter of the EmbedInHtml function:

<%@ LANGUAGE = VBSCRIPT %>
<%Response.Expires = -1 %>
<%
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

‘ … place here some automation code for the chart
Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, tSVG, "NChart1"))
%>

By default the control will generate a SVG containing JScript and a 24 bpp color PNG. You can of course control various aspects of the SVG export such as the image format (JPEG/PNG/Bitmap), the bits per pixel, the image map grid granularity and others. This is done from the SVG response settings dialog of the NServerConfig utility.

The generated image type is controlled from the general group of settings. The Image map format and Bits per pixel combo boxes are self explanatory and their meaning has already been described in the previous topics. The Generate XML tag for SVG content check box instructs the control whether to include a start and end XML code in the generated SVG image map. You should check this box if the generated SVG image will be standalone e.g. it will not be used as part of another SVG content. The following two SVG code fragments were illustrate how this feature works in practice:

1. SVG code fragment with XML begin tag

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="400px" height="400px" viewBox="0 0 400 400"
xmlns="http://www.w3.org/2000/svg">
<script type="text/ecmascript"> <![CDATA[
...
JScript code goes here
...
]]>
</script>
<image id = "IMG_NCF20020618182110_TKL07" x="0" y="0" width="400px" height="400px"
xlink:href="/NevronTemp/NCF20020618182109_OIW4D.png">
</image>
<g style="fill:white;fill-opacity:.0">
...
image map description using SVG paths
...
</g>
</svg>

2. SVG code fragment without XML begin tag

<script type="text/ecmascript"> <![CDATA[
...
JScript code goes here
...
]]>
</script>
<image id = "IMG_NCF20020618182817_H2GBG" x="0" y="0" width="400px" height="400px"
xlink:href="/NevronTemp/NCF20020618182816_80KG4.png">
</image>
<g style="fill:white;fill-opacity:.0">
...
image map description using SVG paths
...
</g>

When enabled the Generate interactive SVG group of controls instructs the component to use the client side script from the Client side script combo and to generated the image map with the Grid cell size granularity. The Use average color controls the algorithm used to match a cell in the image grid to a particular object in the 3D scene. For a more detailed description on these properties please take a look at the Image maps topic in this tutorial.

The JPEG and PNG control groups specify some parameters for the exported image if it is JPEG or PNG. In the case of JPEG these are Quality, Smoothing and Quantize. PNG support the Transparent option. The meaning of these properties is explained in detail in the Import export functionality topic.

Please note that when you use SVG response type the control will automatically change the response content type to "text/vnd.wap.wml".

Finally you should know that there is a way to customize the image tag returned from the SVG export when you're not exporting interactive SVG content. This is done by modifying the SVG template string of the NAspManager. The default SVG image template tag is:

"<image x=\"0\" y=\"0\" width=\"<width>px\" height=\"<height>px\" xlink:href=\"<image_file>\"> \r\n <title> \"<image_title>\" </title> \r\n</image>\r\n"

The component replaces <width> and <height> with the width and height of the generated image respectively.

The <image_file> and <image_title> template fields are filled with the relative path to the generated image and an alternative text (used when the client SVG reader does not support the image format).

We'll end the topic for the SVG response with a small ASP code sample:

<%@ Language=VBScript %>
<%Response.Expires=0%>
<!-- #include virtual="NevronInclude\3DChart.inc" -->

<script LANGUAGE="VBScript" RUNAT="Server">
' create the chart component on the server
Set NChart1 = Server.CreateObject("3DCHART.NChart.7)
nBC = NChart1.AspManager.BrowserCapabilities()

' create the chart component on the server
NChart1.Redraw = False

' set 2d half projection type
NChart1.Get3DView.SetPredefinedProjection pp2DHalf

' set gradient background
NChart1.Background.FillEffect.SetGradient gsHorizontal, gvVariant1, RGB(255,
 0, 0), RGB(255, 255, 0)NChart1.Background.MouseResponse.SetTooltip "Click
 here to go to Microsoft Web Site"
NChart1.Background.MouseResponse.URL = "http://www.microsoft.com"
 ' demonstration of absolute URLs
NChart1.Background.MouseResponse.ChangeMouseCursor = True
NChart1.Background.MouseResponse.MousePointer = 14 ' link select

' create a bar presentation group to show the data
Set bar = NChart1.PresentGroups.Add(0)
bar.Common.Range.InfiniteX = True
bar.Common.Range.InfiniteY = True
bar.Common.Range.InfiniteZ = True

' add cagegories and series
NChart1.Categories.Add "Apples", True
NChart1.Categories.Add "Oranges", True
NChart1.Categories.Add "Pears", True
NChart1.Categories.Add "Bananas", True
NChart1.Series.Add "Fruits", True

' fill the data from the form some data and set the proper URL jump links
NChart1.DataAt(0, 0, 0).Value1 = 12
NChart1.DataAt(0, 0, 0).MouseResponse.SetTooltip "Click here to go to Apple sales"
NChart1.DataAt(0, 0, 0).MouseResponse.URL = "Apples.htm" 'relative URL to this asp page
NChart1.DataAt(0, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(0, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(1, 0, 0).Value1 = 14
NChart1.DataAt(1, 0, 0).MouseResponse.SetTooltip "Click here to go to Orange sales"
NChart1.DataAt(1, 0, 0).MouseResponse.URL = "Oranges.htm" 'relative URL to this asp page
NChart1.DataAt(1, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(1, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(2, 0, 0).Value1 = 17
NChart1.DataAt(2, 0, 0).MouseResponse.SetTooltip "Click here to go to Pear sales"
NChart1.DataAt(2, 0, 0).MouseResponse.URL = "Pears.htm" 'relative URL to this asp page
NChart1.DataAt(2, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(2, 0, 0).MouseResponse.MousePointer = 14 ' link select

NChart1.DataAt(3, 0, 0).Value1 = 10
NChart1.DataAt(3, 0, 0).MouseResponse.SetTooltip "Click here to go to Bananas sales"
NChart1.DataAt(3, 0, 0).MouseResponse.URL = "Bananas.htm" 'relative URL to this asp page
NChart1.DataAt(3, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(3, 0, 0).MouseResponse.MousePointer = 14 ' link select

' set fill effects of the bars, but first tunr off
 uniform appearances
bar.Common.EnableUniformAppearance = False
NChart1.DataAt(0, 0, 0).Material.SetAmbientDiffuseColor vbYellow
NChart1.DataAt(0, 0, 0).FillEffect.SetSolidColor vbYellow
NChart1.DataAt(1, 0, 0).Material.SetAmbientDiffuseColor vbGreen
NChart1.DataAt(1, 0, 0).FillEffect.SetSolidColor vbGreen
NChart1.DataAt(2, 0, 0).Material.SetAmbientDiffuseColor vbRed
NChart1.DataAt(2, 0, 0).FillEffect.SetSolidColor vbRed
NChart1.DataAt(3, 0, 0).Material.SetAmbientDiffuseColor vbBlue
NChart1.DataAt(3, 0, 0).FillEffect.SetSolidColor vbBlue

' increase the size of the chart floor
NChart1.Walls(4).Width = 0.10

' set standard lightning
NChart1.LightModel.SetLightScheme 0
NChart1.EventManager.MouseMove = 36 ' tooltip + change mouse cursor

' enable context menus
NChart1.EventManager.RMouseButtonClick = 8 ' context menus
NChart1.EventManager.MouseDragMode = 1 ' trackball
NChart1.Legend.LegendMode = lmDisable

Set bar = nothing
NChart1.Redraw = True
Response.Write(NChart1.AspManager.EmbedInHtml(400, 400, 9, "NChart1", "My image"))
</script>


Overview

The core of every component that support WAP is the ability to export images with low color resolution. The current version of the component can be used on web servers that export images which will be later send to mobile devices. The control also has functions for detecting the browser capabilities e.g. whether the client browser is a WAP or a normal browser. This allows the developer to send different responses depending on the client browser and yet to keep the code necessary to feed the chart data and modify the chart appearance common for both cases.


Preparing to run the WAP examples

The first thing you should do when you start to develop for the mobile world is to obtain a mobile device simulator. The simple ASP page we've created here was tested with then Openwave SDK, WAP Edition 5.0. Note that you must also change the accepted file types of IIS before you start running the ASP example. This is required because otherwise the component cannot change the response type dynamically. To accomplish this follow these steps:

1. Open Control Panel

2. Open Administrative Tools

3. Open the Internet Services Manager

4. Choose the Web site on which the component will run

5. Invoke the properties for this web site (right click)

6. Select the "HTTP headers" tab and click "File Types"

7. Add the following associations

Associated extension | Content type (MIME)
.wbmp | text/vnd.wap.wbmp
.wml | text/vnd.wap.wml
.wmlc | application/vnd.wap.wmlc
.wmls | text/vnd.wap.wmlscript
.wmlsc | application/vnd.wap.wmlsc


Automatic response type conversion

Most of the mobile devices in use still have limited capabilities and you cannot send ActiveX or Image Map response types to such devices. This is why it is necessary to have a mechanism which will map these response types to a response type understood by the mobile client. The most supported image format in the mobile world is the monochrome bitmap and this is why when the automatic response type conversion is enabled all response types will be automatically converted to monochrome bitmap by default. This means that when you call the EmbedInHtml function of the NAspManager passing a response type different from rtBitmap the control will automatically map this response type according to an internal conversion table if the client browser is a WAP device.

To configure the automatic response type conversion run the NServerConfig utility and press the "WAP Settings" button. The following dialog box will appear:

As you can see the Enable WAP sensitive mapping for response types is checked by default. You may wish to disable this feature and manually change the response type if necessary.

The rest of the dialog actually represents a table specifying how different response types should be mapped. The possible Format values are Bitmap, PNG and JPEG whereas the possible values for the Bits per pixel combo are 1, 4, 8, 16 and 24.


WAP example

Now after we've covered the steps necessary to properly configure your web server lets examine a simple ASP page which must display pie charts to both ordinary and WAP browsers. We would like to keep the code that feeds the data centralized and modify only the chart appearance depending on whether the chart is rendering for a WAP device or not. To accomplish this we'll extensively use the GetBrowserCapabilities function of the NAspManager object. This function returns an integer value of bcWAP (= 1) if the client browser is a WAP enabled device or bcHTML otherwise. Following are two screenshots of the generated image when the client is a mobile device and IE:

Example output for IE

Example output for WAP

The code necessary to produce this pie chart is:

<%@ Language=VBScript %>
<%Response.Expires=0%>
<!-- #include virtual="\NevronInclude\3DChart.inc" -->

<script LANGUAGE="VBScript" RUNAT="Server">
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

' A simple example demonstrating the use of 3DChart on servers used to generate both HTML and WAP responses

if NChart1.AspManager.BrowserCapabilities = 1 then
Response.Write("<?xml version=""1.0""?>"
 + Chr(13) + Chr(10))
Response.Write("<!DOCTYPE wml PUBLIC ""-//PHONE.COM//DTD
 WML 1.3//EN""" + Chr(13) + Chr(10))
Response.Write(" ""http://www.phone.com/dtd/wml13.dtd"">"
 + Chr(13) + Chr(10))
Response.Write("<wml>" + Chr(13) + Chr(10))
Response.Write("<card title=""Simple WAP Pie Chart"">"
 + Chr(13) + Chr(10))
Response.Write("<p mode=""nowrap"">"
 + Chr(13) + Chr(10))
else
Response.Write("<html>"  +
 Chr(13) + Chr(10))
Response.Write("<head>"  +
 Chr(13) + Chr(10))
Response.Write("<meta NAME=""GENERATOR"" Content=""Microsoft
 Visual Studio 6.0"">" + Chr(13) +  Chr(10))
Response.Write("<meta HTTP-EQUIV=""PRAGMA""
 CONTENT=""NO-CACHE"">"  +
 Chr(13) + Chr(10))
Response.Write("</head>"  +
 Chr(13) + Chr(10))
Response.Write("<body>"  +
 Chr(13) + Chr(10))
Response.Write("<B><CENTER> Simple HTML Pie Chart </CENTER></B>"
  + Chr(13)
 + Chr(10))
Response.Write("<P></P>"  +
 Chr(13) + Chr(10))
end if

RenderChart(NChart1)

if NChart1.AspManager.BrowserCapabilities = 1 then
Response.Write(Chr(13) + Chr(10))
Response.Write("</p>" + Chr(13) + Chr(10))
Response.Write("</card>" + Chr(13) + Chr(10))
Response.Write("</wml>" + Chr(13) + Chr(10))
else
Response.Write("</body>" + Chr(13) + Chr(10))
Response.Write("</html>" + Chr(13) + Chr(10))
end if

Sub RenderChart(NChart1)
NChart1.Redraw = False

' set gradient background
NChart1.Background.FillEffect.SetGradient gsHorizontal, gvVariant1, vbWhite, RGB(150, 150, 150)

' first clean up categories and series
NChart1.Categories.RemoveAll
NChart1.Series.RemoveAll

' clean presentation groups
NChart1.PresentGroups.RemoveAll

  '
 create a pie presentation group to show the data
Set Pie = NChart1.PresentGroups.Add(pgtPie)
Pie.Common.Range.InfiniteX = True
Pie.Common.Range.InfiniteY = True
Pie.Common.Range.InfiniteZ = True

' add cagegories and series
NChart1.Categories.Add "Apples", True
NChart1.Categories.Add "Oranges", True
NChart1.Categories.Add "Pears", True
NChart1.Series.Add "Fruits", True

  NChart1.DataAt(0,
 0, 0).Value1 = 10
NChart1.DataAt(0, 0, 0).Label = "Pie1"
NChart1.DataAt(1, 0, 0).Value1 = 9
NChart1.DataAt(1, 0, 0).Label = "Pie2"
NChart1.DataAt(2, 0, 0).Value1 = 12
NChart1.DataAt(2, 0, 0).Label = "Pie3"

NChart1.Get3DView.SetPredefinedProjection pp3DTop

if NChart1.AspManager.BrowserCapabilities = 1 then
'turn off the legend (otherwise the chart will not be readable)
NChart1.Legend.TextEx.Font.Size = 5
NChart1.DataAt(0, 0, 0).FillEffect.SetPattern 45, vbBlack, vbWhite 'ptSmallCheckerBoard
NChart1.DataAt(1, 0, 0).FillEffect.SetPattern 12, vbBlack, vbWhite 'ptPercent50
NChart1.DataAt(2, 0, 0).FillEffect.SetSolidColor vbWhite
NChart1.RightMargin = 70
NChart1.LeftMargin = 0
NChart1.Legend.Backplane.Visible = False
NChart1.Legend.TextOffset = 2
NChart1.Legend.MarginX = 100
NChart1.Legend.MarginY = 0
NChart1.Legend.VerticalAlign = vaTop
NChart1.Legend.HorizontalAlign = haLeft ' make the chart more fancy if we render in HTML mode
else
' make the chart more fancy if we render for HTML
Pie.PieStyle = psSmoothEdgePie
NChart1.DataAt(0, 0, 0).FillEffect.SetSolidColor vbRed
NChart1.DataAt(0, 0, 0).Material.SetAmbientDiffuseColor vbRed
NChart1.DataAt(1, 0, 0).FillEffect.SetSolidColor vbBlue
NChart1.DataAt(1, 0, 0).Material.SetAmbientDiffuseColor vbBlue

NChart1.DataAt(2, 0, 0).FillEffect.SetSolidColor vbYellow
NChart1.DataAt(2, 0, 0).Material.SetAmbientDiffuseColor vbYellow
NChart1.Get3DView.Elevation = 45
NChart1.Get3DView.Rotation = 270

NChart1.Get3DView.ProjectionType = ptPerspective
NChart1.Get3DView.Zoom = 120

' set standart lightning
NChart1.LightModel.SetLightScheme lsStandard

Set Header = NChart1.LabelCollection.AddHeader("Sales report")
Header.TextEx.Backplane.Visible = TRUE
Header.TextEx.Backplane.Style = bpsSmoothEdgeRectangle
Header.TextEx.Backplane.FillEffect.Transparency = 50
Header.TextEx.FillEffect.SetSolidColor vbBlack
Header.TextEx.Font.Size = 12
end if

NChart1.Redraw = True

if NChart1.AspManager.BrowserCapabilities = 1 then
Response.Write(NChart1.AspManager.EmbedInHtml(120, 100, tPNG, "NChart1", "Sales report"))
else
Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, tPNG, "NChart1", "Sales report"))
end if
end sub
</script>

Notice how we used the Response.Write function to change the response contents at runtime. The component will automatically change the response content type (MIME) to "text/vnd.wap.wml".

In order to increase the readability of the chart we used a simple 2D projection and disabled the smooth edge pie option. We've also used patterns instead of solid colors for the pie filling because solid colors are not readable in monochrome bitmaps.

Finally you should know that when you export an image to a WAP device the component also uses a different image tag template string. This is required because the format of the HTML image tag template and the WML image tag template slightly differ. This template tag can be modified at runtime by changing the value of the WAPImageTemplateTag property of the NAspManager object. For more information on this property consult with the Object Reference.


Overview

The following topics will teach you how to use the component on ASP .NET servers. The language used in the samples is VB7 but it is also valid for C#. You can of course pick the language you're most comfortable with when you develop your ASP .NET application.


Getting started

The control is compatible with ASP .NET and can operate on the server side and generate static or interactive images as we discussed topics related to ASP servers. In most cases the integration scenario is the same so we won't go through the same details again.

Security considerations

If you intend to use the EmbedInHtml function of the NAspManager and save yourself the code necessary to manage temporary files or checks for browser compatibility the first thing you need to do is to configure your ASP .NET server. This is done as you may guess with the NServerConfig utility. One of the major differences between using the component with ASP and ASP .NET is that under ASP .NET the control will operate under different security permissions. ASP .NET uses the ASPNET account to instantiate the control so you must check whether this account has permissions to run the control. In addition the NevronTemp directory must also have a write permission for this account. By default NServerConfig will assign these security rights to the NevronTemp directory but it is recommended to double check this.

Another approach on enabling the control to write the temporary directory is to use the build in impersonation feature of the control. This is discussed in the Impersonation topic in this book.

Apartment model

Another issue that you'll have to take care of is that ASP .NET runs components as MTA (Multi Threaded Aparment). 3DChart and the other Nevron components are STA (Single Threaded Apartment). Fortunately enabling STA components to operate in ASP .NET is very easy. All you have to do is to include the aspcompat attribute in the <%page> tag of your aspx page. For example:

<%@Page aspcompat=true Language=VB%>.

Early binding versus late binding

In ASP, all calls to COM objects occur through the IDispatch interface. This is known as "late binding" because calls to the actual objects are handled indirectly via IDispatch at run time. In ASP .NET, you can continue to invoke your components in this fashion if you like. Remember the code we used to create the object on ASP servers:

Dim NChart1 As Object

Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

‘ … place here some automation code for the chart
Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, 7, "NChart1", ""))

This works but it is not the preferred manner to access your components. With ASP .NET, you can take advantage of early binding and create your objects directly as follows:

Dim NChart1 As Object
Set NChart1 = Server.CreateObject("3DCHART.NChart.7")

‘ … place here some automation code for the chart
Response.Write(NChart1.AspManager.EmbedInHtml(400, 300, 7, "NChart1", ""))

This is possible because the component support dual interfaces as well as the standard IDispatch interface. Early binding allows you to interact with your components in a type-safe manner. In order to take advantage of early binding, you need to add a reference to the component in your project in much the same way that you add a COM reference to a Visual Basic 6.0 project. Assuming that you are using Visual Studio .NET, a managed proxy object is created behind the scenes, on top of your COM component, giving you the impression you are dealing directly with your COM component as a .NET component.

The performance with both approaches is almost identical. There is definitely some overhead involved when using COM interoperability as you now have an extra layer introduced because of the proxy object. In most cases, however, this will not be a factor because the amount of actual CPU instructions for the interoperation to occur is still substantially less than that required by your indirect IDispatch calls. You will be gaining more than you will lose.

The steps by step guidelines in the next chapter assume that you'll be using late binding.


Building a simple VB ASP .NET application

This topic provides a step by step guidelines to create a simple VB .NET Web Application that generates a dynamic Area chart on the server and sends it to the client browser. The application can also be found in the ASP .NET example folder in the NDemoLauncher application.

1. Open Microsoft Developer Studio for .NET

2. From the File menu select New Project

3. Select a Visual Basic as the project type

4. Select ASP .NET Web Application from the Templates list box

5. In the location edit box type http://localhost/NETChart

6. Click Ok.

7. Open the WebForm1.aspx file and click on the HTML view tab.

8. Add an aspcompat=true attribute to the <@Page> directive. For example:

<%@ Page aspcompat = true Language="vb"
 AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
 Inherits="NETChart.WebForm1"%>

9. Open the Toolbox

9. In the design view of the page add a new button called ChangeData

10. In the design view of the page add a new image called ChartImage. We’ll later replace the HTML generated from this image with the image dynamically generated from the chart

11. Go to the Solution explorer and right click on the References node and select Add reference

12. From the COM tab select 3Dchart 7.0 ActiveX control. Click Select and then OK

13. Add an event for the ChangeData button (double click)

14. In the WebForm1.aspx.vb import the 3Dchart lib

Imports N3DCHARTLib

13.Declare a string in your class called ImagePath. This variable will be used to store the html generated by the component.

Protected ImagePath As String

15.Declare an instance of 3Dchart in page:

Protected NChart1 As N3DCHARTLib.Nchart

16. Add the following three functions to your class:

Private Sub UpdateImageTag()
ImagePath = NChart1.AspManager.EmbedInHtml(400, 300, N3DCHARTLib.HTMLTag.tPNG, "NChart1", "")
End Sub

Private Sub InitializeChart()
NChart1.Redraw = False

' create two series and categories
NChart1.Categories.Add("c1", True)
NChart1.Categories.Add("c2", True)
NChart1.Categories.Add("c3", True)
NChart1.Categories.Add("c4", True)
NChart1.Categories.Add("c5", True)

NChart1.Series.Add("", False)
NChart1.Series.Add("", False)

GenerateData()

' create the area present group to show the data
Dim area As NAreaPresentGroup
area = NChart1.PresentGroups.Add(PresentGroupType.pgtArea)

With area.Common
.Range.InfiniteX = True
.Range.InfiniteY = True
.Range.InfiniteZ = True

.LegendMode = PresentGroupLegendMode.pglmUniformAppearances
' create two unifrom appearances to fill the areas (there is one by default)
.EnableUniformAppearance = True
.UniformAppearances.Add("Area 2")
.UniformAppearances.GetAt(0).Label = "Area 1"
.UniformAppearances.GetAt(0).FillEffect.SetSolidColor(Convert.ToUInt32(RGB(255, 0, 0)))
.UniformAppearances.GetAt(0).Material.SetAmbientDiffuseColor(Convert.ToUInt32(RGB(255, 0, 0)))
.UniformAppearances.GetAt(0).Border.EnableLines = False
.UniformAppearances.GetAt(1).FillEffect.SetSolidColor(Convert.ToUInt32(RGB(0, 0, 255)))
.UniformAppearances.GetAt(1).Material.SetAmbientDiffuseColor(Convert.ToUInt32(RGB(0, 0, 255)))
.UniformAppearances.GetAt(1).Border.EnableLines = False
End With

' setup the title
With NChart1.LabelCollection.AddHeader("Area Chart")
.TextEx.Font.Size = 9
.TextEx.Use2DText = True
.TextEx.Font.Bold = True
End With

Chart1.Background.FillEffect.SetPredefinedAdvancedGradient(PAGradientScheme.gsDesert1, 11)
 NChart1.Get3DView.SetPredefinedProjection(PredefinedProjection.pp2DHalf)

NChart1.LightModel.SetLightScheme(LightScheme.lsStandardWhite)
NChart1.Redraw = True
End Sub

Private Sub GenerateData()
Dim nX, nY As Integer

Randomize()
For nX = 0 To NChart1.Categories.GetCount() - 1
For nY = 0 To NChart1.Series.GetCount() - 1
NChart1.DataAt(nX, nY, 0).Value1 = Rnd() * 20
Next nY
Next nX

End Sub

17. In the page load function type:

NChart1 = Server.CreateObject("3DChart.NChart.7")

       NChart1.AspManager.ImageTemplateTag
= "<IMG style=""Z-INDEX: 103; LEFT: 8px; WIDTH: 400px;
POSITION: absolute; TOP: 40px; HEIGHT: 300px"" height=""300""
alt="""" src=""<image_file>""
width=""400"">"

InitializeChart()

UpdateImageTag()

Note that we modified the ImageTemplateTag according to the HTML generated from the Image control we inserted earlier

18. Intercept PageInit

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

InitializeComponent()

End Sub

19. In the on ChangeData_click server event insert the following code:

Private Sub ChangeData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeData.Click

GenerateData()
UpdateImageTag()

End Sub

20. Switch back to the webform1.aspx file

21. In the HTML view replace the <asp:image> tag with

<%= ImagePath%>

22. Run NserverConfig and press the Update server button. Make sure that the Allow ASP .NET to access the temp directory check box is on

23. Build and launch the application.


Impersonation

As we've already seen in the previous topics the control uses either the ASPNET or the IUSR_MachineName account to access the NevronTemp directory depending on whether it is used from an ASP or ASP .NET server. The fact that you assign a write permission for this account may pose a potential security risk to your server because all users that access your computer use the rights assigned to one of these accounts.

Fortunately there is a way to instruct the control to use a different account when it writes to the NevronTemp directory. This is achieved when you supply the control with the necessary credentials for this account. They are login (Used id), password and domain. Most likely you'll use a local system account to run the control. In this case the value of domain must be ".".

There are two ways to configure the control to use a different account other than the ASPNET or the IUSR_MachineName accounts. The first one involves starting the NServerConfig utility and configuring impersonation from the User impersonation dialog box. The second one is to pass the credentials to the control from your ASP or ASP .NET script.

Configuring impersonation with the NServerConfig utility

Launch the NServerConfig utility and press the User impersonation... button. The following dialog box will appear:

Type in some user name in the login field and the appropriate password in the password edit box. Do not alter the domain field because we assume that the account exists on the machine.

Now when you press the Ok button and then update the server (Update server... button) the control will use the supplied credentials and will try to create the temporary files in the NevronTemp directory using the security rights of the specified account.

Configuring impersonation from your script

To configure impersonation from your server side script you must modify the EnableUserImpersonation, Login, Password and Domain (optional) properties of the NAspManager object. You must accomplish this before you make any calls to the EmbedInHtml function if you want impersonation to take effect. The following example enables the control to use impersonation and specifies the necessary credentials.

NControl.AspManager.EnableUserImpersonation = True
NControl.AspManager.Login = "myaccount"
Control.AspManager.Password = = "mypassword"
NControl.AspManager.Domain = = "." 'use the local machine security database

Creating an account

To create an account for the control open the Control Panel and double click on the Users and Passwords item. Click Add User and follow the instruction of the wizard. Make sure that you supply the same account id and password to the Login and Password properties.

Assigning write permission to the account used for impersonation

Before you can use the account to impersonate on the server and generate images in the temporary directory you must assign write privilege to this account for the NevronTemp directory (usually located under the wwwroot folder).


Security

Security tips

This topic describes a few tips related with Nevron components that can improve the level of security of your website.

1. Always check whether the NevronTemp directory has the minimum access rights required by the component. This means the Internet guest account must have only write privilege. A combination or Write and Execute permissions is a serious security hole because malicious users can upload destructive executable and launch them on your server. By default the NServerConfig gives only Write permissions to the Internet guest account, but it is recommended to double check the security settings for this directory.

2. Set a small expiration time span for the temporary files. The longer a temporary file stands on your server the longer time the hacker has to guess the image file name. The temporary file names are protected with a 5 digit or character combination which leads to a total of 52, 521, 875 different file names. So the file name is almost impossible to guess, but nevertheless do not underestimate the inventive powers of the people who want to steal information from your server.

3. Configure the control to check for expired temp files every time it generates a response (Auto delete interval = 1).

4. Use the Windows NT "at" command to schedule temporary file clean up of the NevronTemp directory and any other directory which holds confidential information. The control will check for expired temp files only when it generates a response. This may lead to the existence of expired temp files on the server if the .asp page containing the control is not accessed for a long time.

5. Change the name of the NevronTemp directory to a more difficult to guess name such NevronTemp4958 for example.

6. Consider using the Direct push to browser feature supported by the component, because this type of server response does not generate any temporary files on the server.

7. Disable the directory browsing feature of the HTTP server. This is done from the Internet Information services control panel. Select your website (Default Web Site) and from the properties uncheck the Directory browsing check.

8. Consult your Website administrator for additional security measures.


Overview

This topic is dedicated to the most common problems detected by the developers using our products. The following topics use 3DChart as an example component although the strategies for surrounding the problem remain the same for the rest of Nevron components.


IIS locks the OpenGL dlls

This problem is related to Windows 2000 servers. You'll not experience it on Windows NT and Windows XP machines.

SYMPTOMS

After you load an ASP page from your server all VB programs that use 3DChart stop to work. Even worse they complain that the component or one of its dependencies is missing or invalid. The reverse variant shows similar symptoms - if you try to load an ASP page and you already have the component working in VB or some other application the ASP script will fail in the CreateObject function. The displayed error code is "Server object, ASP 0177 (0x8007045A) 8007045a"

CAUSE

The problems is that Windows 2000cannot execute OpenGL programs simultaneously on two different Window stations. This is why after you load the component in IIS for example all subsequent request to load it from VB will fail. We expect that this problem will soon be fixed so check for the latest service packs from Mircrosoft.

RESOLUTION

The solution is very easy - you must stop the program that uses the component. To stop IIS you may use the following commands from the command prompt:

d:\net stop w3svc
d:\net stop iisadmin

similarly to start the service again you must execute the following commands:

d:\net start iisadmin
d:\net start w3svc


Troubleshooting

This topic will provide a check list that you can try to use if you meet problems with the control's integration in ASP or HTML.

On the client side

1. The first thing to check is whether the control is installed on the machine. You can do this by launching a VB example or looking for the control CLSID in the registry. The Regedit utility which is part of Windows will help you to do this. For a list of the Nevron controls CLSIDs see the "Deploying Nevron ActiveX components" topic.

2. If the component is used in an HTML page check whether your codebase attribute points to a valid cab file.

3. If you used the separate build to build the installation program of your application then check whether the dependent dlls are correctly installed. Use the depends.exe utility supplied with Visual Studio.

4. Check whether you included the .lpk file to the HTML - for more information check the "Using the Controls on the Client Side" topic.

On the server side

ASP and ASP .NET servers

1. Again the first thing to check is whether the control is installed properly by running one of the VB examples.

2 If you're using the NAspManager object run the NServerConfig utility and press the "Update server" button. Make sure that the Allow ASP to access the temp directory and Allow ASP .NET to access the temp directory check controls are checked. For more information see the Security later in this book.

3. If you use the NImportExport object to generate static images check whether you have the UseWindow dimension set to TRUE. This parameter must be always FALSE for ASP pages.

ASP Servers only

1. Check whether the account used by IIS for guests has permissions to access (execute) the control ocx file. This account is called IUSR_MachineName.

2. Check whether the account used by IIS for guests has permissions to write the NevronTemp directory. The NServerConfig utility automatically takes care for this but in the case it fails you may assign these rights manually.

3. Check whether you have included the .inc file in the ASP page. Otherwise custom constants will not be defined. For more information please check out the Using .inc files topic.

ASP .NET server only

1. Check whether the account used by ASPX for guests has permissions to access (execute) the control ocx file. This account is called ASPNET.

2. Check whether the account used by ASPX for guests has permissions to write the NevronTemp directory. The NServerConfig utility automatically takes care for this but in the case it fails you may assign these rights manually.

If the problem persists please do not hesitate to contact us at support@nevron.com with a detailed information about the problem.


Deploying Nevron ActiveX components

One of the most important questions related with component development is “How do I deploy my software build with the help of various components on the client machine?”. This topic main goal is to answer to this question.

Before we start to discuss the possible options for building your installation we will examine the architecture of Nevron controls and its advantages and drawbacks. The following simple diagram illustrates it:

As you can see Nevron controls use the functionality of the Windows API and the OpenGL API through the help of two object oriented wrappers. These are the MFC (Microsoft Foundation Classes) and the NOpenGL layer. NOpenGL was developed by Nevron and implements the support for the Nevron ActiveX standard features, such as the support for various image file formats, the rendering of all 3D graphics primitives, ASP integration etc.

In order to function properly the Nevron ActiveX control needs to have the underlying layers properly installed and registered. This is not an easy task because some of the DLLs maybe used by other Windows applications and you'll have to restart your machine.

We have realized this and this is why the current version supports two builds for the controls. The first one is the monolith build. It encompasses the Nevron control, the NOpenGL layer and the MFC library in only one DLL. This makes the installation process for this build very easy and error free. The other one is the separate build. If you use this build you must also take care for the installation of the MFC and NOpenGL dlls.

In addition to this the two builds come in two versions - ANSI and Unicode. The ANSI build is designed for users and developers that do not need to show Unicode characters. The big problem with Unicode is that programs compiled as Unicode will not run on Windows 95/98 systems because they do not support it. On the other hand with the Unicode version you can display Arabic, Chinese, Cyrilic, Greek, Hebrew, Japanese kana, Korean hangul and others. To indicate that the build is the Unicode version we added 'u' at the end of the .ocx or .dll file. For example 3DChartM.ocx stands for 3DChart monolith build ANSI version, whereas 3DChartMu.ocx means - 3DChart monolith build Unicode version. The installation guidelines that will follow describe how to install the ANSI version, but they are also valid for the Unicode - the only thing you'll have to do is to add the 'u' at the end of the .ocx, .dll or .cab file. By default the control installation registers the monolith ANSI version. If you need to change to the Unicode one you must register it by using the NControlConfig utility supplied with the control. For more information on this refer to the Switching between Unicode and ANSI builds topic.

Please note that we assume that OpenGL is already installed on the target machine. OpenGL comes as a standard component with Win95, Win98, Win NT 4.0 and Win2000. Only early Win95 releases do not support it. For additional information see the Installing the OpenGL library topic.

Licensing issues Note that the retail version of all Nevron components is licensed. This means that you must have the appropriate .lic file in order to use the controls. The .lic file must also reside in the directory where the component is installed. By the terms of the license agreement you're bound not to redistribute this .lic file to third parties. Most containers (such as VB) will automatically store the license key in their form so you do not need to worry about redistributing a compiled version of your applications. For other containers that do not support this you must use the IClassFactory2 methods to instantiate the component. Check the documentation supplied with these containers on how you can build and redistribute licensed controls. The license key is the first line in the .lic file.

Installation with the monolith build

To indicate that the build is monolith we have added 'M' at the end of the control name. For example 3DChartM.ocx is the monolith build for 3DChart. These ocx files have no dependent dlls other than the standart Windows dlls that are guaranteed to be installed on the client machine.

1. Write your own installation program

The only step that you have to perform in your installation is to copy the ocx to the target directory and then register it. Registering is done by calling the DllRegisterServer function exposed by the control.

2. Install the controls manually

Copy the control to the target directory and then call regsvr32 to register it. The regsvr32 utility is shipped with Windows. Lets say that F is your CD-ROM drive where you have the 3DChartM.ocx. The following lines from the command prompt will register the control on a WinNT machine.

c:\copy f:\3DChartM.ocx c:\windows\system32
c:\regsvr32 c:\windows\system32\3DCharM.ocx

That's all! The control is now installed in your windows\sytem32 directory.

3. Use a .CAB file

The third way to distribute the monolith build is by using the cab file supplied with the control. This is very useful when you are developing software for company intranets or the web. When you develop for the Internet however you must consider whether to use the "active response" feature of the control because the ActiveX control send to the server is much smaller and easier to download. For more information on this issue see the topics under the "Building Internet and Intranet Applications" book in the User's Guide.

For example the following code will include the 3DPieChart in your html document. If the component is not found on your machine then IE will use the specified cab file to install the control.

<OBJECT
classid="clsid:130366B6-11B6-11D3-947E-000000000000"
codebase="c:\Program Files\Nevron\3DpieChart\Program Files\3DPieChart.cab"
height=200 width=200 id=PieChart1
</OBJECT>

The following table lists the corresponding CLSIDs for the different Nevron controls:

Control | CLSID
3DChart | B5CE1CD3-3AB9-11d3-9502-525400E61EDC
3DPieChart | 130366B6-11B6-11D3-947E-000000000000
3DLegend | D38E5991-71C5-11d3-954D-525400E61EDC
3DClock | 730EA36A-856A-11D3-BA35-525400E61EDC
3DText | AC983F78-0792-11D3-BA65-9F5D8B92F109

4.Use the Package & Deployment Wizard

A lot of VB programmers use this tool to distribute their programs. Deploying the monolith build with the Package & Deployment Wizard is very easy, because the component does not have dependend dlls and it does not need a .dep file. The Package & Deployment Wizard has to include in the installation only the monolith ocx file.

5. Notes when using the component from ASP

When you use the component from ASP you must make sure that the account used for anonymous user access has permissions to execute and read the control ocx. Otherwise ASP will generate an error because it does not have the necessary rights to instantiate the control.

Installation with the separate build

Distributing the Nevron components with this build is recommended only if you need to optimize the disk usage or if your program also uses MFC and needs to install the MFC dlls anyway. If you code in VB or other scripting language we strongly recommend you to use the monolith build. This will save you a lot of time and testing.

1. Write your own installation program

This is probably the most difficult way to install the Nevron ActiveX controls, but it provides you with greater flexibility because you are in control of the installation process. Lets start with the installation of the MFC library. It requires the following dll’s

DLL | Version | Destination | Register
Olepro32.dll | 5.0.4275 or later | Windows system | Yes
Msvcrt.dll | 6.00.8397.0 or later | Windows system | No
Mfc42.dll or Mfc42u.dll (ANSI or Unicode) | 6.00.8447.0 or later | Windows system | Yes

Installing the MFC is not as straightforward as you might expect. The complications arise from the huge number of programs that may be using it. This is why when you run your software installation program there might be other programs running that use MFC. This will lock the MFC dll’s and you’ll not be able to directly replace them with the new ones. To work around this problem you’ll have to use the function MoveFileEx on WinNT or Win2000 or schedule the file for moving in the [rename] section of the wininit.ini file if you are running on Win98 or Win95. Although this may seem as a dark cloud the good news is that it may not be in your sky, because the latest versions of IE redistributes the newest MFC dll’s. Also if you are using some installation utility like InstallShield, Wise etc. it will most likely take care of this automatically so you’ll not have to worry about it. You can also see the source code of the NControlInstaller.exe – it replaces locked dlls using the above mentioned approach.

After that the installation of the control is comparatively easy. You’ll have to include the following files in order to configure the NopenGL layer.

DLL | Version | Destination | Register
NUtils.dll | 7.0.0.0 | Program destination | No
NOpenGL.dll | 7.0.0.0 | Program destination | No
NWinCtl.dll | 7.0.0.0 | Program destination | Yes
NControl.ocx | 7.0.0.0 | Program destination | Yes

Where NControl may be any of the Nevron ActiveX controls – e.g. 3DChart, 3DPieChart, 3DLegend, 3DClock or 3DText.

2. Install the controls manually

This method is easy, but it is not recommended because it is error prone. In order to install the NControl.ocx (again NControl can be any of the ActiveX controls developed by Nevron) you must follow these steps:

  1. Copy Olepro32.dll, Msvcrt.dll, Mfc42.dll, NUtils.dll, NOpenGL.dll, NWinCtl.dll and NControl.ocx to the Windows system directory. These file can be found in the Program Files subdirectory.

  2. Register Olepro32.dll, Mfc42.dll, NWinCtl.dll and NControl.ocx by calling the regsvr32.exe utility. For example the following command line registers Olepro32.dll on WinNT machine:

    D:\winnt40\system32\regsvr32 olepro32.dll

The most usual problem related with this approach is that sometimes you’re unable to copy these files to the system directory. The reason for this is that they might be locked by other applications.

3. Use the NControlInstaller.exe utility

A very convenient way to install Nevron ActiveX components is to use the NControlInstaller.exe utility. When you run NControlInstaller.exe it will automatically perform the following steps.

  1. NControlInstaller attemps to copy the file to the windows system directory. If the files cannot be copied due to some reason – most likely this is because the target files (MFC dlls) are locked the installation routine registers a special key in the registry and copies itself in the start up folder so that during the next restart it will be automatically launched. If everything was Ok then the installation program goes to step number 4. Otherwise the installation proceeds with step number 2.

  2. NControlInstaller asks the user whether he wants to restart the machine.

  3. If Yes NControlInstaller automatically reboots. Otherwise the user will have to reboot manually before executing software that uses Nevron controls.

  4. NControlInstaller registers the dll’s and performs cleanup.

The following table lists the switches for the NControlInstaller.exe and their meaning.

Switch | Meaning
MFC | Install only the MFC dlls (mfc42.dll, msvcrt.dll, olepro32.dll). This option is always turned on by default.
WARNINGS | Display install warnings.
3DCHART | Install the 3Dchart control and the MFC dll’s.
3DPIECHART | Install the 3Dpiechart control and the MFC dll’s.
3DLEGEND | Install the 3Dlegend control and the MFC dll’s.
3DCLOCK | Install the 3Dclock control and the MFC dll’s.
3DTEXT | Install the 3Dtext control and the MFC dll’s.
ALL | Combines the 3DCHART, 3DPIECHART, 3DLEGEND, 3DCLOCK and 3DTEXT setting. ALL is the default switch assumed by NControlInstaller.
NOREBOOT | Disables rebooting. When this option is on instead of rebooting the NControlInstaller finishes with a return code of 1. This indicates that the machine must be restarted.

Note that the NControlInstaller is not case sensitive and the order of the switches is not important. For example the following command line on a WinNT machine installs 3DChart (provided that the necessary file are present in the temp directory):

C:\temp\ NControlInstaller 3DCHART NOREBOOT

And disables the reboot feature. If the system needs rebooting then NControlInstaller returns 1. You can use this return code in your installation for example to display a message informing the user that he must reboot the system to complete the installation.

Also if you are an intrepid C++ developer you can modify the code of the NControlInstaller in order to fit your personal needs. The source code for the NControlInstaller can be found in the Support\NControlInstaller subdirectory.

4.Use the Package & Deployment Wizard

Deploying the separate build of Nevron ActiveX controls with the Package & Deployment Wizard has one caveat. This utility correctly recognizes that the VB project is using a Nevron control and tracks down the DLL dependencies using the .dep file supplied with the control. The main problem however is that this program operates correctly only when all programs are closed. Even in this case the msvcrt.dll is not unlocked because it is used by core windows services. The replacement of this dll is possible only by scheduling the file for replacement during restart.

To work around the problem you may consider changing the deployment directory for the Nevron control and the other dependent dlls. Instead of using the $(WinSysPath) directory you can change the destination folder to $(AppPath). This ensures that there would not be any locked dlls and the Package & Deployment Wizard will be able to copy the files without any problems.

5. Notes when using the component from ASP and ASP .NET

When you use the component from ASP you must make sure that the account used for anonymous user access has permissions to execute and read the control ocx as well as all the depended dlls. Otherwise ASP will generate an error because it does not have the necessary permissions to instantiate the control. The same is also valid for ASP .NET web applications except that the used account is called ASPNET.

FAQ about ActiveX controls installation

Q. What does it mean to register a control and why do I have to do it?

A. In general this means that you’ll have to call the DllRegisterServer function that the ActiveX control exposes. You have to do it because otherwise COM cannot locate the files associated with this ActiveX control. The following C++ code snippet illustrates this:

typedef UINT (*lpDllRegisterServer)();

  • void RegisterDLL(LPTSTR lpFileName)

{

lpDllRegisterServer DllRegisterServer;

HINSTANCE hInstance = LoadLibrary(lpFileName);

if (hInstance == NULL)

{

char szMessage[MAX_PATH + 100];

strcpy(szMessage, "Failed to load:");

strcat(szMessage, lpFileName);

MessageBox(NULL, szMessage, INSTALLER_TITLE, MB_OK);

return;

}

// register the DLL

DllRegisterServer = (lpDllRegisterServer)GetProcAddress(hInstance, "DllRegisterServer");

// check whether GetProcAddress succeeded

if (DllRegisterServer)

(DllRegisterServer)();

}

Q. Can I register a control manually (e.g. without writing special code)?

A. Yes you can do that by using the regsvr32.exe located in the windows system directory. For example the following command line on a WinNT machine registers 3DChart.ocx

C:\winnt\system32\Regsvr32 3DChart.ocx

provided that system32 contains all the dependent dlls.

Q. How do I track dependent dlls?

A. You can do that by using the Depends.exe utility supplied with Visual Studio. It tracks the dll dependencies and marks the missing dlls in red.


Switching between Unicode and ANSI builds

All Nevron controls are shipped with two builds - monolith and separate. In the monolith build the control encompasses all the dependent dlls used by the control. In the separate build the control has dependent dlls (MFC libraries and NOpenGL libraries). The two builds also have to versions - ANSI and Unicode. The reason for the existence of these versions is that some users require Unicode because they need characters that are supported by it. These include Arabic, Chinese, Cyrilic, Greek, Hebrew, Japanese kana, Korean hangul and others. To switch between the different builds you can use two techniques:

1. Use the NControlConfig utility to register the build

The NControlConfig is a very simple utility located in the NControl\Program Files directory. It accepts three parameters passed from the command prompt. The following table lists them:

Parameter | Values
Control name | 3DChart, 3DPieChart, 3DLegend, 3DText, 3DClock
Version | Unicode or ANSI
Build | Monolith or Separate

For example to register the Monolith Unicode version of 3DChart you have to type the following line from the command prompt:

d:\program files\Nevron\3DChart\Program Files\NControlConfig 3DChart Unicode Monolith

Please note that we assume that the control was installed in the d:\program files\Nevron\3DChart directory. The NControlConfig is not case sensitive but the order of the parameters is important.

2. Manually register the required build

Of course you can always register the control manually by using the regsvr32 utility which is shipped with Windows. Have in mind that 'M' in the control name indicates that the control is monolith and 'u' at the end means that this is the Unicode version. Lets illustrate the above with a few examples:

d:\program files\Nevron\3DChart\Program Files\regsvr 3DChartu.ocx
d:\winnt\system32\regsvr 3DChartMu.ocx


Installing the OpenGL library

This topic directs you how to download the OpenGL library and install it on your machine. Please note that you only need to do this if you are running on an early Win95 OS. Later versions of Windows ship OpenGL as a standard component and on these operating systems you do not to install it. These include Win98, WinNT 3.5 and later, Win2000, WinXP.

To get OpenGL95.exe which is a self extracting executable containing the dynamic link libraries for OpenGL and GLU directly from Microsoft you need to do the following:

  1. Go to the ftp site of Microsoft - ftp.microsoft.com

  2. Change to the \softlib\mslfiles directory

  3. Download OpenGL95.exe

If you want to include a setup of OpenGL library in your installation you have two options:

  1. Install the OpenGL libraries in the destination directory of your application. This ensures that you use the proper version of OpenGL.

  2. Install the OpenGL libraries in the Windows system directory and check whether the directory contains more recent libraries. In this case you should not replace them.

  3. Run OpenGL95.exe self-extracting executable. You should do this only if you are running on a Win95 machine.

We strongly recommend that you use the third approach. The first and the second ones are recommended only if you demand strict control over the version of OpenGL or the installation process.

Currently Nevron controls require OpenGL 1.1 properly installed on the target machine.


Licensing issues

Note that the retail version of all Nevron components is licensed. This means that you must have the appropriate .lic file in order to use the controls. The .lic file must also reside in the directory where the component is installed. By the terms of the license agreement you're bound not to redistribute this .lic file to third parties. Most containers (such as VB) will automatically store the license key in their form so you do not need to worry about redistributing a compiled version of your applications. For other containers that do not support this you must use the IClassFactory2 methods to instantiate the component. Check the documentation supplied with these containers on how you can build and redistribute licensed controls. The license key is the first line of the .lic file.


OpenGL lighting model

OpenGL approximates light and lighting as if light can be broken into red, green and blue components. Thus, the color of light sources is characterized by the amount of red, green and blue light they emit, and the material of surfaces is characterized by the percentage of the incoming red, green and blue components that is reflected in various directions.

In the OpenGL lighting model the light in a scene comes from several light sources. Some light comes from a particular position and some light is generally scattered around the scene. For example when you turn on a light bulb in a room, most of the light comes from the bulb, but some light comes after bouncing off one, two, three or more walls. This bounced light is called ambient light that seems to come from no particular direction, but it disappears if the light source is turned off. You can modify this light by setting the AmbientColor property of the NLightSource object. There might be a general ambient light in the scene that comes from no particular source as if it had been scattered so many times that its original source is impossible to determine. You can control this global ambient light by modifying the GlobalAmbientLight property of the NLightModel object.

In the OpenGL lighting model the light sources have an effect only when there are surfaces that absorb and reflect light. Each surface is assumed to be composed of a material with various properties. A material might emit its own light, scatter some light, or reflect light in a desired direction like a mirror.

So in general OpenGL divides the lighting in four independent components: emissive, ambient, diffuse and specular. All four of them are computed independently and then added together.

Ambient light as already mentioned is the light scattered so many times that its original light source is impossible to determine.

Diffuse light comes from a particular direction so it is brighter if it comes squarely down on a surface than if it barely glances off the surface, but once it hits the surface however it is scattered equally in all directions. You can modify the diffuse component of a particular light by modifying the DiffuseColor of the NLightSource object.

Specular light comes from a particular direction and bounces off a surface in a preferred direction. You can modify the specular component of a particular light by modifying the SpecularColor of the NLightSource object.

On the other hand materials are characterized by the percentages of light they reflect from the different light components. You can modify these percentages by changing the values of the AmbientColor, DiffuseColor and SpecularColor of the NMaterial object. In addition to this materials can also emit light. You can modify the emissive light of a material by changing the value of the EmmisiveColor property of the NMaterial object. By default this value is RGB(0, 0, 0) which means that the object does not emit any light.

In addition to this you can also modify the attenuation factors for every light source. In the real world the intensity of the light decreases as distance from the light increases. You can control this process by modifying the ConstantAttenuation, LinearAttenuation and QuadraticAttenuation properties of the NLightSource object. OpenGL attenuates a light source by multiplying the contribution of that light source by an attenuation factor using the formula:

Attenuation factor = 1 / (KC + KL * D + KQ * D * D)

Where KC is the ConstantAttenuation, KL is the LinearAttenuation and KQ is the QuadraticAttenuation and D is the distance from the light source to the object.


Working with Lights

Lighting is one of the most impressive features delivered by Nevron components. Configuring lighting however is not a trivial task because it requires an in depth understanding of lighting. This is why Nevron has created a set of predefined light schemes that help you configure lightning with ease. This takes only one function call and is very convenient especially when you're short on time and would like to deliver your project faster. For example the following VB code:

ControlName.LightModel.SetLightScheme lsStandardWhite

will enable the lighting and create one light source at (15, -10, 30) with white diffuse and specular colors. The global ambient light is set to gray. To achieve the same effect without using the predefined schemes you have to write the following code:

Dim lightsource As NLightSource
NChart1.LightModel.EnableLighting = True
NChart1.LightModel.GlobalAmbientLight = RGB(125, 125, 125)
Set lightsource = NChart1.LightModel.LightSourceCollection.Add("Light0")
lightsource.PositionX = 15
lightsource.PositionY = -10
lightsource.PositionZ = 30
lightsource.SpecularColor = vbWhite
lightsource.DiffuseColor = vbWhite

e.g. you save 8 lines of code. The other predefined light scheme constants are: lsStandardWhite, lsStandardRed, lsStandardGreen, lsStandardBlue, lsSpotWhite, lsSpotRed, lsSpotGreen, lsSpotBlue and lsArena.

To work with lights manually you must first understand how lighting works so it is a good idea to read the "OpenGL lighting model" topic first before you start working with the properties of the NLightSource, NLightModel, NMaterial and NLightSourceCollection objects.

Following is a step by step description on how to configure lighting.

  1. First of all you should tell the component that you want to render the scene with lightning. There are two ways to do that - the first one is through automation and the second one is through the Lights Property Page of the control.

    From the Lights Property Page you must check the Enable Lighting check box.

    With Automation you should write something like this in VB :

    ControlName.LightModel.EnableLighting = True

    This ensures that lightning is enabled.

  2. Now the control knows that you want to use lightning, but it still does not know anything about the lights that you want to apply to the scene. To add a light source you should do the following:

    From the Lights property page press the Add button. In the top left corner of the page the preview window must be black. This is because the light is not emitting light yet and it’s coordinates are (0, 0, 0). Select some color for the specular and diffuse components of the light (you do this by selecting a color from the Diffuse and Specular combo boxes of the emission tab) . Let’s say that you selected white for the diffuse emission and yellow for the specular emission of the light. But the Preview window is still black - this is because the light is inside the sphere of the preview. Set the position of the light source to Z = 2.0 by using the spin controls. When you position the light to (1,10, 2) you should see a spot of light on the sphere. Now you configured one light source.

    If you want to programmatically create the same light source you should write the following code:

    Dim LightSource As
 NLightSource
NChart1.LightModel.EnableLighting = True
Set LightSource = NChart1.LightModel.LightSourceCollection.Add("Light1")
LightSource.DiffuseColor = vbWhite
LightSource.SpecularColor = vbYellow
LightSource.PositionZ = 2
LightSource.PositionX = 1
LightSource.PositionY = 1

    Sometimes the scene rendered with lightning looks dark. In cases like this you can consider adding global ambient light.

    From the Lights property page you can add some global ambient color from the Global ambient light combo.

    With Automation you’ll achieve the same effect by writing the following code :

    ControlName.LightModel.GlobalAmbientLight = RGB(100, 100, 100)

    This line of code will set the global ambient light to dark gray.

  3. At this point you have configured a light which is emitting light in all directions. To direct the light you must follow these steps:
    From the Advanced tag of the light properties uncheck the uniform light distribution check and specify the light cutoff angle. For the purpose of this example you can set the cutoff angle to 24 degrees. Then switch to the general tag and give the light source a direction (0, 0, -2). You can switch again to the Advanced tag and play again with the spot cutoff angle. As you can see on the preview when the angle is bigger the light spot on the light preview sphere is bigger. Following is an example how to accomplish the above with VB code:

Dim LightSource As NLightSource
NChart1.LightModel.EnableLighting = True
Set LightSource = NChart1.LightModel.LightSourceCollection.Add("Light1")
LightSource.DiffuseColor = vbWhite
LightSource.SpecularColor = vbYellow
LightSource.PositionZ = 2
LightSource.PositionX = 1
LightSource.PositionY = 1
LightSource.DirectionZ = -2
LightSource.SpotCutoff = 24

4. Finally you must know that lighting can be synchronized with the grayscaling capabilities of the control. This is achieved with the help of the GrayScaleType property of the NLightSource and NLightModel objects. The default value of these properties is gsSynchronizeWithControl. This means that the object will synchronize with the default control settings for grayscaling. When you decide that you want to apply different grayscaling you can turn this property to gsGrayScale or gsColor. For example the following code instructs the control to render the light always in color:

LightSource.GrayScaleType = gsColor


Overview

It is indeed very nice to have a presentation quality chart or text displayed by your VB or web application, but often this is not enough to build a really useful program. What you may need sometimes is information passed from the component to the program that drives it.

The nature of this information can vary from a simple tooltip to an automation event but the common in all this actions is that the component is initiating them and the program simply decides whether to respond in some way or just to skip it.

We call these features interactivity features because they establish a backward connection that closes the circle of interaction - the program drives the component to display some data and then the component notifies the program about some of the actions that the user performed on it.


Events

Probably you have already asked yourself "Can I understand if the user clicked with the mouse over a certain object in the 3D space?". The answer is of course "Yes".

Every group of objects in the 3D space have an associated event that distinguishes it from the other objects. For example the data items in the integrated legend of 3DChart generate the LegendDataMouseEvent event. Lets look in more detail at this particular event to understand the general event organization in Nevron components. The event has the following declaration:

LegendDataMouseEvent(LegendIndex As Long, Row As Long, Col As Long, Object MouseState)

The name of the event describes the group of objects that it relates to. In our case this is "LegendData". If this group contains more then one object then the parameters of the event uniquely identify the object in the group. In the case of the LegendDataMouseEvent the LegendIndex parameter identifies the legend (this number is the same as the index of the legend in the NLegendCollection) the Row and Col parameters specify the position of the legend data item in the legend.

The last parameter - MouseState is an automation object that describes the mouse and keyboard state when the event is generated. We will examine this object in greater detail at the end of this topic. For now let's concentrate on the easier tasks.

Turning on event firing

To turn on the event firing you must tell the control that you wish to intercept automation events. You do this by setting the mmEvent flag to the MouseMove, LMouseButtonClick, RMouseButtonClick, LMouseButtonDoubleClick or RMouseButtonDoubleClick properties of the NEventManager object. Which property to set is determined by you according to the mouse message you wish to intercept. The following example enables event firing when the user right clicks with the mouse.

NChart1.EventManager.RMouseButtonClick = mmEvent

After executing this line of code your control will begin to fire events in response to right mouse click actions.

Intercepting events

Now comes the interesting part - the intercepting of events generated by the control. Event handlers are in fact normal procedures that are called from the control in response to user actions. The following code shows how you can intercept the background mouse event.

Private Sub Form_Load()
NChart1.EventManager.RMouseButtonClick = mmEvent
End Sub

Private Sub NChart1_BackgroundMouseEvent(ByVal MouseState As Object)
MsgBox "You right clicked on the chart background"
End Sub

Suppose however that the Form_Load procedure looked like this:

Private Sub Form_Load()
NChart1.EventManager.RMouseButtonClick = mmEvent
NChart1.EventManager.LMouseButtonClick = mmEvent
End Sub

Now the control will generate the background event when the user right clicked and left clicked on the background. This makes the text "You right clicked on the chart background" incorrect. If you want to detect the mouse action that generated the event you may use the MouseAction member of the NMouseState object.

Private Sub NChart1_BackgroundMouseEvent(ByVal MouseState As Object)
If MouseState.MouseAction = maRMouseButtonClick Then
MsgBox "You right clicked on the chart background"
End If
End Sub

As you can see the check for the mouse action makes our message box correct again. For more information on the NMouseState object refer to the Object Reference.

Some other user actions also generate events - these are Drag and Drop operations and Keyboard keys when they are pressed by the user. Handling these events is described in detail in the "Drag and Drop" and "Keyboard" topics in this book.

Related examples. The example in the NControl\VB\Interactivity\Selection directory show how to enable and intercept automation events.


Mouse

Besides generating events when the user clicks or moves the mouse the control can also change the 3D view projection parameters in response to mouse actions. This feature is called dragging. Currently there are three special mouse dragging modes supported by all Nevron components.

1. Trackball

In this mode you can adjust the polar coordinates of the viewpoint. The trackball represents the 3D scene as a sphere which you are rotating. To activate the track press the left mouse button when the mouse is over the control and then drag the mouse. The following line in VB activates the trackball:

NChart1.EventManager.MouseDragMode = mdTrackBall

2. Zoom

In this mode you can modify the zoom factor applied to the scene. The zoom factor ranges from 1 to 1000. 100 is the default value. Press the left mouse button and then drag the mouse over the control. Moving the mouse towards the top of the control will zoom in whereas moving the mouse to the control bottom will zoom out.

NChart1.EventManager.MouseDragMode = mdZoom

3. Offset

In this mode you can modify the offset of the 3D scene from the control center. Press the left mouse button and then drag the mouse over the control. The 3D scene will move in the direction of the mouse.

NChart1.EventManager.MouseDragMode = mdOffset

To disable dragging you must assign mdDisabled to the MouseDragMode property:

NChart1.EventManager.MouseDragMode = mdDisabled

In addition you can turn off polygon and texts rendering when the scene is being dragged. This can be very helpful if the scene is very complex and dragging is sluggish. To disable polygon rendering you must turn off the DragDrawFilled property of the NEventManager object. The following code disables text and polygon rendering while dragging:

NControl.EventManager.DragDrawFilled = False
NControl.EventManager.DragDrawTexts = False

The following pictures show how your chart will look like when rendered in wireframe:

Normal chart

The same chart rendered in wireframe mode

Related examples. The example in the NControl\VB\3DView directory shows how to enable mouse dragging.


Tooltips

Tooltips can be very useful when you want to display some image relevant information. This information can vary from a simple text like a company name to a more complex explanation. By default the control will set predefined tooltips to all object in the scene. You can of course modify these tooltips and instruct the control to display tooltips on particular objects only. This topic is dedicated to teach you how you can exploit these features in your applications.

The first thing you need to know about tooltips is of course how you can enable them. This is done by setting the mmTooltip flag of the MouseMove property:

NChart1.EventManager.MouseMove = mmTooltip

Now when you move your mouse over the different 3D objects you'll see that the tooltips will change. You may want to change the default tooltip value with some other one that describes the object better. This is done with the help of the NMouseResponse object attached to it. The following code snippet changes the tooltip for the background:

NChart1.Background.MouseResponse.SetTooltip "This control is COOL!"

Now suppose that you're building a program that compares how two products perform on the market by showing a simple pie chart that visually displays the share of each product on the market. In addition you would like to show tooltips only on the pie slices and would like to disable all other tooltips. One way to accomplish this is to use the SetTooltip function of the NMouseResponse object and assign blank tooltips to all objects in the scene - background, legend items, labels etc. This can be very annoying and error prone. This is why we have added the DisplayTooltips property of the NEventManager object. This property works together with the ShowTooltips of the NMouseResponse object. The following table summarizes the collaboration between these two properties:

DisplayTooltips | ShowTooltips | Result (show tooltip for the particular object)
True | stSynchronizeWithControl | Yes
True | stDoNotShowTooltips | No
True | stShowTooltips | Yes
False | stSynchronizeWithControl | No
False | stDoNotShowTooltips | No
False | stShowTooltips | Yes

The table also gives us the answer to the problem with hiding the tooltips for all the objects in the scene except the pie slices. The solution is to set the DisplayTooltips property to False. Since the default value for all ShowTooltips property is stSynchronizeWithControl. This will hide all tooltips in scene. Afterwards the only thing you have to do is to override the ShowTooltips setting for the pie slices by assigning stShowTooltips to it.

Related examples. The example in the NControl\VB\Interactivity\Tooltips directory shows how to work with tooltips.


Context Menus

The control can display context sensitive menus when the user clicks or double clicks on a particular object. The following code:

NChart1.EventManager.RMouseButtonClick = mmContextMenu

enables context menus when the user right clicks on a 3D object in the scene. The following picture shows context menus in action:

Related examples. The example in the NControl\VB\Interactivity\Selection directory shows how to enable context menus.


Drag and Drop

All Nevron controls have extensive Drag and Drop support. This feature is very useful because it is intuitive to the user. Using the Drag and Drop features requires a basic understanding of this OLE technology and the key terminology, so this is why we will describe it in a few words in this topic.

Data source object - the data source object represents the data being transferred. This is an automation object that supports the IDataSource interface. With the help of this interface you can check the format and the media where the data resides. Nevron controls can create a data source with native state format or bitmap format.

Drop target - the drop target is a potential receiver of the data.

Data source - the data publisher. In our case this is the control.

Now lets suppose that you have a VB form with two charts and would like to be able to transfer data between the two by using the Drag and Drop features of the controls. The first chart is called NChart1 and the second one NChart2. Furthermore you would like to transfer data from the first to the second one.

To enable the first control to act as a data source you must turn on the mmBeginDrag flag of the LMouseButtonClick method:

NChart1.EventManager.LMouseButtonClick = mmBeginDrag
NChart1.EventManager.DragDataType = dtNative

The second line of code deserves special interest. It tells the control that the drag and drop operation will copy native control state. The other option for this property is dtBitmap which means that the control will copy a simple Windows Bitmap. In this case drag and drop is very similar to a simple clipboard operation where you copy a bitmap to the clipboard and then paste it.

Now the control will initiate a drag and drop operation when the user presses and holds the left mouse button over the control window. In order however for drop to occur on the second chart you must instruct it to accept native control state data sources by setting the AcceptDropInNativeFormat property to True :

NChart2.EventManager.AcceptDropInNativeFormat = True

now if you launch your form you'll be able to drag and drop the control state of the first chart over the second one. Note however that the second chart will not resize as it would normally do if you were performing a simple load state operation. This is because by default when the control is accepting a dropped data source it discards the control dimension information. In many cases this may not be the desired behavior. To avoid this you can turn on the DropResizesControl property:

NChart2.EventManager.DropResizesControl = True

At this point you've learned how you can enable drag and drop. In order for two controls to work in cooperation you need to write only four lines:

NChart1.EventManager.LMouseButtonClick = mmBeginDrag
NChart1.EventManager.DragDataType = dtNative
NChart2.EventManager.AcceptDropInNativeFormat = True
NChart2.EventManager.DropResizesControl = True

The second part of this topic will teach you how to exploit a more advanced Drag and Drop feature - the events fired when the control accepts a data source and when a data source is being dragged over the control. You enable event firing for these two particular events by setting the FireDragAndDropEvents property to TRUE:

NChart2.EventManager.FireDragAndDropEvents = True

Now the control will fire the OnDrop and ODragOver events. The ODragOver event has the following declaration:

Private Sub NChart2_OnDragOver(ByVal HWND As Long, ByVal pDataObject As N3DCHARTLib.IDataObject, ByVal dwKeyState As Long, ByVal nX As Long, ByVal nY As Long, pRes As N3DCHARTLib.DropEffect)

the first parameter of the event is the control window. The second one is a pointer to the IDataObject that holds the data being transferred. The dwKeyState parameter contains information relevant to the modifier keys - these are the Alt, Ctrl and Shift. For more information on how to work with value check out the "Keyboard" topic in this book. Following are the coordinates of the drag and drop operation in the control window (nX, nY). The last parameter is actually a return value. It instructs the control how it must behave should a drop occurs. The returned value also determines the type of the mouse cursor - for example:

Private Sub NChart2_OnDragOver(ByVal HWND As Long, ByVal pDataObject As N3DCHARTLib.IDataObject, ByVal dwKeyState As Long, ByVal nX As Long, ByVal nY As Long, pRes As N3DCHARTLib.DropEffect)
pRes = deCopy
End Sub

will produce an arrow with a small plus sign at the bottom. The OnDrop has the following declaration:

Private Sub NChart2_OnDrop(ByVal HWND As Long, ByVal pDataObject As N3DCHARTLib.IDataObject, ByVal nDropEffect As Long, ByVal nX As Long, ByVal nY As Long, pbRet As Boolean)

and has parameters similar to the ODragOver event. If you would like to reject the drop operation you must return False in the pbRet output parameter:

Private Sub NChart2_OnDrop(ByVal HWND As Long, ByVal pDataObject As N3DCHARTLib.IDataObject, ByVal nDropEffect As Long, ByVal nX As Long, ByVal nY As Long, pbRet As Boolean)
pbRet = True
End Sub

Related examples. The examples in the NevronControl\VB\ImportExport\DragAndDrop directory for the different Nevron components show how you can use the Drag and Drop features in practice.


Selection

In programming selection can have many different meanings. In this topic under selection we will understand the ability of 3DChart and the other components to highlight the current object that the mouse is currently over.

Enabling the selection feature is very easy - all you have to do is to turn on the mmSelection flag of the LMouseButtonClick, RMouseButtonClick, MouseMove, LMouseButtonDoubleClick or RMouseButtonDoubleClick properties of the NEventManager object:

NChart1.EventManager.MouseMove = mmSelection

Now when the mouse passes over a chart element it will change its border properties to a red solid line. You can of course modify the selection border by touching the SelectionBorder object of the NEventManager. The following code snippet changes the selection border to Blue:

NChart1.EventManager.SelectionBorder.Color = vbBlue

Related examples. The example in the NControl\VB\Interactivity\Selection directory shows how to enable selection.


Mouse cursor

The mouse cursor can provide very essential information about the underlying object. For example imagine that you're building a small VB or Web application showing a simple bar chart about two products called "Apple juice" and "Orange juice". You would like to supply additional information to the user when he clicks on the bar showing the sales for "Apple juice" by redirecting (or opening in the case of VB) the browser to http://www.fruitcompany.com/AppleJuiceInfo.htm or http://www.fruitcompany.com/OrangeJuiceInfo.htm for the "Orange juice" product respectively. Further you would like the mouse cursor to change to "Link select" when the user moves the mouse cursor over the bars. In this way he (or she) will be visually prompted that something will happen if he (or she) clicks on the bar. The following code snippet shows how you can accomplish this:

Dim Bar As NBarPresentGroup
NChart1.Categories.Add "Apple juice", True
NChart1.Categories.Add "Orange juice", True
NChart1.Series.Add "Product sales", True
Set Bar = NChart1.PresentGroups.Add(pgtBar)

NChart1.DataAt(0, 0, 0).Value1 = 120 ' sales for Apple juice
NChart1.DataAt(0, 0, 0).MouseResponse.URL = "http://www.fruitcompany.com/AppleJuiceInfo.htm"
NChart1.DataAt(0, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(0, 0, 0).MouseResponse.SetTooltip "Click here to learn more about the Apple juice product"
NChart1.DataAt(0, 0, 0).MouseResponse.MousePointer = mpLinkSelect

NChart1.DataAt(1, 0, 0).Value1 = 150 ' sales for Orange juice (people seem to like it :)
NChart1.DataAt(1, 0, 0).MouseResponse.URL = "http://www.fruitcompany.com/OrangeJuiceInfo.htm"
NChart1.DataAt(1, 0, 0).MouseResponse.ChangeMouseCursor = True
NChart1.DataAt(1, 0, 0).MouseResponse.SetTooltip "Click here to learn more about the Orange juice product"
NChart1.DataAt(1, 0, 0).MouseResponse.MousePointer = mpLinkSelect

NChart1.EventManager.MouseMove = mmChangeMouseCursor + mmTooltip
NChart1.EventManager.LMouseButtonClick = mmRedirectBrowser

Related examples. The example in the NControl\VB\Interactivity\MousePointer directory shows how to change the default mouse cursor.


Browser redirection

All Nevron controls can direct the current browser (or open a new one) to some URL location. This can be achieved both when the control is used in a VB application or when the control is residing on the server. In the second case the response type must be Image map, Active content (ActiveX) or Full control. To learn how to use this feature in the different environments check out the following topics:

For VB and other client applications a good start is the "Mouse cursor" topic in this book. You can also take a look at the NEventManager and NMouseResponse objects description in the Object reference.

For ASP and server applications we suggest you to read thoroughly the "Building Internet and Intranet applications" book in this tutorial. The NEventManager and NMouseResponse objects description in the Object reference can also be very handy when a certain method or property purpose is not quite clear.


Keyboard

The control can fire automation events when the user presses some of the keyboard keys. The keyboard event contains information about the key code and the state of the modifier keys (Alt, Ctrl and Shift). In addition you can use the keyboard arrow keys in conjunction with the mouse drag mode to modify some projection properties like the polar coordinates of the viewer, the zoom ratio and the offsets along the X and Y dimensions. The rest of this topic will teach you how to work with these features.

1. Keyboard dragging

To enable keyboard dragging you must set the EnableKeyboardDragging property of the NEventManager object to True. The following code shows how to accomplish this:

NControl.EventManager.MouseDragMode = mdTrackball
NControl.EventManager.EnableKeyboardDragging = True

Now when you press some of the arrow keys the scene will rotate in the respective dimension. By changing the mouse drag mode you also change the meaning of the arrow keys - for example in mdOffset mode the arrow keys will move the scene instead of rotating it. The keyboard dragging feature is enabled by default.

2. Keyboard automation events

To turn on keyboard event firing you must set the FireKeyboardEvent property of the NEventManager object to True. This will trigger the generation of the KeyboardEvent each time the user presses a keyboard button. This event has the following declaration:

Private Sub NControl_KeyboardEvent(ByVal nChar As Long, ByVal nRepCnt As Long, ByVal nFlags As Long, ByVal nKeyState As Long)

The parameters passed by the event have the following meaning:

nChar - specifies the virtual-key code of when a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed.

nRepCount - specifies the repeat count, that is, the number of times the keystroke is repeated as a result of the user holding down the key.

nFlags - specifies the scan code, key-transition code, previous key state, and context code, as shown in the following table:

Value | Description
0–7 | Scan code (OEM-dependent value).
8 | Extended key, such as a function key or a key on the numeric keypad (1 if it is an extended key).
9–10 | Not used.
11–12 | Used internally by Windows
13 | Context code (1 if the ALT key is held down while the key is pressed; otherwise, it is 0).
14 | Previous key state (1 if the key is down before the call, 0 if the key is up).
15 | Transition state (1 if the key is being released, 0 if the key is being pressed).

nKeyState - specifies the state of the modifier keys. That is whether the Alt, Shift or Ctrl key was pressed when the event was generated. The following table shows the meaning of the constants that you can use to detect whether a modifier key has been pressed.

Constant | Description
ksLeftAlt | Indicates that the left Alt key was pressed.
ksRightAlt | Indicates that the right Alt key was pressed.
ksLeftShift | Indicates that the left Shift key was pressed.
ksRightShift | Indicates that the right Shift key was pressed.
ksLeftControl | Indicates that the left Control key was pressed.
ksRightControl | Indicates that the right Control key was pressed.
ksAlt | Indicates that one of the Alt keys was pressed.
ksShift | Indicates that one of the Shift keys was pressed.
ksControl | Indicates that one of the Controls keys was pressed.

To check whether a certain modifier key was pressed you must compare the value of the nKeyState parameter against the desired key constant. The following code checks whether the control key was pressed:

If nKeyState And ksControl Then
' one of the control keys was pressed
Else
' none of the control keys was pressed
End If

The values are not exclusive e.g. if you press the Left Control and the Right Alt key the checks against the ksLeftControl, ksRightAlt, ksAlt and ksControl constants will be true.

Note: In C++ you must use the & operator to perform the check.

Related examples. The example in the NControl\VB\Interactivity\Keyboard directory shows how to enable and work with the keyboard related features of the component.


Overview

Probably the major Nevron common objects is the NFillEffect. It defines the filling of all objects in the scene and this is why it is crucial to understand how you can use it. The NFillEffect object allows you to apply solid color, gradient, texture, animation, pattern or advanced gradient filling to the object it is attached to. It is also responsible for controlling some special visual effects features such as antialiasing, grayscaling, transparency and fill effect merging. The following topics will describe each of the features of this powerful object in detail, so take a few well invested minutes to fully understand the NFillEffect functionality, because they will certainly pay off.


Solid color

Solid colors are the most simple type of fill effect. Changing the color of a object with an assigned NFillEffect is done with only one function call:

NFillEffect.SetSolidColor vbWhite

The SetSolidColor function actually performs three steps – first it changes the color property of the NFillEffect to white, then it disables the build-in synchronization with the Windows color settings and finally changes the type of the fill effect to color. As you can guess you can perform all these steps manually:

NFillEffect.Type = fetSolidColor
NFillEffect.Color = vbWhite
NFillEffect.EnableWindowsColor = False

This approach however is obviously more cumbersome and error prone. It also has a performance impact because the systems needs to call three methods instead of only one.

At this point your are probably wondering what is the purpose of the EnableWindowsColor property? To answer this question lets imagine that you have to build a chart generation program, which works on different machines in your office and must be integrated with the Windows appearance settings of each machine. On one of these machines the window background color may be white and on another one gray. To synchronize your chart you can use the GetSysColor API function to obtain the window background color and then manually set it with the NFillEffect object by using SetSolidColor. To be 100% compliant with Windows however you must also intercept the windows message informing you that the color changes when the user decides to change this color while your program is running. Fortunately there is a way to instruct the NFillEffect to automatically synchronize with the Windows color settings and this is where the EnableWindowColor property comes handy. To synchronize the NFillEffect with the Windows appearance settings you can use the following code snippet:

NFillEffect.Type = fetSolidColor
NFillEffect.EnableWindowsColor = True
NFillEffect.WindowsColor = wcWindow

There is also a shortcut function, which will perform the above steps with only one function call:

FillEffect.SetWindowsColor wcWindow

Related examples. The example in the NControl\VB\FillEffects\General directory shows how to change the fill effect color.


Gradient

The NFillEffect supports a filling called gradient which may be very familiar to you if you have worked with the Mircosoft Chart embedded in Excel. The simple gradients of the NFillEffect provide all the functionality you’ll need if you want to apply gradients based on two colors. If you want to apply more complex gradients please refer to the Advanced gradients topic in this book for more information. The simple gradients are divided into six groups each of them having four sub variants (excluding the From Center type which has only two variants). The group defines the direction of the gradient (horizontal, vertical, diagonal etc.) and the variant defines how the gradient is merging the start and the end color. The programming pattern you’ll need to follow in order to apply a gradient is similar to the one we already discussed in the "Solid colors" topic. For example to apply a white to black horizontal gradient you must write the following code:

NFillEffect.SetGradient gsHorizontal, gvVariant1, vbWhite, vbBlack

You can also manually modify the NFillEffect properties in order to achieve the same result:

NFillEffect.Type = fetGradient
NFillEffect.GradientStyle = gsHorizontal
NFillEffect.GradientVariant = gvVariant1
NFillEffect.GradientColor1 = vbWhite
NFillEffect.GradientColor2 = vbBlack

This approach is not recommended because it results in a more bulky code. Internally gradients follow the same mapping rules as textures and this is why you can also apply advanced texture transformations on them such as scaling and rotation. To learn more about these exciting features check out the "Texture mapping control" topic in this book. The following table shows the different gradient styles and variants:

Style | Variant1 | Variant2 | Variant3 | Variant4
Horizontal |  |  |  |
Vertical |  |  |  |
Diagonal up |  |  |  |
Dialognal down |  |  |  |
From corner |  |  |  |
From center |  |  |  |

Related examples. The example in the NControl\VB\FillEffects\General directory shows how to apply gradients on different objects in the scene.


Image (Texture)

Image and the Image gallery

There are cases when you want to map images that originate from other programs such as Photoshop or Paintbrush on your objects. For example suppose that you’re building a sales report website which tracks the sales of four different companies. Instead of showing color bars for each company you can decide to use the texture mapping features of the NFillEffect and assign an image representing the company logo to each bar. In addition these logos may reside in different image formats (such as PNG or Bitmap). All this can be easily accomplished with the help of the SetImage function:

NFillEffect.SetImage "d:\winnt\Zapotec.bmp"

The control will automatically detect the type of the image and import the texture from it. Currently all Nevron controls detect the following image formats: BMP, TIFF, TGA, WMF (Windows metafile), GIF, PNG and JPEG. This releases you from the burden to convert every image you want to use as a texture to some fixed format because most likely the format is accepted by the SetImage function. Please note that the control determines the format by checking the file extension so image import will fail if you pass an image file with an extension different from the file image format.

To set the properties modified by the SetImage function manually you must use the following VB code:

NFillEffect.Type = fetImage
NFillEffect.ImageFileName = "d:\winnt\Zapotec.bmp"

Now after we covered this strategy for applying textures lets take a look at a more advanced technique which uses the build-in image gallery of the control. The idea behind the image gallery is very simple - instead of using file names for the textures you can use custom defined aliases to refer to these textures. This technique has the following advantages:

1. If the file name of the texture is very long and you have to assign the same texture to many different elements of the scene you’ll be forced to type the long name over and over for every scene element. This can be very tedious and error prone. Instead you can add the image to the image gallery and refer to it by a custom alias such as "Texture1" for example.

2. If the image file name changes for some reason you’re forced to go through the code and update the image file location. If you use the image gallery all you have to do is to modify the association of the alias with the image file. This is much faster especially if you developed a big application and helps you to write more independent code.

To utilize the power of the image gallery you must learn how the NGalleryCollection object works. In a nut shell the NGalleryCollection represents a collection of associations. Each association maps an alias to a file name. All alias names are unique. The NGalleryCollection object is also persistent and serializes in the registry which means that all Nevron components share the same image gallery. You must be very careful when working with the image gallery because if you ruin it this may impact other programs that use Nevron components on the same machine.

To add a new association to the gallery you must use the following line of code:

NFillEffect.ImageGallery.Add "d:\winnt\zapotec.bmp", "BackgroundImage"

This will associate the zapotec.bmp image file with the alias "BackgroundImage". You can now safely use the SetImageByAlias function to apply the zapotec.bmp file

NFillEffect.SetImageByAlias "BackgroundImage"

You can also clear the image collection by using the Clear method:

NFillEffect.ImageGallery.Clear

To delete an alias use the DeleteByAlias function of the NGalleryCollection – for example:

NFillEffect.ImageGallery.DeleteByAlias "BackgroundImage"

This function call will disable the "BackgroundImage" alias and all subsequent calls to the SetImageByAlias function with an argument of "BackgroundImage" will fail. For a full description of the methods of the NGalleryCollection object refer to the Object reference.

To end our discussion on textures we must also mention that after you apply the texture you can also modify the way it is mapped on the object. For a detailed description please read the "Texture mapping control" topic in this book.

Related examples. The example in the 3DChart\VB\FillEffects\ImageGallery directory shows how to use the image gallery in practice.


Animation and the Animation gallery

The ability to apply animations as textures (.avi) to the different objects in the scene is one of the unique features delivered by Nevron components. The programming pattern you’ll follow to apply animations is essentially the same as the one used in applying simple textures. The shortcut function SetAnimation of the NFillEffect object is very easy to use:

NFillEffect.SetAnimation "D:\winnt\clock.avi", 50

The second parameter defines the desired speed for showing this animation and is given in miliseconds. Please note that the control may not render the animation with this speed if you have a complex scene or if your computer is not powerful enough. Using complex animations in conjunction with sophisticated scenes may also seriously impact the ability of your system to process user input because the processor will be engaged in rendering, so use this feature with caution. As with images there is an animation gallery object which is accessible from the fill effect:

NFillEffect.AnimationGallery.Add "d:\winnt\clock.avi", "BackgroundAnimation

The animation gallery works in exactly the same way as the image gallery so this is why it does not require special attention. In fact both galleries use the same automation object called NGalleryCollection. For a complete list of the properties and methods of this automation object please take a look at the Object reference of the control.

Related examples. The example in the 3DChart\VB\FillEffects\ImageGallery directory shows how to use the animation gallery in practice.


Pattern

Patterns are in fact predefined textures which are generated by the control when the user requests them. Nevron controls support 48 types of Excel like patterns. Applying patterns on the NFillEffect is very easy and requires the same steps as applying gradients for example. The shortcut function which will change the NFillEffect type, pattern style and pattern colors is SetPattern:

NFillEffect.SetPattern ptDarkHorizontal, vbWhite, vbBlack

This line of code will apply a pattern of black and white horizontal stripes. The following table lists the possible pattern styles:

Percent 5 | Wide Downward Diagonal | Diagonal Brick,
Percent 10 | Wide Upward Diagonal | Horizontal Brick
Percent 20 | Light Vertical | Weave
Percent 25 | Light Horizontal | Plaid
Percent 30 | Narrow Vertical | Divot
Percent 40 | Narrow Horizontal | Dotted Grid
Percent 50 | Dark Vertical | Dotted Diamond
Percent 60, | Dark Horizontal | Shingle
Percent 70 | Dashed Downward Diagonal | Trellis
Percent 75 | Dashed Upward Diagonal | Sphere
Percent 80 | Dashed Horizontal | Small Grid
Percent 90 | Dashed Vertical | Large Grid
Light Downward Diagonal | Small Confetti | Small Checker Board
Light Upward Diagonal | Large Confetti | Large Checker Board
Dark Downward Diagonal | Zig Zag | Outlined Diamond
Dark Upward Diagonal | Wave | Solid Diamond

To get the pattern constant you need from the pattern name all you have to do is to add the words in the pattern name and insert the "pt" prefix (which stands for pattern type). For example If you want to achieve a "Zig Zag" pattern you must use the following VB code:

NFillEffect.SetPattern ptZigZag, vbWhite, vbBlack

As we mentioned in the beginning of this topic SetPattern is a shortcut function – if you want to go the long way you’ll have to write something like this:

NFillEffect.Type = fetPattern
NFillEffect.PatternForegroundColor = vbWhite
NFillEffect.PatternBackgroundColor = vbBlack
NFillEffect.PatternType = ptZigZag

You must also know that internally patterns are treated like normal textures and this is why you can apply advanced texture transformations on them. For more information please read the topic "Texture mapping control" in this book.

Related examples. The example in the NControl\VB\FillEffects\General directory shows how to apply patterns on different objects in the scene.


Advanced gradient

Advanced gradients are the most complex and difficult to program filling type. They develop the idea of simple gradients further by allowing you to create gradients based on circles, lines and rectangles. An advanced gradient consists of a background color which defines the default color of the gradient and an arbitrary number of points. Each point has properties for shape, color, position, intensity and angle. The following picture shows an advanced gradient based on three points with black background color. The points have line, circle and rectangle shapes:

To reproduce this advanced gradient in your program you’ll have to write the following code:

NFillEffect.Type = fetAdvancedGradient
NFillEffect.AdvancedGradient.BackgroundColor = vbBlack
NFillEffect.AdvancedGradient.AddPoint 23, 32, RGB(0, 255, 255), agpsCircle, 36, 0
NFillEffect.AdvancedGradient.AddPoint 81, 22, RGB(255, 255, 0), agpsRectangle, 30, 19
NFillEffect.AdvancedGradient.AddPoint 39, 81, RGB(255, 0, 128), agpsLine, 23, 0

Now let’s investigate each line in detail in order to see the purpose behind it. The first line of code:

NFillEffect.Type = fetAdvancedGradient

Instructs the fill effect that it will be using the properties related with advanced gradients. The second line of code makes the gradient background color black:

NFillEffect.AdvancedGradient.BackgroundColor = vbBlack

The three lines to follow just add three new points with different style, position and color. It is important here to fully understand all the parameters of the AddPoint function. The function definition has the following form:

Sub AddPoint(nX As Long, nY As Long, rcColor As OLE_COLOR, nPointStyle As AGPointStyle, nIntensity As Long, fAngle As Single)

The first two parameters represent the point position in percents of the gradient dimensions. The coordinate origin is in the upper left corner of the gradient and a position of (0, 0) means the upper left corner whereas (100, 100) means the lower right corner.

The third parameter is the color of the point. The gradient is merging this color with the other point's colors for each pixel of the gradient by calculating the distance from the pixel to the point and diminishing the point color influence in the resulting image as this distance grows. The point shape actually controls how exactly this distance is calculated and this is the fourth parameter. It can be as we’ve already seen agpsCircle, agpsRectangle and agpsLine (the abbreviation "agps" stands for advanced gradient point style). The fifth parameter specifies the intensity of the point. By increasing the intensity the influence of the point in the resulting advanced gradient is increasing also. For instance in the previous example if we increase the intensity of the first point to 79 we’ll get the following picture:

Programatically this can be achieved with the following line of code:

NChart1.Background.FillEffect.AdvancedGradient.EditPoint 0, 23, 32, RGB(0, 255, 255), agpsCircle, 79, 0

Finally the sixth parameter specifies the angle of the point in degrees. Again if we look at the example we’ll see that the red line has no slope and the rectangle is rotated around its center point. This is because we specified a 19 degrees rotation when we created this point:

NFillEffect.AdvancedGradient.AddPoint 81, 22, RGB(255, 255, 0), agpsRectangle, 30, 19

It is also good to know that there are a few other members of the NAdvancedGradient object. They are Clear, DeletePoint, GetPoint, GetPointsCount and InitFromAdvancedGradient. Their complete description can be found in the Object reference.

Now after we covered the methods you’ll need to create your own advanced gradients lets take a look at the build-in advanced gradients of the control. The control supports 24 types of predefined advanced gradients schemes each of them having 15 variants. So in general you have in your disposal 360 predefined advanced gradients! You can load a predefined advanced gradient by using the SetPredefinedAdvancedGradient function. For example the following line of code will load the calm water gradient scheme with variant 11:

NFillEffect.SetPredefinedAdvancedGradient gsCalmWater2, 11

Because showing all the possible predefined gradients will obviously take too much space in the help file in the following table is listed only one gradient for each scheme.

White On Black | Ocean 3
White On Red | Ocean 4
White On Green | Calm Water 1
White On Blue | Calm Water 2
Red | Desert 1
Green | Desert 2
Blue | Fire 1
Sunset | Fire 2
Night Fall | Fog 1
Night Fall 2 | Fog 2
Ocean 1 | Mahagony 1
Ocean 2 | Mahagony 2

The predefined constant used to identify the advanced gradient scheme in the SetPredefinedAdvancedGradient can be obtained from the name of the advanced gradient object by adding the words of the scheme name and then adding the prefix "gs" (Gradient scheme). For example if you want to load the 11th variation of the Mahagony 2 your VB code will look like that:

NFillEffect.SetPredefinedAdvancedGradient gsMahagony2, 11

At this point maybe you're wondering whether there is a way to serialize or write down a gradient created by you so that it is available to the program when it runs later. The answer is yes – the NFillEffect supports a predefined advanced gradient scheme called gsCustom which contains all these gradients. The custom advanced gradient collection is written in the registry just like the Image gallery and the Animation gallery. Working with it is very easy and straightforward – it possesses the following methods: Add, GetAt, RemoveAt, RemoveAll and GetCount. Since a few real code examples are worth a thousand words let see what we can do with the custom advanced gradient collection:

1. Add the current advanced gradient applied on the control background to the collection:

Dim FillEffect As NFillEffect
Dim AdvGradient As NAdvancedGradient
Dim AdvGradientTemp As NAdvancedGradient
Set FillEffect = NevronControl.Background.FillEffect
Set AdvGradient = FillEffect.AdvancedGradientGallery.Add
Set AdvGradientTemp = FillEffect.AdvancedGradient
AdvGradient.InitFromAdvancedGradient AdvGradientTemp

2. Remove the first item from the collection

NFillEffect.AdvancedGradientGallery.RemoveAt 0

3. Init the fill effect from the first item in the custom collection

Dim AdvancedGradient As NAdvancedGradient
Set AdvancedGradient = NFillEffect.AdvancedGradientGallery.GetAt(0)
NFillEffect.AdvancedGradient.InitFromAdvancedGradient AdvancedGradient

It is also worth to notice that the NAdvancedGradient object can be initialized from another NAdvancedGradient with the help of the InitFromAdvancedGradient function. As we’ll see in the following topics the NFillEffect also posses a similar method.

Finally advanced gradients are treated internally as normal textures and this is why you can apply some texture transformations on them like scaling and rotation. For more information on these features please read the "Texture mapping control" topic.

Related examples. The example in the 3DChart\VB\FillEffects\AdvancedGradients directory shows how to work with advanced gradients.


Texture mapping control

Internally all Nevron control convert gradients, patterns, animations, advanced gradients and images to textures. When mapping animations you must also know that internally the control creates a separate thread which communicates with a custom defined message with the main render thread of the application when it has successfully rendered and converted the next animation frame to an OpenGL texture. To gain an in-depth understanding of texture mapping first of all you must get familiar with the mapping and layout type.

There are three mapping types:

- Eye linear (mtEyeLinear) - in this mapping type the texture coordinates are computed relatively to the viewer and this is why the texture appears to be moving inside the object when you rotate or scale it.

- Object linear (mtObjectLinear) – in this mapping type the texture coordinates are calculated relatively to the object position and this is why the texture mapping does not change when you rotate or move your objects. This is the most common mapping type.

- Sphere map (mtSphere) – this mapping type can be used if you want to achieve special visual effects like mirror or reflection, however using it properly requires an appropriate texture. This is why sphere mapping is not described in this tutorial – if you want to learn more about it you’ll have to read some OpenGL dedicated book.

In addition to this when the mapping type is mtObjectLinear there are several layout strategies:

- Stretched – this mapping layout stretches the texture along the X and Y axes until it fits the object

- Fitted – stretches the texture until it fits along X or Y, by choosing the smaller stretch. This layout mode preserves the texture dimensions ratio.

- Centered – similar to fitted. When used on the background object it also preserves the real original texture dimensions.

- Tiled – repeats the texture along the X and Y axes. This layout mode preserves the texture dimensions ratio.

- Stretched to Width – stretches the texture by width until it fits. This layout mode preserves the texture dimensions ratio.

- Stretched to Height –the same as "Stretched to Width" except that it stretches along the Y axis. This layout mode preserves the texture dimensions ratio.

- Crop fitted - stretches the texture until it fits along X or Y by choosing the bigger stretch. This layout mode preserves the texture dimensions ratio.

Now after we examined the different layout types lets take a look at the other properties related with texture mapping. They are XScale, YScale, Rotation and BlackTextureBackground. Following is the description of each one of them:

XScale – this properties specifies how to scale the texture along the X axis. Value of 1 means no additional scaling. The following code will scale the texture twice along the X axis:

NFillEffect.XScale = 2

YScale – this properties specifies how to scale the texture along the Y axis. Value of 1 means no additional scaling. The following code will scale the texture twice along the Y axis:

NFillEffect.YScale = 2

Rotation – the rotation of the texture around the texture center point in degrees.

BlackTextureBackground – this property can be True or False. When True the control fill the object part that are not covered by the texture with black. If False it uses the color specified in the Color property of the fill effect.

This is all you need to know about texture mapping in Nevron controls. Lets illustrate the usage of these properties with some real code examples. The following code produces the background image shown below provided that the “SwimmingPool.bmp” image resides in the “d:\WinNT” directory:

NChart1.Background.FillEffect.SetImage "d:\winnt\SwimmingPool.bmp"
NChart1.Background.FillEffect.Layout = lCentered
NChart1.Background.FillEffect.Rotation = 45
NChart1.Background.FillEffect.BlackTextureBackground = False
NChart1.Background.FillEffect.EnableWindowsColor = False
NChart1.Background.FillEffect.Color = RGB(128, 255, 255)

To illustrate another mapping type and the use of the XScale and YScale properties lets take a look at the following background:

NChart1.Background.FillEffect.SetImage "d:\winnt\snowflake.gif"
NChart1.Background.FillEffect.Layout = lTiled
NChart1.Background.FillEffect.Rotation = 25
NChart1.Background.FillEffect.XScale = 0.7
NChart1.Background.FillEffect.YScale = 2

As you can see the snowflake texture has been stretched along the Y and X axes and then rotated to 25 degrees and finally tiled to cover the whole control background.

At this point you are probably wondering how the control knew what kind of mapping, layout and stretching parameters to use when we were importing textures with the help of the SetImage, SetAnimation, SetPredefinedAdvancedGradient, SetPattern and SetGradient function. The answer is that the control is determining the best mapping and layout parameters from the type of the fill effect. The following table summarizes the different mapping setting that take effect when you call one of the above mentioned functions:

Fill effect | Mapping | Layout | X scale | Y scale | Rotation | Black texture background
Gradient | Object Linear | Stretch | 1 | 1 | 0 | True
Texture | Object Linear | Stretch | 1 | 1 | 0 | True
Animation | Object Linear | Stretch | 1 | 1 | 0 | True
Pattern | Object Linear | Tile | 1 | 1 | 0 | True
Advanced gradient | Object Linear | Stretch | 1 | 1 | 0 | True

Related examples. The example in the NControl\VB\FillEffects\General directory shows how to apply texture transformations.


Merging fill effects

Sometimes it is very useful to be able to merge two or more fill effects together because the visual appearance of the object will be much better. All Nevron components support this feature and it is called Fill effect merging. The basic idea behind this feature is that the different types of the fill effect represent different image layers. The resulting (or final) texture is computed by adding together the weighted RGB values of the layers. The weight coefficients are given in percents and their sum is always 100. To illustrate how this works lets image that we have a blue and a red layer and we want to add them together. We want however give priority to the blue one so that this layer influence in the resulting RGB image is around 66%. To achieve this we give this layer 66% merge weight coefficient and the remaining 34% will go the red layer. Then the control sums for each pixel of the layers the RGB value of this pixel multiplied by the merge weight coefficient e.g.

Resulting RGB = (Layer1 RGB * Layer1 percent )/ 100 + (Layer2 RGB * Layer2 percent )/ 100

and

Layer1 percent + Layer2 percent = 100%.

In terms of the above example this formula will have the following form:

Resulting RGB = RGB(0, 0, 255) * 66 / 100 + RGB(255, 0, 0) * 34 / 100
Resulting RGB = RGB(0, 0, 168) + RGB(86, 0, 0)
Resulting RGB = RGB(86, 0, 168)

Now lets see how this feature works in practice. The following code snippet shows how to merge a simple black to white gradient with the divot pattern style using a weight coefficients of 50%:

NChart1.Background.FillEffect.SetPattern ptDivot, vbWhite, vbBlue
NChart1.Background.FillEffect.SetGradient gsHorizontal, gvVariant1, vbWhite, vbBlack
NChart1.Background.FillEffect.MergeFillEffects = True
NChart1.Background.FillEffect.SetMergePercents 0, 50, 0, 0, 50, 0

The resulting fill effect has the following outlook:

Related examples. The example in the 3DChart\VB\FillEffects\MergingFillEffects directory shows how to use this unique feature.


Transparency

All NFillEffect object except the NFillEffect object applied on the background can be instructed to be transparent. This is achieved with the use of the Transparency property of the NFillEffect which ranges from 0 to 100 whereas 0 means that the object is completely opaque and 100 means that the object is completely transparent. For example the following line of code:

NFillEffect.Transparency = 50

Instruct the fill effect to render the object as a 50% percent transparent.

Related examples. The example in the 3DChart\VB\FillEffects\General directory shows how to use this unique feature.


Other visual effects

The NFillEffect has also properties that are responsible for controlling the way the object is antialiased and grayscaled. Because the complete discussion on this feature involves other objects such as the NSettings the description of these properties can be found in the “Special visual effects” chapter.


Copying fill effects

Imagine that you have created a complex advanced gradient and would like to apply it on another NFillEffect object. Generally you have two options - you can run the same code again to modify the properties of the second NFillEffect or you can use the InitFromFillEffect function of the NFillEffect. The later is a faster and much safer approach. For example:

NFillEffect.InitFromFillEffect NFillEffect2

Will make the NFillEffect object the same as NFillEffect2.


Visual interface

The NFillEffect object has a state of the art visual interface which can be invoked at runtime by using the ShowDialog function:

NFillEffect.ShowDialog

For a complete description on how to work with the visual interface of the NFillEffect object please refer to the Visual interface chapter of the help file.


Overview

One of the main goals pursued by Nevron controls is to deliver high quality graphics that can be later used in business and scientific presentations. These kind of presentations often require images with better quality than usual - for example all lines must be antialiased or the image should be rendered in grayscale because it is designed for a black and white newspaper publication. The features described in this chapter will certainly help you to create such images.


Antialiasing

OpenGL has build in capabilities for antialiasing lines, points and polygons. In this topic we’ll discuss in detail these features and how they may improve the visual appearance of your charts and graphs.

Antialiasing for points, lines and polygons is enabled with ease. All you have to do is to turn on the respective property of the NSettings objects of the control. The following lines of code enable all kinds of antialiasing:

NevronControl.Settings.AntialiasPoints = True
NevronControl.Settings.AntialiasLines = True
NevronControl.Settings.AntialiasPolygons = True

In addition you can also turn on and off antialiasing for particular polygons and lines by using the AntialiasingType of the NFillEffect and the NLineProperties automation objects. With the help of this property you can also synchronize the antialiasing mode of the object with the general control settings specified in the NSetttings object – this is also the default value of all NFillEffect and NLineProperties object and this is why the above lines of code work. Following are some examples on how you can manipulate these properties:

NFillEffect.AntialiasingType = atDoNotUseAntialiasing ‘ turn off antialiasing for this fill effect.
NLineProperties.AntialiasingType = atUseAntialiasing ‘ turn on antialiasing for this line regardless of the NSetting object AntialiasLines setting.

As you may guess antialiasing has a negative impact on performance and sometimes it may not deliver the required results. This is especially true for antialiased polygons, because OpenGL breaks down every polygon into triangles in a process called triangulization. Each of these triangle edges is antialiased and this sometimes leads to unpleasant visual artifacts. This is why polygon antialiasing can be particularly useful only if applied on individual object such the spheres in a point chart. If you would like to antialias the whole scene using we recommend you to use jittering as it is much more effective.

Related examples. The example in the NControl\VB\SpecialVisualEffects\Antialiasing directory shows how to use antialiasing in practice.


Jittering

Jittering or blurring is the most efficient way to antialias the whole scene without making a significant tradeoff of performance. In some cases it also produces images with a better quality than antialiasing, because it uses a completely different approach to antialias the image.

The idea behind jittering is very simple and this why this special visual effect is so effective. Instead of rendering the scene only once the control renders it several times and produces different image samples of the image. All these samples have a small offset along the X and Y directions. These samples are then added together with weight coefficients calculated by using the following formula:

Weight percent = 100 / Number of samples

You enable the jittering feature by setting the UseJittering property of the NSettings object to True:

NevronControl.Settings.UseJittering = True

The number of samples generated to produce the jittered image is specified with the help of the JitteringSamples property of the NSettings object. By default the value of this property is 2 and it accepts values in the range [2, 16]. For example the following line of code will increase the number of jittering samples used to produce the final image:

NevronControl.Settings.JitteringSamples = 4

By default all the deviations of the samples along the X and Y axes are smaller than 1 pixel, but you can control the deviation factor by using the MaxDeviation property of the NSettings object:

NevronControl.Settings.JitteringDeviation = 3 ' set the deviation to three pixels

Jittering with deviation 2 pixels and 8 samples | Jittering with deviation 8 pixels and 8 samples

As you can see from the table above jittering in conjunction with big deviation and more jittering samples leads to a blurred image and this is why jittering can be considered as a form of a blurring effect.

Finally you may wish to jitter your scene but leave the 2D objects like 2d texts, legends, labels and annotations intact. This can be easily achieved with the help of the Jitter2Dobjects property:

NevronControl.Settings.Jitter2DObjects = False

By default the 2d objects are not jittered. As every antialiasing effect jitter does impact performance in a negative way. However it is much faster to antialias the whole scene with jittering rather than to use antialiasing of lines or especially polygons which is the most computationally expensive antialiasing effect. The performance downfall is proportional to the number of jittering samples. For example if you apply a jittering effect with 4 samples to the scene the control will render approximately 4 times slower than without jittering. To improve performance you may consider to decrease as much as possible the number of jittering samples. For example a value of 4 jittering samples delivers good quality at a comparatively low performance cost.

Related examples. The example in the NControl\VB\SpecialVisualEffects\Jittering directory shows how to use jittering in practice.


Grayscale

Suppose that you have to prepare a chart that will be printed in two newspapers one of which is printed in color and the other one supports only black and white images. Naturally you would like to exploit the color resolution of the first one and try to make a grayscaled picture with good quality for the second. To achieve the second task you may consider using the build in grayscaling capabilities of the control.

Grayscaling in Nevron controls is controlled on two levels – global (or control) level and per object level which acts on individual objects such as lights, lines and fill effects.

On the global level you use the RenderGrayScale property of the NSettings object to turn on and off the grayscale rendering:

NChart1.Settings.RenderGrayScale = True

This line of code will turn on grayscaling and if you do not touch the grayscale related properties of the other objects in the scene (lines, fill effects etc.) the whole scene will be rendered in gray scale. In addition image export functions also align to this property and synchronize the image output with this setting. For example when you export 8 bits per pixel (or 256 color) images the control will automatically convert your palette to a 256 grayscale palette.

There are cases when you want to mix grayscaled and colored objects in a scene. For example imagine that you are building a chart for three rival companies and would like to visually underline the leader – to do this you may consider to render the whole scene in black and white and keep only the leader company bars or pies in color. This visual effect can be easily achieved with the use of GrayScaleType property of the NFillEffect, NMaterial, NLineProperties, NLightSource and NLightModel objects. This property is of type GrayScaleType and accepts the following values:

- gsSynchronizeWithControl the object is synchronized with the RenderGrayscale flag of the control settings object. When RenderGrayScale is on the object is rendered as grayscale and vice versa.

- gsGrayScale the object is always rendered as grayscaled regardless of the value of the RenderGrayScale property of the settings object.

- gsColor the object is always rendered in color mode regardless of the value of the RenderGrayScale property of the settings object.

Depending on the object it is applied to grayscaling works in a different way – for example if a texture fill effect is rendered in grayscale mode the associated OpenGL texture RGB values are converted, which essentially means that the whole texture is recreated. This is also valid for gradients, patterns, animations and advanced gradients. Recreation is not necessary for color fill effect, lines, materials and lights. This is why you must try not to change the state of RenderGrayScale property frequently if you’re looking for a high performance because it may lead to OpenGL texture recreation.

The Following table demonstrates a chart rendered in color, grayscale and partially grayscaled mode.

Color

Grayscale

Grayscale and color

Related examples. Check out the example in the NControl\VB\SpecialVisualEffects\Grayscale directory.


Working with lines

A lot of objects in the 3d scene look better when they have a border around them. This is why it is necessary to have an automation object that controls the appearance of this border. This automation object is the NLineProperties object and it possesses the following properties and methods:

1. EnableLines – enables or disables the lines applied on the object:

NLineProperties.EnableLines = True ‘ enable the lines

2. Color – the color of the line. For example the following line of code assigns a red color to the border:

NLineProperties.Color = vbRed

3. Style – the predefined pattern of the line. It can be lsCustom, lsSolid, lsDash, lsDot, lsDashDot, or lsDashDotDot. Following are some cubes rendered with different line patterns:

Solid | Dash | Dot | Dash Dot | Dash Dot Dot

4. Width – the width of the line in pixels – this value can vary from 1 to 10. The cubes above were rendered with line width of 1.

5. Factor and Pattern. When the LineStyle properties is lsCustom these two properties define the line pattern. These two properties work together to determine whether a certain pixel from the line should be drawn or not. The following formula defines this relationship:

DrawPixel = ((2 ^ (DistanceFromLineStart / Factor)) % 16) & Pattern

The following table shows several lines with dot pattern 0101010101010101 (in binary code) and different line factor.

Factor | Line with pattern 0101010101010101
2 |
4 |
8 |

Finally we must also mention that all lines that have an attached NLineProperties object can be antialiased and grayscaled. Because in order to enable these features you must also be familiar with the NSetttings objects the complete discussion on how to work with antialiasing and grayscaling is moved in the “Special visual effects” book.


Working with frames

The NFrameProperties object is similar to the NLineProperties object. The difference is that it adds the functionality needed to define window frames (as its name suggests). Frames consist of four elements: outer bevel, distance, inner bevel and line. Bevels define edges and can be either disabled, raised and sunken. The bevels styles are controlled via the InnerStyle and OuterStyle properties of the NFrameProperties object. The following VB code modifies the inner and the outer bevel as well as the distance between them:

NFrame.OuterStyle = fsSunken
NFrame.InnerStyle = fsRaised
NFrame.BevelDistance = 4

You can also control the width of the bevels by using the BevelWidth property. Please note that this property controls the width of both the inner and the outer bevels of the NFrameProperties object.

The other properties of the NFrameProperties object are the same as with the NLineProperties object and define the border enclosed by the outer and inner bevels.


Overview

NToolBar is an ActiveX control with the functionality of a regular toolbar, but designed specially for use with the Nevron charting toolkit components. More than twenty toolbar buttons allow various properties of the components to be modified with convenience and ease. The toolbar can be attached to any of the toolkit components without a single line of code and is fully customizable. It supports small and large buttons, vertical and multi-row toolbars and different frame styles. The picture below illustrates how nicely the toolbar works in cooperation with the other Nevron controls:

The following topics will teach you how you can exploit the power of this wonderful supplementary component.


Controlled objects

The toolbar can be connected to any of the following Nevron toolkit objects: NChart, N3dText, NPieChart, NLegend, NClock. The controlled object can be selected at design time - from the NToolBar general property page or set at runtime with automation properties. With the help of the ControlledObjectName property, you can set the controlled object at runtime by providing its name. For example:

NToolBar1.ControlledObjectName = NChart1.Name

or

NToolBar1.ControlledObjectName = "NChart1"

The ControlledObject object property is similar. Its parameter is not the object’s name but the object itself:

NToolBar1.ControlledObject = NChart1

Note for Visual C++ programmers: The parameter of the ControlledObject property is an IUnknown pointer to the controlled object. The pointer can be accessed with the help of the CWnd::GetControlUnknown() function.


Buttons

Nevron toolbar control has more than 20 buttons, which manage different properties of the Nevron toolkit objects and allow their fast and easy editing. The user is able to select the buttons that will be displayed on the toolbar according to the needs of the current application. Some of the buttons are intended for particular objects and can be used only when the toolbar controls an object of that type. For example, the “ActiveChart” button can be used only with NChart objects, because other objects do not support the ActiveChart property. Here follows a description of the available buttons and their functions:

bnRotationLeft - Makes the current controlled object to rotate left by increasing the Rotation

property of its NN3DView object with the value of the toolbar’s RotationStep property.

bnRotationRight - Makes the current controlled object to rotate right by decreasing the Rotation property of its N3DView object with the value of the toolbar’s RotationStep property.

bnElevationUp - Makes the current controlled object to rotate around the x axis by decreasing the Rotation property of its N3DView object with the value of the toolbar’s ElevationStep property.

bnElevationDown - Makes the current controlled object to around the x axis by increasing the Rotation property of its N3DView object with the value of the toolbar’s ElevationStep property.

bnZoomIn - Makes the current controlled object to zoom in by increasing the Zoom property of its N3DView object with the value of the toolbar’s ZoomStep property.

bnZoomOut - Makes the current controlled object to zoom out by decreasing the Zoom property of its N3DView object with the value of the toolbar’s ZoomStep property.

bnViewerRotationLeft - Decreases the ViewerRotation property of the current controlled object’s N3DView object with the value of the toolbar’s ViewerRotationStep property.

bnViewerRotationRight - Increases the ViewerRotation property of the current controlled object’s N3DView object with the value of the toolbar’s ViewerRotationStep property.

bnOffsetXLeft - Makes the current controlled object to move to left by decreasing the OffsetX property of its N3DView object with the value of the toolbar’s OffsetXStep property.

bnOffsetXRight - Makes the current controlled object to move to right by increasing the OffsetX property of its N3DView object with the value of the toolbar’s OffsetXStep property.

bnOffsetYUp - Makes the current controlled object to move up by increasing the OffsetY property of its N3DView object with the value of the toolbar’s OffsetYStep property.

bnOffsetYDown - Makes the current controlled object to move down by decreasing the OffsetY property of its N3DView object with the value of the toolbar’s OffsetYStep property.

bnOrthogonal - Sets orthogonal projection for the current controlled object.

bnPerspective - Sets perspective projection for the current controlled object.

bnView2D - Sets 2-dimensional view for the current controlled object without changing its zoom.

bnMouseDisabled - Sets the mouse drag mode to Disabled.

bnMouseTrackball - Sets the mouse drag mode to Trackball mode.

bnMouseZoom - Sets the mouse drag mode to Zoom mode.

bnMouseOffset - Sets the mouse drag mode to Offset mode.

bnPropertySheet - Shows the property sheet of the current controlled object. Supported only by the 3DChart.

bnRenderGreyScale - Turns on/off the render grayscale feature.

bnActiveChart - Shows a menu from which the active chart can be selected. Supported only by the 3DChart.

bnSeparator - The separator does not receive user input. It is used to separate different items in the toolbar.

Each time a toolbar button is clicked, the NToolBar object fires an OnButtonClicked event with the button id as a parameter.

Adding and Removing Buttons at runtime

The AddButton function adds a specified button after the last toolbar item. It takes as parameter the button command id. The following code adds some items to the toolbar:

NToolBar1.AddButton bnActiveChart ‘add the ActiveChart button
NToolBar1.AddButton bnSeparator ‘place a separator
NToolBar1.AddButton bnPropertySheet ‘add the PropertySheet button

The InsertButton function inserts a specified toolbar item at a specified position. The following code demonstrates inserting the RenderGrayscale button after the first button in the toolbar:

NToolBar1.InsertButton bnRenderGreyScale, 1

Both AddButton and InsertButton do not place buttons that are already present in the toolbar. The only exception is bnSeparator - there is no restriction for separators.

RemoveButton - this function removes a button from the toolbar. Its parameter is the button command id. For example:

NToolBar1.RemoveButton bnMouseDisabled


Appearance

The NToolBar supports two sizes for the buttons: small (default, icon size 16x16) and large (icon size 32x32). The LargeButtons property defines the size of the buttons. The following code sets the buttons to large:

NToolBar1.LargeButtons = True

The FrameStyle defines the style of the toolbar frame. It can be one of the following values: tfs2D for flat frame, tfs3D for 3D-like frame and tfsNone for no frame at all.

NToolBar1.FrameStyle = tfsNone ‘ Remove the toolbar frame

By changing the width of the toolbar (either in design-time or via automation properties), different configurations of the toolbar buttons can be achieved like for example vertical toolbar or toolbar with multiple rows.


Annotations

Annotations are visual objects that can be used to mark or draw attention to some items or areas in the component. There are two types of annotations – Balloons and Arrows. They are 2D objects similar to labels, but with different functions and purpose. Like most objects in the Nevron components they have fill effects, border properties, mouse response and texts that can be modified. Annotations are represented by the NAnnotation object. The NAnnotation objects are placed in a collection of type NAnnotationCollection. Each components has its own annotation collection. The rest of the topic describes how you can use annotations with 3DChart, but this information also applies to 3DText, 3DPieChart, 3DLegend and 3DClock.

The following code creates an annotation and places it in the collection.

Dim annotation as NAnnotation
Set annotation = NChart1.AnnotationCollection.Add

Annotations can be positioned in the chart in two different ways. The first mode is 3D positioning mode. The annotation is “attached” to a point in the 3-dimensional chart space. When the chart is rotated or zoomed the point is also moved, thus making the annotation to change its location. In that way the annotation always points to the same item in the chart. The second mode is 2D positioning mode. In this mode the annotation position is controlled by a 2D point. Transformations like zooming, rotation and translation of the chart are not applied to the annotation.

To switch between the two modes use the PositionMode3D property. If the property is set to True (default) then the annotation is in 3D positioning mode. The coordinates of the point that controls the position are stored in a NPoint3D object, returned by the Position3D method. The following example demonstrates how to change the 3D position of the annotation:

annotation.PositionMode3D = True
annotation.Position3D.PosX = 0.5
annotation.Position3D.PosY = 0.1
annotation.Position3D.PosZ = 0.2

The image below show how 3D positioning works:

If the PositionMode3D property is set to False the annotation works in 2D positioning mode. Then its location is determined by the PointerPositionX and PointerPositionY properties. The units are percents of the chart window dimensions. The following example places the annotation in the middle of the chart window:

annotation.PositionMode3D = False
annotation.PointerPositionX = 50
annotation.PointerPositionY = 50

The Text property controls the string that is displayed by the annotation.

annotation.Text = "This is an annotation"

To access the NTextEx applied on the annotation's text use the TextEx method. Various text properties can be changed like font, size, fill effect, back plane properties etc.

annotation.TextEx.Font.Bold = True

The AnnotationType property defines the type of the annotation object. Possible values are atBalloon (default) and atArrow.

annotation.AnnotationType = atArrow

The following picture shows an annotation arrow:

The Visible property determines if the annotation is visible. This is useful if you want to hide the annotation without removing it from the annotation collection:

annotation.Visible = False 'Hide the annotation

The ArrowAngle property is the angle between the annotation's arrow and a horizontal line. It is measured in degrees. With the help of this property the annotation can be rotated around its arrow pointer.

annotation.ArrowAngle = 45

The ArrowLength property defines the length of the annotation's arrow (for Balloon only). For Arrow annotations, the length is controlled by the InflateTextX property.

annotation.ArrowLength = 55

The InflateTextX property determines the x size of the annotation according to the x size of the annotation text.

annotation.InflateTextX = 20 ‘ make it 20 pixels wider than the text

The InflateTextY determines the y size of the annotation according to the y size of the annotation text.

annotation.InflateTextY = 10 ‘ make it 10 pixels higher than the text

The MouseResponse method gives access to the NMouseResponse object applied on the annotation:

annotation.MouseResponse.SetTooltip "This Annotation has a custom tooltip"

The FillEffect method gives access to the NFillEffect object applied on the annotation:

annotation.FillEffect.SetSoldColor vbRed

The Border method gives access to the NLineProperties object applied on the annotation border:

annotation.Border.Width = 3

The ShowDialog method shows the NAnnotation properties dialog at runtime. The return value indicates whether the user clicked the Ok button.


Point3d

NPoint3D is an automation object that represents a point in the 3D space of the chart. It is used as an origin point for annotation objects, which work in 3D mode. Annotations have a method Position3D, which gives access to the NPoint3D object that represents the 3D position of the Annotation pointer. In that way, the annotations can be easily attached to different objects in the chart.

The NPoint3D object has three properties for the three coordinates: PosX, PosY and PosZ. The x, y and z coordinates are in OpenGL units. The InitFromPoint3D method can be used to copy the coordinates from another NPoint3D object.

There are three objects that can produce 3D points. These are NAxis, NAxisConstLine and NAxisStripe. The NAxis’s method for that purpose is GetPoint3DFromValue:

GetPoint3DFromValue(dValue as Double, ppPoint3D as NPoint3D) as Boolean

Here dValue is the value on the axis from which we want to extract the NPoint3D and ppPoint3D is an “out” parameter – the NPoint3D object that is to be initialized. The function returns True if the call is successful and False if not. The call is not successful for example if there is an exclusive presentation group, which has no axes – Pie or Doughnut. In such case the Point3D is not filled with valid coordinates and should not be used as an origin point for Annotation.

The following example creates an annotation object and attaches it to a specified value (14.73) of the left axis.

Dim point3d As NPoint3D
If NChart1.Axes(atLeftAxis).GetPoint3DFromValue(14.73, point3d) Then
NChart1.Redraw = False
With NChart1.AnnotationCollection.Add
.Position3D.InitFromPoint3D point3d
.Text = "Left Axis Annotation”
End With
NChart1.Redraw = True
End If

Const Lines and Stripes have similar methods for producing NPoint3D objects. For Const Lines this is:

GetPoint3DFromPosition(nPercent As Long, ppPoint3D As NPoint3D) as Boolean

The point is extracted from a position that is specified by nPercent – in percents from the const line length. The meaning of ppPoint3D and the return value are the same as in the previous method. The following example creates an annotation object and places it in the middle of a const line of the left axis.

Dim point3d As NPoint3D
Dim line As NAxisConstLine
Set line = NChart1.Axes(atLeftAxis).ConstLines.GetAt(0)
If  line.GetPoint3DFromPosition(50,
 point3d) Then
NChart1.Redraw = False
With NChart1.AnnotationCollection.Add
.Position3D.InitFromPoint3D point3d
.Text = "ConstLine Annotation"
End With
NChart1.Redraw = True
End If

NAxisStripe object exposes the following method:

GetPoint3DFromPosition(nPercent As Long, wall as ChartWallType, ppPoint3D As NPoint3D) as Boolean

Here the only difference from GetPoint3DFromPosition of the constant lines is the wall parameter. A stripe line can be shown at more than one wall and the wall parameter specifies which part of the stripe exactly we want to annotate. The following example places an annotation in the middle of a stripe on the back wall.

Dim point3d As NPoint3D
Dim stripe As NAxisStripe
Set stripe = NChart1.Axes(atLeftAxis).Stripes.GetAt(0)
If stripe.GetPoint3DFromPosition(50, cwtBack, point3d) Then
NChart1.Redraw = False
With NChart1.AnnotationCollection.Add
.Position3D.InitFromPoint3D point3d
.Text = "Stripe Annotation"
End With
NChart1.Redraw = True
End If


Localization

Resource localization

Both the Unicode and the ANSI version of the component support localization e.g. translation or adaptation to a different language other than English. This is possible because all strings used by the component internally are loaded from the resources instead of being hard coded in the code.

To change the current resources you need to load a resource DLL with the help of the ResourceDLL property of the NSettings object of the control. This property accepts a full path to a resource dll containing the resources that must replace the current resource symbols. This of course cannot be an arbitrary dll, because it must contain all the resource symbols internally used by the component - otherwise it may stop to function properly. The resource dlls that must be used for such purposes can be found in the Localization folder under the main installation folder.

Lets suppose that you do not like for some reason the title of the "Database" property page of 3DChart and would like to replace it with "Database support" in your program. To accomplish this you must perform the following steps:

1. Start Visual Studio

2. Select File Open...

3. Select NChartResourceDLL.dll located in the 3DChart\Localization folder

4. From the Open As combo select Resources.

5. Click Open. At this point Visual Studio will open the DLL resources for you.

6. Search for the database word "Database" in the string table.

7. Replace "Database" with "Database Support" and save the dll.

(Modifying the other resource types like dialogs, icons etc. essentially requires the same steps. For additional information on resource editing please consult with the Visual Studio documentation).

At this point you have a resource dll that contains the replaced string. All that's left to do is to instruct the chart to use it instead of the standard resources. The following code for example replaces the standard resources with the resources in the NChartResource.dll file residing in the temp directory of drive C:

NChart1.Settings.ResourceDLL = "c:\temp\NChartResourceDLL.dll"

Now when you execute:

NChart1.ShowProperySheet

Instead of "Database" you'll have a "Database Support" property page. If at a later stage you decide that you want to use the standard (build-in) resources all you must do is to pass an empty string to the ResourceDLL property:

NChart1.Settings.ResourceDLL = "" ' I want to revert to the original resources.

Note! You must modify resources with caution because removing resource symbols may cause the component to stop functioning properly. Pay special attention to stings containing formatting commands such as "%s" "%d" and others. After translation or modification these strings must contain the same formatting commands in the original order.

If you're interested in a resource dll in a particular language please check out the Nevron LLC website at http://www.nevron.com or contact support at support@nevron.com


Locale number formatting

Locale number, currency and date formatting

Different countries use different rules (formatting) to display digits, currencies and dates. When the component is first instantiated it automatically synchronizes with the local digit and currency presentation settings of Windows. However there are lot of cases when the developer may wish to alter this behavior. Some of them are:

1. The component is used on a Web server that is configured to display number, currency and dates using the English (US) locale settings, but the audience of the of the website requires formatting for a different locale - for example French (Belgium).

2. The developer is writing a program targeted for a particular locale market and wants all number, currencies and dates to be displayed according to this locale formatting. The problem here is that it is unrealistic to expect that all users in this locale will alter the default Windows locale settings (English (US)) with the locale settings most appropriate for their location.

To solve such problems you must use the UserDefaultNumberFormat and the NumberFormatCustomLocale properties of the NSettings object. The first property instruct the control whether to use the Windows formatting settings or the settings appropriate for the locale identified by the NumberFormatCustomLocale property. For example if you want to enable the formatting settings specific to Belgium you must write the following code:

NevronControl.Settings.UserDefaultNumberFormat = False ' turn off the default synchronization
NevronControl.Settings.NumberFormatCustomLocale = 0x80c 'French (Belgium)

The table below lists the accepted locale identifiers:

Identifier | Language
0x0000 | Language Neutral
0x0400 | Process Default Language
0x0436 | Afrikaans
0x041c | Albanian
0x0401 | Arabic (Saudi Arabia)
0x0801 | Arabic (Iraq)
0x0c01 | Arabic (Egypt)
0x1001 | Arabic (Libya)
0x1401 | Arabic (Algeria)
0x1801 | Arabic (Morocco)
0x1c01 | Arabic (Tunisia)
0x2001 | Arabic (Oman)
0x2401 | Arabic (Yemen)
0x2801 | Arabic (Syria)
0x2c01 | Arabic (Jordan)
0x3001 | Arabic (Lebanon)
0x3401 | Arabic (Kuwait)
0x3801 | Arabic (U.A.E.)
0x3c01 | Arabic (Bahrain)
0x4001 | Arabic (Qatar)
0x042b | Windows 2000: Armenian. This is Unicode only.
0x044d | Windows 2000: Assamese. This is Unicode only.
0x042c | Azeri (Latin)
0x082c | Azeri (Cyrillic)
0x042d | Basque
0x0423 | Belarussian
0x0445 | Windows 2000: Bengali. This is Unicode only.
0x0402 | Bulgarian
0x0455 | Burmese
0x0403 | Catalan
0x0404 | Chinese (Taiwan)
0x0804 | Chinese (PRC)
0x0c04 | Chinese (Hong Kong SAR, PRC)
0x1004 | Chinese (Singapore)
0x1404 | Chinese (Macau SAR)
0x041a | Croatian
0x0405 | Czech
0x0406 | Danish
0x0413 | Dutch (Netherlands)
0x0813 | Dutch (Belgium)
0x0409 | English (United States)
0x0809 | English (United Kingdom)
0x0c09 | English (Australian)
0x1009 | English (Canadian)
0x1409 | English (New Zealand)
0x1809 | English (Ireland)
0x1c09 | English (South Africa)
0x2009 | English (Jamaica)
0x2409 | English (Caribbean)
0x2809 | English (Belize)
0x2c09 | English (Trinidad)
0x3009 | English (Zimbabwe)
0x3409 | English (Philippines)
0x0425 | Estonian
0x0438 | Faeroese
0x0429 | Farsi
0x040b | Finnish
0x040c | French (Standard)
0x080c | French (Belgian)
0x0c0c | French (Canadian)
0x100c | French (Switzerland)
0x140c | French (Luxembourg)
0x180c | French (Monaco)
0x0437 | Windows 2000: Georgian. This is Unicode only.
0x0407 | German (Standard)
0x0807 | German (Switzerland)
0x0c07 | German (Austria)
0x1007 | German (Luxembourg)
0x1407 | German (Liechtenstein)
0x0408 | Greek
0x0447 | Windows 2000: Gujarati. This is Unicode only.
0x040d | Hebrew
0x0439 | Windows 2000: Hindi. This is Unicode only.
0x040e | Hungarian
0x040f | Icelandic
0x0421 | Indonesian
0x0410 | Italian (Standard)
0x0810 | Italian (Switzerland)
0x0411 | Japanese
0x044b | Windows 2000: Kannada. This is Unicode only.
0x0860 | Kashmiri (India)
0x043f | Kazakh
0x0457 | Windows 2000: Konkani. This is Unicode only.
0x0412 | Korean
0x0812 | Korean (Johab)
0x0426 | Latvian
0x0427 | Lithuanian
0x0827 | Lithuanian (Classic)
0x042f | Macedonian
0x043e | Malay (Malaysian)
0x083e | Malay (Brunei Darussalam)
0x044c | Windows 2000: Malayalam. This is Unicode only.
0x0458 | Manipuri
0x044e | Windows 2000: Marathi. This is Unicode only.
0x0861 | Windows 2000: Nepali (India). This is Unicode only.
0x0414 | Norwegian (Bokmal)
0x0814 | Norwegian (Nynorsk)
0x0448 | Windows 2000: Oriya. This is Unicode only.
0x0415 | Polish
0x0416 | Portuguese (Brazil)
0x0816 | Portuguese (Standard)
0x0446 | Windows 2000: Punjabi. This is Unicode only.
0x0418 | Romanian
0x0419 | Russian
0x044f | Windows 2000: Sanskrit. This is Unicode only.
0x0c1a | Serbian (Cyrillic)
0x081a | Serbian (Latin)
0x0459 | Sindhi
0x041b | Slovak
0x0424 | Slovenian
0x040a | Spanish (Traditional Sort)
0x080a | Spanish (Mexican)
0x0c0a | Spanish (Modern Sort)
0x100a | Spanish (Guatemala)
0x140a | Spanish (Costa Rica)
0x180a | Spanish (Panama)
0x1c0a | Spanish (Dominican Republic)
0x200a | Spanish (Venezuela)
0x240a | Spanish (Colombia)
0x280a | Spanish (Peru)
0x2c0a | Spanish (Argentina)
0x300a | Spanish (Ecuador)
0x340a | Spanish (Chile)
0x380a | Spanish (Uruguay)
0x3c0a | Spanish (Paraguay)
0x400a | Spanish (Bolivia)
0x440a | Spanish (El Salvador)
0x480a | Spanish (Honduras)
0x4c0a | Spanish (Nicaragua)
0x500a | Spanish (Puerto Rico)
0x0430 | Sutu
0x0441 | Swahili (Kenya)
0x041d | Swedish
0x081d | Swedish (Finland)
0x0449 | Windows 2000: Tamil. This is Unicode only.
0x0444 | Tatar (Tatarstan)
0x044a | Windows 2000: Telugu. This is Unicode only.
0x041e | Thai
0x041f | Turkish
0x0422 | Ukrainian
0x0420 | Urdu (Pakistan)
0x0820 | Urdu (India)
0x0443 | Uzbek (Latin)
0x0843 | Uzbek (Cyrillic)
0x042a | Vietnamese

Finally you should know that you can also change the default formatting settings from the System settings property page of the component.


Using the Redraw flag

Modifying almost any property of the control will cause a control window redraw and will certainly change the control modified flag. In many cases you can speed up your program if you turn off the Redraw flag prior to making multiple calls to the control API and then turn it on when you're done. Have in mind that the Redraw flag is not comulative. To explain this lets examine the following program sceleton:

Sub Function1()
NControl.Redraw = False
Function2
...
' heavy control modifications 1
...
NControl.Redraw = True
End Sub

Sub Function2()
NControl.Redraw = False
 ...
' heavy control modifications 2
...
NControl.Redraw = True
End Sub

The problem with the above code is that code "heavy control modifications 1" will not be shielded by the Redraw flag because Function2 sets it to True on exit. To correct this the previous program should look like this:

Sub Function1()
NControl.Redraw = False
Function2
...
' heavy control modifications 1
...
NControl.Redraw = True
End Sub

Sub Function2()
 ...
' heavy control modifications 2
...
End Sub

e.g. you must not make nested changes to the Redraw flag.


Enabling OpenGL hardware acceleration

Currently there are a lot of video card manufactures on the market and almost all of them promise that their new video boards support OpenGL hardware acceleration. Unfortunately this support is not always so complete and bug free as advertised which may cause a lot of problems to the developers using components exploiting the power of OpenGL. This is why we decided that by default the OpenGL acceleration must be turned off and that in default mode the control must use the generic OpenGL implementation.

This of course does not mean that you cannot use hardware acceleration with Nevron components. On the contrary - enabling the control to automatically leverage the video board hardware capabilities can be done with only one function call:

NChart1.Settings.EnableHardwareAcceleration = True

or by going to the System settings property page and then checking the Enable hardware acceleration check box.

In general we recommend that you distribute your applications with disabled hardware acceleration by default. This will ensure maximum portability of your software. It is also a good idea to let the user decide whether or not to use acceleration.

Developers writing web server applications should not worry about OpenGL acceleration issues, because OpenGL always uses generic (non accelerated) render surface for image export.


Caching selection rendering

Selection rendering is a special render mode internally used by the component to locate objects in the 3D scene given 2D coordinates relative to the component viewport. This render mode is not as computationally expensive as the normal rendering because it automatically discards a lot of options such as lighting, jittering, antialiasing and so on. In practice there are interactivity modes that require a lot of selection requests - for example when you move the mouse over the control and tooltips are turned on or when you need to change the mouse cursor depending on the underlaying 3D object. This is why internally the component caches selection rendering and when there are subsequent interactivity requests the component refers to the internal cache rather than rendering the whole 3D scene again. The component automatically decides when the selection cache is outdated, but you can force it to recreate it by changing the Redraw flag:

NControl.Redraw = False
NControl.Redraw = True ' force the component to clear the selection cache.

In some cases however keeping a selection cache is not desirable - for example when the component state changes frequently, when there are few interactivity requests or when you want to reduce the memory footprint of the control. To turn off the selection cache you must modify the CacheSelectionRendering property of the NSettings object:

NControl.Settings.CacheSelectionRendering = False

or from the System settings property page uncheck the Cache selection rendering check box.


Controlling OpenGL context recreation

OpenGL context recreation is a feature in all Nevron components forcing the component to recreate the OpenGL context and associated window when the viewable area of the component changes. This is necessary because Windows does not properly resize the OpenGL viewport when the attached window is resized and is at the same time overlapped by another window. By default OpenGL context recreation is enabled but you can turn it off at any time by modifying the RecreateContextOnResize flag of the NSettings object:

NControl.Settings.RecreateContextOnResize = False

or from the System setting property page check the Recreate OpenGL context on resize check box. When this flag is turned off you still have an option to force the control to recreate the OpenGL context. This is achieved with the help of the RecreateOpenGLContext function again belonging to the NSettings object:

NControl.Settings.RecreateOpenGLContext ' force the control to recreate the OpenGL context

This feature can be very useful of you have a resizable form or a view window implementing custom scrolling. In such cases you can greatly improve the control resizing speed by turning off the RecreateContextOnResize flag and then manually forcing the component to recreate the OpenGL context when necessary.


The NBackplane object

The NBackplane object contains the properties used to control the backplanes applied on texts, legends, margin and labels. The most important property in the object is the Visible property. It controls the visibility of the backplane - when set to False the backplane is not displayed:

NBackplane.Visible = False ' hide this backplane

Another very important property in the object is the Style property controlling the shape of the backplane. Possible values for this property are - bpsRectangle, bpsCircle, bpsEllispe, bpsCutEdgeRectangle and bpsSmoothEdgeRectangle. The abbreviation "bps" stands for backplane style". The default value for the Style property is bspRectangle and you can modify it at runtime:

NBackplane.Style = bpsCutEdgeRectangle ' I want a cut edge rectangle

Note that the control automatically determines the dimensions of the backplane - for example for 2D texts the backplane dimensions are equal to the text bounding rectangle. Some style types however can be additionally modified. Following is a detail description of the style relevant properties:

- EdgePercent - Controls the edge size of the smooth edge or cut edge rectangle (the Style property must be set to bpsSmoothEdgeRectangle or bpsSmoothEdgeRectangle) in percents of the rectangle width or height depending on which one of them is smaller.

- EllipseWidthPercent - When the style of the backplane is bpsEllipse you can apply additional scaling along the x dimension by using this property. A value of 100% means no additional scaling will be applied.

- EllipseHeightPercent - When the style of the backplane is bpsEllipse you can apply additional scaling along the y dimension by using this property. A value of 100% means no additional scaling will be applied.

Another properties relevant to the backplane dimension are InflateWidth and InflateHeight. The specify the additional inflate in device units (pixels). You may wish to use these properties to increase readability when the texts displayed by the control are too small.

The other properties of the NBackplane object define its appearance, border and mouse response features. They are FillEffect, Material, Frame and MouseResponse - giving you access to the NFillEffect, NMaterial, NFrameProperties and NMouseResponse object applied on the backplane respectively.


WinXP look and feel

WinXP introduced a new feature to developers and users called "Windows themes" or "Visual styles". If a program wants to integrate well with the new Windows outlook it must support themes otherwise it may look outdated. This topic will teach you how to enable theme support in your application and how to configure the control to use Windows XP themes.

The first thing you need to do when you want to build an application supporting themes is to include a special manifest file in the resources of your application. This is accomplished in a few simple steps:

1. Link to ComCtl32.lib and call InitCommonControls

2. Add a file called YourApp.exe.manifest to your source tree with the following XML format:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

3. Add the manifest to your application's resource file as follows:

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"

Note! When you add the previous entry to the resource you must format it on one line. Alternatively, you can place the XML manifest file in the same directory as your application's executable file. The operating system will load the manifest from the file system first, and then check the resource section of the executable. The file system version takes precedence.

Now your application will use visual styles (themes) if it is running on an XP machine. To instruct the component to draw all owner draw controls with XP look and feel add the following line when the control is instantiated:

NChart1.Settings.EnableWinXPLookAndFeel = True

or from the System Settings property page of the component check the Enable Windows XP look and feel check and click Apply.

The following screenshots illustrate how custom controls from of the component visual interface will draw themselves with and without themes:

Classic View | WinXP View


General Property Page

The Charts list box on the left side of the property page enumerates the charts in the NChartCollection object. The chart with the red frame around it is the current active chart. You can add new charts with the help of the Add button at the left bottom side of the page. To delete a chart you must first select it from the list and then press the Delete button. The Set active button changes the active chart with the current one selected in the list. Note that when you change the active chart the chart icons will reflect the change by setting a red frame around the new active chart. For more information on multiple charts refer to the "Miltiple charts and legends" topic in the User's Guide.

The Visible check box controls the visibility of the current chart. When unchecked the current chart is not displayed. This can be very useful if you want to temporarily hide some of the charts from the user.

The Margins group of controls control the chart margins, the margin strategy algorithm and the properties of the chart backplane. For more information on chart margins check out the "Chart margins" topic in the User's Guide.

The Dimensions control group helps you specify the dimensions of the chart (for more information see Chart Dimensions topic).

The Other control group allows you to directly access the current chart properties. By default the chart property pages display the active chart properties (Data, 3dview etc.). Sometimes it is inconvenient to switch the active chart every time you wish to modify some small details. In this case you can just access the chart properties from the General property page.

The Display on legend combo box links the current chart to a legend in the NLegendCollection object. By default the 3DChart creates one chart and one legend and links the chart to this legend.


Data Property Page

The Data Property Page provides you with a visual interface to modify the Categories, Series and Levels collections and also to edit the values of the data items contained in the Data Storage (see the Data Storage topic for more information).

The Current Level edit shows the currently edited level in the data storage.

The Data Grid shows the current level in the Data Storage. The row and column counts are synchronized with the size of the Categories and Series collections respectively. This means that every change in the size of the Categories and Series collections automatically reflects in the dimensions of the Data Grid. The headers of the rows show the labels of the Categories collection and the column headers show the labels of the Series collection. You can directly edit the values in the grid by double clicking on the desired cell.

The Value1 – Value2 – Value3 .... Label Tab controls which value of the NData objects is the Data Grid displaying.

The Color Button shows the standard Windows select color dialog, and the selected color is applied on the selected range of data items.

The Fill Effect Button shows the Select Fill Effect Dialog, and the selected fill effect is applied to the selected range of data items.

The Material Button shows the Material properties dialog, and the selected material is applied to the selected range of data in items.

The Border Props Button shows the line properties dialog for the selected range of data items in the data storage.

The Mouse Response... Button shows the Mouse Response dialog of the selected data points.

The TextEx... Button shows the text properties of the selected data points.

The Annotation... Button shows the annotation properties of the selected data points.

The Categories – Series – Levels tab specifies the currently edited axis parameter collection (see the Data Storage topic for more information).

The Add and Delete buttons are used to modify the currently edited collection.

Important! The data shown by the data property page is visualized, when you create some presentation groups from the Presentation Groups Property Page. If you try to edit the appearance of the data points in the data storage and the changes are not visualized you have to check whether the Uniform Appearances of the presentation group showing the data points are not enabled.


Presentation Groups Property Page

The presentation group property page helps you modify the presentation group collection. The Presentation Groups Grid displays the created presentation groups. Double clicking on a row in the grid displays the Property Page Sheet for the selected presentation group.

The Add Button shows the Add Present Group Wizard, which provides you with a step by step interface for creating a presentation group. The first step is of course the selection of the desired presentation group:

Step 1 - select the presentation group.

After you have selected the presentation group you want to create, the Add Present Group Wizard will sequentially show the property pages of the selected presentation group. See the Presentation Groups Property Pages topic for more information.

The Delete Button deletes the selected presentation group. You must select the whole presentation group row by clicking on the row header.

The Properties Button shows the Property Page Sheet of the selected presentation group.

Important! You must create some categories and series and set some values to the data points in the Data Property Page before you see the chart visualized.


Axes Property Page

This page controls the appearance of the axes. By double clicking on an axis in the Axis List box or by pressing the Properties button you can invoke the Axis Property Page Sheet, from where you can control various properties of the axis appearance, ticks, gridlines, scale and position.

See the Axes topic for more information.


Chart Walls Property Page

Walls Property Page

This page controls the appearance of the chart walls. By double clicking on a chart wall in the Chart Wall list box or by pressing the Properties button you can invoke the chart wall property page sheet, from where you can control the wall width, fill effect, material and border properties.

See the Chart Walls topic for more information.


Database Property Page

The Database property page supplies the user with a visual interface to connect the 3DChart component with an ADO database. See the Database Integration topic for more information. It has the following user interface controls:

Enable Database Integration check – this check enables or disables the integration of the 3DChart component with the database.

Data Sources List – shows the currently available data sources.

Data Source Add Button – shows the Add Data Source dialog, from which you can specify connection and recordset information for the data source.

Data Source Delete Button – deletes the currently selected data source.

Data Source Properties Button – shows the data source properties dialog.

Category Mapping Label Field Combo – from this combo you specify the field, from which the component will extract the category labels.

Category Mapping Show Label Check – specifies whether the component shows the category labels.

Serie Mappings Grid – displays the created serie mappings.

Serie Mappings Add Button – shows the Serie Mapping dialog.

Serie Mappings Delete Button – deletes the selected serie mappings

Serie Mappings Properties Button – shows the Serie Mapping dialog for the selected serie mapping.


Legend Property Page

The Legends list box on the left side enumerates the legends in the NLegendCollection object. The active legend is highlighted by drawing a red frame border around the legend icon in the list. To add a new legend press the Add button on the left bottom side of the page. To delete a legend from the collection select the legend from the list and press the Delete button. It is important to note that you cannot delete a legend if there are charts in the NChartCollection that link to it. You must first disconnect the legend from all chart if you want to delete it. The Set active button changes the current active legend.

Legend Properties tab on the right side of the page show the properties of the current legend selected in the list. Following is a brief description of the control in each tab.

General tab - shows the general legend properties such as the legend mode and the legend expand strategy. If the legend is in manual mode you can add some data to the legend by pressing the Legend Data button. The following dialog will appear:

it enables you to manually configure the contents of the legend. To change some of the legend data items properties like fill effect or material select some rows from the Legend data grid on the left side of the dialog and then press the desired property button (Mark Fill Effect, Mark border, Line Props or Mouse response).

Back in the legend general tab you can also specify to additionally inflate the legend backplane in pixels (Inflate width and Inflate height).

The Base & Shadow tab shows the properties relevant to the legend base, the legend shadow and the legend grid lines.

The Marks & Texts tab displays the properties that control the mark size of the legend items in pixels (Mark size edit) as well as the text offset from the right side of the mark (Text offset edit control). The Text Props... button invokes the NTextEx object runtime dialog.

Finally the Position tab allows to specify the legend position in the control window. X Margin and Y Margin edit controls define the legend margins in percents of the control window width and height respectively. After you set the legend margins you can choose how the legend will be aligned relatively to the margins. This is accomplished witt the help of the Horizontal align and Vertical align combo boxes on the top left side of the property pages. The possible values for the Horizontal align are Center, Left and Right and Center, Top, Bottom for the Vertical align respectively.

You can also instruct the legend to scale to a size relative to the control window. This can is achieved by enabling the legend to stretch its width and height (Stretch width and Stretch height check boxes) and then specifying the legend dimensions in percents of the control window width and height - Width % and Height % edit controls.

For more information see the topic "Configuring the legend" in the User's Guide.


Axis Property Sheet

Axis Property Page Sheet

The Axis Property Sheet supplies the user with a visual interface to edit the properties of one of the six chart axes. This property sheet can be invoked from the Axes Property Page or programmatically with the help of the ShowDialog method of the NAxis object. The sheet consists of the following property pages:

  1. General

  2. Ticks

  3. Gridlines

  4. Title

  5. Scale

  6. Position

  7. Stripes

  8. Const Lines

  9. Labels

  10. Paging


Axis General Property Page

The Visible Check controls the visibility of the axis

The Axis Appearance Controls Group defines the appearance of the axis. When the Width is equal to 0 the axis is visualized with the line properties accessible with the help of the Properties button. Otherwise the user is also able to apply fill effect and material on the axis with the help of the Fill Effect and Material buttons.

The Texts Controls group defines the appearance of the axis texts. The Text Properties button shows a dialog trough which you can control the visual appearance of the axis texts. When you check the Stagger Texts check box axis texts are displayed in a stagger manner. The distance between two adjacent texts is determined by the value specified in the Offset edit, while the number of stagger levels can be controlled with the help of the Levels edit. Staggered texts are very useful if you want to avoid axis text overlapping.

For more information see the Axes Topic in the User Guide.


Axis Ticks Property Page

From this property page you can control the appearance of the axis ticks. The Inner Length and Outer Length edits specify the length of the inner and outer major ticks.

The Inner Line Props and Outer Line Props buttons show the dialogs controlling the appearance of the inner and outer ticks.

The Minor Ticks control group controls the appearance of the minor ticks axis ticks. From the Length edit you can specify the length of the minor ticks while the Line Props button shows a visual interface helping you to edit the line properties of the minor ticks. The Count edit determines the number of minor ticks displayed between two major ones.

See the Axes topic for more information.


Axis Gridlines Property Page

This property page helps you control the major and minor gridlines of the axis. Major gridlines are synchronized with the major axis ticks, while the minor gridlines are synchronized with the minor axis ticks. Gridlines can be visualized in two modes. When the Width edit is set to 0 the gridline is visualized as a simple line with the line properties accessible from the Border Properties button. Otherwise the gridlines can be visualized with Fill Effect and Material properties.

From Show at Wall check list box you can select the chart wall on which the gridlines will be displayed.


Axis Title Property Page

This property page supplies you with a visual interface to edit the title of the axis. The title string is entered in the Title edit control. The Title Properties button displays the properties applied on the title string.


Axis Scale Property Page

This property page controls the scale mode in which the axis operates. The current scale mode is determined by the currently active scale mode tab.

  1. Dimension Scale Mode.

    From this tab you can control the properties of the axis when it operates in dimension scale mode (the default scale mode for the Categories and Series axes). In this scale mode the axis is showing the labels of the corresponding NAxisParameterCollection (see the Axes topic for more information). The Number of data points between ticks edit specifies the number of data points between two major axis ticks. By default this values is set to 1. You may increase this value if for example you want to display several categories between two axis ticks. The Display data points between ticks check determines the position of the data point relative to the axis ticks. By default the data point is positioned between two axis ticks but if you uncheck this check the data points will be positioned exactly on the tick marks.

  2. Value Scale Mode

    From this tab you can control the properties of the axis when it is operating in value scale mode (the default scaling mode for the four vertical axes). The Range group controls the value range covered by the axis ruler. By default the minimal and maximal values of the ruler are automatically calculated from the presentation groups displayed on this axis. You can override this behavior by specifying custom min and max values. The Step of the axis is also automatically determined by default. With the help of the Max Tick Count edit you can control the density of the automatic axis step. Although the actual number of ticks generated by the axis step algorithm may not be equal to the value specified in this edit control it is guaranteed that it will never exceed it. You can also manually specify the step of the step of the axis ruler when you uncheck the Automatic Step check. The Round To Tick check instructs the axis to exactly begin and end on tick values. The Format String combo defines the format string used to display the axis ruler values (see the Formatting Commands topic for more information).

  3. Logarithmic Scale Mode

    This scale mode is similar to the Value scale mode, but the ruler values increase in logarithmic manner. You can override the default min and max values of the axis with the help of the Automatic Min, Automatic Max, Min and Max controls. The step of the logarithm scale mode can operate in several two modes. The first one is Exponent - in this scale mode the user is only able to control the densisty of the ruler axis ticks with the help of the Max Tick Count edit. When the step is configured to operate in Fixed mode (from the Step Mode combo) the user can also manually specify the step of the axis ruler. From the Base edit you can specify the desired base of the logarithm used to produce the axis scale. The Round To Tick and Format String controls perform the same functions as in Value Scale mode.

  4. DateTime Scale Mode

    Internally the DateTime Scale mode is the same as the Value Scale mode. Nevertheless we have decided to create a separate scale mode page for the date time, because we wanted to provide the user with a better visual interface to edit the manual date time min, max and step values. See the Axes topic for more information.

Independent from the axis scale mode you can invert the scaling order of the axis ruler with the help of the Inverted check located at the left bottom corner of the Scale Property Page.


Axis Position Property Page

figure 1

This property page controls the position of the axis. The position of the axis can be controlled in two aspects - dynamic and static.

The static axis positioning includes the start and end of the axis ruler as well as the offset of the axis from the origin position determined by the component. The Start % and End % edits specify the begin and end of the axis ruler in percents of the original axis length. For the vertical axes the initial length is the chart height, for the categories axis the initial length is the chart width and for the series axis this is the chart depth. You can change the start and end percents of the axis ruler if you want to split the chart (see the Axes topic for more information). The Offset edit specifies the offset of the axis from the original position determined by the component.

On the other hand dynamic axis position can be used to position the axis at some value represented by the other axes. The axes on which you can position a certain axis depend on the axis itself. The four vertical axes can be positioned at values displayed by the categories and series axes. The categories axis can be positioned at values displayed by the four vertical axes and the series axis. The series axis can be can be positioned at values displayed by the four vertical axes and the categories axis. By default dynamic axis positioning is not used.

You turn on dynamic axis positioning for a particular axis by turning On the Mode for this axis. As you can see on figure 1 the left axis X position is synchronized with value 0 of the categories axis (the Mode Combo is set to On), while the Y position of the left axis is not synchronized with any value of the series axis (the Value is ignored if the Mode Combo is set to Off).


Axis Stripes Property Page

This property page supplies the user with a visual interface for editing the strip lines displayed by the axis. With the help of the Add, Delete and Properties buttons you can add, delete and edit the axis stripes. The Stripes Grid displays the currently created strip lines. See the Axis Stripes topic for more information.


Axis Const Lines Property Page

This property page supplies the user with a visual interface for editing the const lines displayed by the axis. With the help of the Add, Delete and Properties buttons you can add, delete and edit the axis const lines. The Const Lines Grid displays the currently created const lines. See the Axis Const Lines topic for more information.


Axis Labels Property Page

This property page supplies the user with a visual interface for editing the labels displayed by the axis. With the help of the Add, Delete and Properties buttons you can add, delete and edit the axis labels. The Labels Grid displays the currently created strip lines. See the Axis Labels topic for more information.


Axis Paging Property Page

This property page supplies the user with a visual interface for editing the axis paging. For more information about axis paging please take a look at the Axis Paging topic.

The controls in the Paging Group determine the size of the axis pages. From the Paging Mode Combo Box the user specifies the axis paging mode. When it is set to Fixed Page Count the user specifies only the total numbers of pages that the axis will have. The actual size of the pages is determined by the total axis scale. On the contrary - when the page mode is set to Fixed Page Size the user specifies the size of the pages, but the actual number of pages varies depending on the total axis scale.

The controls in the Current Page Group determine the first page that is displayed by the axis. When the Current Page Mode Combo is set to Value the user specifies the value from which the page displayed by the axis should begin. When the Current Page Mode is set to Index then the user specifies the index of the current page.


Presentation Groups Property Pages

resentation Groups Property Pages

Each presentation group has a visual interface which can be shown from the Presentation Groups Property Page or programmatically with the help of the ShowDialog method of the NPresentGroupCommon object. Some of the property pages are common for all presentation groups. In general they are used to visually expose the functionality of the NPresentGroupCommon object attached to every presentation group. The common property pages are:

  1. General

  2. Marks

  3. Uniform Appearance

  4. Legend

Apart from the common property pages each presentation group has group specific properties, which are visually exposed from one or more property pages. The following table summarizes the property pages of each presentation group

Presentation Group

Property Pages

Bar

  1. Options

  2. Secondary Vertical Axes

  3. Level Origin Values

Stack Bar

  1. Options

Area

  1. Options

Stack Area

  1. Options

Line

  1. Options

Stack Line

  1. Options

Surface

  1. Options

  2. Palette

Point

  1. Options

Bubble

  1. Options

Stock

  1. Options

Float Bar

  1. Options

Pie

  1. Options

Doughnut

  1. Options

  2. Custom Ring Radius

  3. Custom Ring Begin Angle

  4. Custom Ring Detachment

Radar

  1. Options

Polar

  1. Options

Shmoo

  1. Options

High Low

  1. Options

Map

  1. General

  2. Shapes

Arrow

  1. Options

Error

  1. Options

Error Bar

  1. Options

Smooth Line

  1. Options

Function

  1. Function

  2. Options


Present Group General Property Page

The Visible check controls the visibility of the presentation group.

The Name edit specifies the name of the presentation group. The legend of the component can be configured to show this string.

The Range controls group is used to determine the range of values from the data storage on which the presentation group operates. When you check the InfininteX, InfininteY and InfiniteZ checks the component ignores the respective end coordinate and replaces it with the current size of the appropriate dimension. In this way if you modify the size of the data storage you will not have to manually set the ending coordinate each time. See the Data Storage topic for more information about ranges.

From the Display on Vertical Axes check listbox you can select the axes on which you want to display this presentation group. By default all presentation groups are initially scaled on the left chart axis.

The Inflate Margins check is used to inflate the margins of the presentation group in order to fit it in the chart area of the chart. You may consider checking it if you intend to display presentation groups that you expect to go out of the chart area (bubble charts for example).


Present Group Texts Property Page

Present Group Marks Property Page

This property page controls the marks displayed on each data point. The Mark Type combo box controls the style of the the marks displayed on each data point. When it is set to Text the property page has the following outlook:

1. Marks displayed as texts

A line is connecting each data point and the data point text. The user can control the length of the line and the line properties with the help of the Length and Properties controls.

The Text Properties button invokes a dialog trough which you can control various properties of the data point texts including: font, font size, font style, frame, frame background and others.

When the Mark Type combo is set to Annotation the property page has the following outlook:

2) Marks displayed as annotations

From the Annotation properties button you can invoke a dialog trough which you can control the appearance of the data point marks annotations.

Both mark types has some properties in common. Following is a brief description of them:

3) Common marks properties

The Format String combo specifies the formatting of the text displayed by the data point mark text. See the Formatting Commands topic for more information about the supported formatting commands.

The Data Points Between Marks edit sets the number of consecutive Marks to be drawn. Setting this property to two will draw every other mark, to three every third etc.

The Uniform Marks check is of special importance. When it is checked the marks are displayed in an uniform matter. On the other hand when it is unchecked the user can apply different appearance settings on the individual data point marks. The appropriate settings (for text or annotation) are extracted from the respective data point property (accessible with the help of the TextEx or Annotation methods of the NData object). These properties are available in all minor 6 data types.


Present Group Appearance Property Page

This property page controls the uniform appearance of the presentation group. See the Uniform Appearances topic for more information about the usage of Uniform Appearances.

If the Enable Uniform Appearances is checked then the uniform appearance of the presentation group are enabled and the data points are displayed with the fill effect, material and border properties of the NAppearance objects displayed in the grid.

The Add and Delete buttons add and delete appearances from the grid.

The Fill Effect, Material and Border buttons show the fill effect, material and border of the selected appearance.

The Label of the appearance can be directly edited in the grid. The legend of the component can be configured to show the uniform appearances of the presentation group.


Present Group Legend Property Page

This property page controls the appearance of the presentation group in the chart legend.

The Show In Legend check determines whether the presentation group is at all displayed in the chart legend.

The Legend Mode Combo specifies what information about this presentation group will be displayed in the legend of the chart.

The Format String Combo specifies the formatting of the legend texts. See the Formatting Commands topic for more information about the supported formatting commands.

See the Configuring the Legend topic for more information about the chart legend.


Bar Options Property Page

From this property page you can control basic bar chart options.

The Width Percent and Depth Percent control the size of the bars in percents of the chart floor grid cell.

The Gap Percent edit controls the distance between two adjacent bars in percents of the chart floor grid cell, when the bar chart shows more than one data level (multi column chart).

The Style combo specifies the current shape of the bars. When the Style combo is set to Smooth Edge Bar the user can control the size of the bars in percents of the bigger bar dimension (width or depth) with the help of the Edge Percent edit. The Bottom Edge and Top Edge checks control whether the top and bottom edges are displayed in cut edge or smooth edge style when the Style combo is set to Cut Edge Bar or Smooth Edge Bar.

The Has Join Lines check controls the visibility of the join lines connecting each two adjacent bars. The Join Line Properties button invokes a dialog trough which the user can control the appearance of the join lines.


Bar Secondary Vertical Axes Property Page

This property page is used to specify the secondary scale axes for particular levels in the data storage. This feature is very useful if you intend to show multi column charts where the different columns have different measures (a typical example is the dollar - unit sales chart).

By default all bar columns are scaled on the primary presentation group axes (specified in the General Property Page). You can override this behavior by specifying a secondary axis for a particular level from the data storage (each column represents data from a different level).

Although the presentation group can have multiple primary axes, the secondary axis for a particular level can be only one. The component will not allow you to specify two secondary axes for one level.

See the Creating Bar Charts topic for more information.


Bar Level Origin Values Property Page

By default all bars are displayed with origin 0 (all bars begin from this value). You can change the origin value of a particular bar by assigning an origin value to the data level it represents.

For example the image on the screenshot demonstrates how you can set the origin values of the first and third bars to 10 and 20 respectively.

If you want the bars to begin from the minimal value possible for the corresponding data level they represent you can turn the Level Origin Mode to Off.

See the Creating Bar Charts topic for more information.


Stack Bar Options Property Page

This property page controls basic Stack Bar options.

The Width Percent and Depth Percent control the size of the bars in percents of the chart floor grid cell.

The Style combo specifies the current shape of the bars. When the Style combo is set to Smooth Edge Bar the user can control the size of the bars in percents of the bigger bar dimension (width or depth) with the help of the Edge Percent edit. The Bottom Edge, Top Edge and Middle Edge checks control whether the respective edge should be displayed in cut edge or smooth edge manner. The Round Last Visible check instructs the chart to round the last visible stack of the stack pile when the style of the bars is either bsSmoothEdgeBar or bsCutEdgebar.

The Stack Style combo is used to specify the current stacking style. When the stack style is set to Stacked the Stack Bar displays a normal stack bar chart. When the stack style is set to Stacked Percent the stack bar displays a 100% stack chart (each bar represents the contribution to the overall stack bar sum).

The Has Join Lines check controls the visibility of the join lines connecting each two adjacent stack bars. The Join Line Properties button invokes a dialog trough which the user can control the appearance of the join lines.


Area Options Property Page

This property page controls basic Area Chart options.

The Depth Percent edit controls the depth of the area in percents of the chart floor grid cell depth.

By default the areas use origin value 0 (all areas begin from the 0). You can set a manual origin value or use no origin at all when you uncheck the Use Origin check. In this case the areas will begin from the minimal value of the presentation group.

The Drop Lines check controls the visibility of the area segment separation lines.

When the Stairs check is checked the area is displayed in stairs mode.

When the Use X Value check is checked the Value2 property of each data point is interpreted as X coordinate of the data points.

See the Creating Area Charts topic for more information.


Stack Area Options Property Page

This property page controls basic Stack Area Chart options.

The Depth Percent edit controls the depth of the area in percents of the chart floor grid cell depth.

The Stack Style combo is used to specify the current stacking style. When the stack style is set to Stacked the Stack Area displays a normal stack area chart. When the stack style is set to Stacked Percent the stack area displays a 100% stack chart (each area represents the contribution to the overall stack area sum).

The Drop Lines check controls the visibility of the area segment separation lines.

See the Creating Stack Area Charts topic for more information.


Line Options Property Page

From this property page you can control basic line chart options.

When you check the Use X Value check the X position of each data point is taken from Value2.
When you check the Use Y Value check the Y position of each data point is taken from Value3.

The Line Style combo specifies the shape of the line segments.

The Line Width edit specifies the width of the line segments when they are visualized as Tape or Tube.

When the Stairs check is checked the line is displayed in stairs mode.

The Has Value Points check controls the visibility of the data points marks. You can control the shape and the size of the marks with the help of the Point Style and Point Size controls.

See the Creating Line Charts topic for more information.


Stack Line Options Property Page

From this property page you can control basic stack line chart options.

The Line Style combo specifies the shape of the line segments.

The Line Width edit specifies the width of the line segments when they are visualized as Tape or Tube.

When the Stairs check is checked the line is displayed in stairs mode.

The Has Value Points check controls the visibility of the data points marks. You can control the shape and the size of the marks with the help of the Point Style and Point Size controls.

The Stack Style combo is used to specify the current stacking style. When the stack style is set to Stacked the Stack Line displays a normal stack line chart. When the stack style is set to Stacked Percent the stack line displays a 100% stack chart (each line represents the contribution to the overall stack line sum).

See the Creating Stack Line Charts topic for more information.


Surface Options Property Page

This property page controls basic surface options.

When you check the Draw Flat check the surface is displayed in flat mode (contour chart). In this mode you can control the vertical position of the contour with the help of the Position Mode and Position Value controls.

The Frame Style combo controls the style of the surface frame. When set to Mesh the component displays the mesh grid of the surface. The Contour mode displays lines at particular elevations separating the surface elevation zones. The MeshContour mode is a combination of the Mesh and Contour modes. The Dots mode displays dots at the data points.

The Palette Frame check enables the palette filling of the surface frame. If the palette filling of the frame is disabled the frame is displayed with the line properties controlled from the Frame Line button.

The Fill Style combo controls the filling of the palette. When set to Mesh each surface rectangle is individually filled. In this mode the user can apply custom fill effects on individual data points and use the uniform appearance of the surface to fill the surface. When the fill style is set to Zone the surface is displayed with zones highlighting the surface elevations. In this mode the surface is displayed only with palette filing.

The Palette Filling check enables the palette filling of the surface when the Fill Style is set to Mesh.

With the help of the Use X Coordinate and Use Y Coordinate the user can switch the surface in a mode in which the user manually sets the X and Y coordinates of the surface data points. In this mode the Optimize Triangulation check is also enabled and controls whether or not the chart should attempt to optimize the surface triangulation.

With the help of the Surface Holes check the user controls whether the surface holes must be displayed or not.

The Surface Side controls group controls the appearance of the area surrounding the surface.

The Visible Check controls the visibility of the surface sides.

The Fill Effect, Material and Border buttons invoke dialogs trough which the user can control the appearance of the surface sides.

The Use Origin Check and the Origin Value edit control the origin of the surface sides.

See the Creating Surface Charts topic for more information.


Surface Palette Property Page

This property page controls the palette applied on the surface filling and frame.

By default the surface is filled with an automatic palette, which is synchronized with the primary scale axis of the surface. You can specify a custom palette if you uncheck the Automatic check.

Turning on the Smooth check will smoothly gradient the palette on the surface.

The Transparency scroll helps you control the transparency of the palette.

See the Creating Surface Charts topic for more information.


Point Options Property Page

This property page controls basic Point Chart options.

The Style Combo specifies the shape of the points.

The Size edit controls the size of the points in OpenGL units.

When the Use X Value is checked Value2 is used as X position of the data points.

When the Use Y Value is checked Value3 is used as Y position of the data points.

See the Creating Points Charts topic for more information.


Bubble Options Property Page

This property page controls basic Bubble chart options.

The Style combo specifies the shape of the bubble.

The Max Bubble Size edit controls the size of the maximal bubble in OpenGL units.

The Min Bubble Size edit controls the size of the minimal bubble in OpenGL units.

See the Creating Bubble Charts topic for more information.


Stock Options Property Page

This property page controls basic options of the Stock present group.

When the Use X Value is check Value6 is used as X position of the data points. This is very useful if you want to display date time stock charts.

The Style Combo controls the shape of the Open - Close candle. When it is set to Stick the user is able to show and hide the open and close values with the help of the Show Open and Show Close check boxes.

The Width edit specifies the width of the candle. The Depth Percent edit specifies the depth of the candle in percents of the chart floor grid cell.

The Show High Low check controls the visibility of the line connecting the high and low values.

The Has Volume check shows the traded volume bar.

The Volume Style combo specifies the shape of the traded volume bar. When it is set to Smooth Edge Bar the user is able to control the edge percent with the help of the Edge Percent edit.

The Width edit specifies the width of the volume bar. The Depth Percent edit specifies the depth of the volume bar in percents of the chart floor grid cell.

The Axis combo specifies the axis on which the traded volume bars will be scaled. This is necessary, because the traded volume values have a different measure from the Open - Hi - Low - Close values.

The Use Origin check and the Origin edit help you control the origin value of the traded volume

See the Creating Stock Charts topic for more information.


Float Bar Options Property Page

This property page controls basic options of the Floating Bar Chart.

The Width Percent and Depth Percent control the size of the bars in percents of the chart floor grid cell.

The Style combo specifies the current shape of the bars. When the Style combo is set to Smooth Edge Bar the user can control the size of the bars in percents of the bigger bar dimension (width or depth) with the help of the Edge Percent edit.

The Bottom Edge and Top Edge checks control whether the top and bottom edges are displayed in cut edge or smooth edge style when the Style combo is set to Cut Edge Bar or Smooth Edge Bar. See the Creating Floating Bar Charts topic for more information.


Pie Options Property Page

This property page controls basic options of the Pie Chart.

The Depth edit controls the depth of the pie segments.

The Radius edit controls the radius of the pie.

The Begin Angle controls the begging angle of the first pie. By default 0.

The Total Angle controls the total angle (in degrees) in which pies are displayed.

The Order Mode combo controls the way in which pie slices are ordered.

The Style combo specifies the shape of the pie segments.

The Edge Percent edit specifies the size of the pie segments shape in percents of the pie depth dimension.

The controls in the Grouping group control various aspects of the grouped pie slice. The user can group the slices according to two criteria. The first is to group the slices which are below a certain value and the second is to group the slices which are below a certain percent. In both cases the percent or value is specified with the Value edit. Since the group slice does not represent a data point from the data storage the user must manually set the properties that the component extracts from the data storage in the case of a normal pie. In this sense the Label, Detachment, Fill Effect, Material, Border, Annotation, Text Ex and Mouse Response controls are self explanatory.

See the Creating Pie Charts topic for more information.


Doughnut Options Property Page

This property page exposes basic doughnut presentation group parameters. For more information about the doughnut presentation group please refer to the Creating Doughnut Charts topic.

From the Doughnut Style combo box the user controls the style of the doughnut segments. If it is set to segment the doughnut is displayed in 2d manner. If it is set to Torus the doughnut segments are visualized as toruses.

The Default Ring Radius edit specifies the radius of the doughnut rings. The user can override this on a per ring basis from the Custom Ring Radius property page.

The Default Ring Begin Angle edit specifies the begin angle of the ring segments. The user can override this on a per ring basis from the Custom Ring Begin Angle property page.

The Begin Radius edit controls the radius from which the first ring begins.

The Default Ring Detachment controls the default distance between the ring segments.


Doughnut Custom Ring Radius Property Page

From this property page you can override the default radius of a specific ring. For example the property page above ring 1 has radius 0.2 while ring 2 has radius 0.5.

For more information about the doughnut presentation group please refer to the Creating Doughnut Charts topic.


Doughnut Custom Ring Begin Angle Property Page

From this property page you can override the default begin angle of a specific ring. For example the property page above ring 0 has begin angle 40 while ring 1 has begins from angle 60.

For more information about the doughnut presentation group please refer to the Creating Doughnut Charts topic.


Doughnut Custom Ring Detachment Property Page

From this property page you can override the default detachment between the rings. For example the property page above ring 0 has detachment 0.2 while ring 1 has detachment 0.5.

For more information about the doughnut presentation group please refer to the Creating Doughnut Charts topic.


Radar Options Property Page

This property page controls basic radar chart options.

The Style Combo controls the style of the radar. When it is set to Lines the component displays connection lines between the radar data points. When it is set to Filled Area the component fills the area surrounded by the line connecting the data points.

The X Radius and Y Radius edits control the X and Y radius of the radar plot area.

The Has Value Points check controls the visibility of the radar data point marks. The Point Style and Point Size are used to specify the data point marks shape and size.

The Category labels are displayed at the end of each radar axis (each radar axis is connected with a respective category). From the Properties... button the user can control the visualization properties of these labels. The distance between the radar axis end and the category label origin point is determined by the Offset edit. If you want to detach the category labels from the radar axes you must simply increase this value.

See the Creating Radar Charts topic for more information.


Polar Options Property Page

This property page controls basic polar chart options.

The Close Contour check control the visibility of the polar line segment connecting the last and the first polar points.

The Dimensions control group specifies the X and Y radius of the polar plotting area.

The Value Points control group controls the visibility, shape and size of the data point marks.

The polar plotting area has radian lines at specific angles. By default they begin from angle 0 and a radian line is displayed on every 30 degrees (the step of the radian lines). You can control the radian lines begin angle and angle step with the help of the Begin Angle and Angle Step edits respectively.

At the end of each radian line the component displays the angle that the line represents. The user can detach these texts with the help of the Offset edit. From the Format combo the user specifies the formatting string of the label values - currently the values can be formatted as degrees or radians. From the Properties button you can visually edit the label appearance properties.

The polar also supports a mode in which the labels of the polar represent geographical coordinates. This mode is called Wind - Rose labels. The user can enable this mode with the help of the Wind - Rose labels check. Because of the nature of the wind rose labels the user is restricted to show them with the following steps: 15, 30, 45 and 90.

By default the polar radians are increasing in a counter clockwise direction. The user can override this behavior with the help of the Clockwise Labels check.

See the Creating Polar Charts topic for more information.


Shmoo Options Property Page

This property page controls basic Shmoo chart options.

When you check the All Fail Hidden flag the shmoo chart will automatically hide all bits that have failed.

The Highlight First Fail check enables an algorithm which highlights the first fail bits for a particular dimension - the dimension is specified by the First Fail Type Combo.

See the Creating Shmoo Charts topic for more information.


High Low Options Property Page

This property page visually exposes basic High Low presentation group functionality.

When the Use X Value check is checked Value3 of each data point is used as X coordinate of the data point.

The Depth Percent edit controls the depth of the high low area in percents of the serie depth.

When the Drop Lines check is checked drop lines are displayed between the high low segments.

The Line Properties button invokes a dialog through which you can control the appearance of the drop lines.

For more information regarding the High Low presentation group please refer to the Creating High Low Charts topic.


Map General Property Page

From this property page the user can control basic Map Presentation group properties.

The Border Properties Button invokes a dialog trough which you can control the borders of the map shapes when the Map is using a palette.

When the Use Palette check is checked then the map uses a palette to fill the map shapes.

When Automatic Palette check is checked the map automatically creates the palette used for the filling of the map shapes. The user is able to control the number of entries in the automatic palette with the help of the Steps edit.

When the Smooth Palette check is checked the map gradients the palette on the map shapes.

The Palette Grid shows the palette entries in the custom palette.

The Transparency scroll controls the transparency of the palette.

For more information about the Map presentation group please refer to the Creating Map Charts topic.


Map Shapes Property Page

From this property page the user can visually edit the shapes displayed by the Map presentation group.

The Shapes List shows the currently created shapes. Shapes are added and deleted with the help of the Add and Delete buttons.

The Value edit shows the value of the currently selected map shape. This value is used when the shape must be filled with palette filling.

The Text edit shows the texts that is used to describe the map shape. The Map presentation group can be configured to show this text in the center of the map shape.

The controls in the Appearance Group are self explanatory - they help you specify the fill effect, material, border, mouse response, text and annotation properties of the map shape.

The Data Tab contains a grid trough which the user can specify the coordinates of the points describing the map shape.

For more information about the Map presentation group please refer to the Creating Map Charts topic.


Arrow Options Property Page

From this property page the user controls basic Arrow presentation group properties.

The Arrow Width edit controls the width of the arrows in OpenGL units.

For more information regarding the Arrow presentation group please refer to the Creating Arrow Charts topic.


Error Options Property Page

From this property page the user can control basic error chart parameters.

When Error Values In Percent is checked the errors are specified in percents of the base value.

The Error Style Combo defines the shape of the Error.

The Error Width % edit specifies the width of the error shape percent in percents of the category size.

The Line Style Combo controls the shape of the error.

The Line Width edit controls the width of the error shape in OpenGL units.

For more information please refer to the Creating Error Charts topic.


Error Bar Options Property Page

This property page provides the user with control over some basic error bar properties.

The Width Percent Edit specifies the width of the error bars in percents of the categories width.

The Depth Percent Edit specifies the width of the error bars in percents of the serie depth.

The Line Style Combo specifies the style of the error line.

The Line Width Edit specifies the width of the error line in OpenGL units.

The Bar Style Combo specifies the shape of the error bars.

When the bar style is set to Smooth Edge Bar or Cut Edge Bar the user is able to control the size of the edge with the help of the Edge Percent edit and also control whether the top and bottom edges of the bars are displayed in smooth or cut edge manner respectively.

For more information regarding the Error Bar presentation group please refer to the Creating Error Bar charts topic.


Smooth Line Options Property Page

From this property page you can control specific options for the smooth line chart.

When you check the Use X Value checkbox the X position of each data point is taken from Value2. Besides that, the 2D Interpolation checkbox is enabled and you can select interpolation method for the curve.

The Line Style combo specifies the shape of the line segments.

The Line Width edit specifies the width of the line segments when they are visualized as Tape or Tube.

The Smoothness edit box can be used to increase or decrease the smoothness of the line.

The Has Value Points check controls the visibility of the data point marks. You can control the shape and the size of the marks with the help of the “Point Style” and “Point Size” controls.

See the Creating Smooth Line Charts topic for more information.


Function Property Page

To add an argument, press the Add button. The Category Range Properties dialog appears and you can set the name of the argument and edit the range of values with which this argument is associated.

The Name edit box contains the name of the argument. The argument names must consist of alphabetic characters, digits and underscores, but cannot start with a digit. The argument names are unique inside the collection. The other fields of this dialog box control the properties, which define the argument range.

You can edit the argument properties of an already existing argument by selecting the argument in the grid and pressing the Edit button.

The Delete button removes selected arguments and the Remove All button removes all the arguments from the grid.

The Function Expression edit field contains the formula, which will be calculated and displayed by the presentation group. The expression syntax is described in the Creating Function Charts topic of the documentation.

The Load Predefined Function button shows a list of standard predefined expressions and a short description for each function. You are able to select one of the predefined functions. The selected function will load its expression into the Function Expression edit box and will add the necessary arguments in the grid. Of course, later you can edit them according your needs.

The X Position Range and Appearance Range combo boxes both contain the names of the current arguments. From the X Position Range combo you can select the range with which the function will synchronize its x-axis position. The Appearance Range combo selects the source range for data item labels and line appearances. If you want assign an individual appearance to every line segment of the function line, you have to select an appearance range and disable the uniform appearances for the presentation group.

When you check the Use X Value checkbox the X position of each data point is taken from the range selected in X Position Range. To specify exactly which value of that range is the x-value use the X Value Type combo box.


Function Options Property Page

From this property page you can control specific options for the function line chart.

The Line Style combo specifies the shape of the line segments.

The Line Width edit specifies the width of the line segments when they are visualized as Tape or Tube.

The Has Value Points check controls the visibility of the data point marks. You can control the shape and the size of the marks with the help of the Point Style and Point Size controls.

The Y Position Value edit box specifies the value on the series axis at which the function line is positioned. The Y Alignment combo specifies the alignment of the line to the position value.

See the Creating Function Charts topic for more information.


Line properties Dialog

This dialog helps you to visually edit the properties of lines and borders. It has the following interface elements:

Enable Lines Check – controls the visibility of the line

Color Combo – shows the color of the line

Width Combo – shows the width line style

a tab control for choosing between the Standard or Custom modes for the line. In custom mode you can visually edit the line pattern and modify the line factor. In standard mode you can choose from several predefined line styles.

Antialiasing Combo - defines how the line must synchronize with the general line antialiasing settings.

Grayscale Combo - defines how the line must synchronize with the general line grayscale settings.

The preview at the bottom of the dialog shows how the line will look if you press the Ok button.


Material properties Dialog

From this dialog box you modify the material properties of the specified object. The properties include the ambient, diffuse, specular and the emissive colors of the material as well as the shininess. For more information on lighting see the OpenGL lighting model topic.


Predefined projections Dialog

This dialog shows the predefined projections. Click on the desired projection to see a brief description of the projection parameters. The preview window on the left side shows how your control will look with the selected projection. Press Ok to confirm your selection.


Print preview dialog

From here you can modify the print margins, the current printer and it’s configuration and to change the number of copies being printed.

To change the paper orientation use the Portrait and Landscape radio boxes located on the left side of the Print preview dialog.

There are two ways to control the printer margins. The first one is through the spin controls that are on the right side of the margin edit controls. When you change the margins they automatically reflect the print preview image. You can also use the mouse to change the margin values. Go on the desired margin line and when the cursor changes press the left mouse button and begin dragging the margin line until you reach the desired position. Note that the mouse cursor changes to a hand when the cursor is above the control image. This indicates that you can now change all the margins simultaneously. Use the Reset to set the margins to their original values. The Proportional button synchronizes the margins with the control’s dimensions.

When you change the margin values the preview of the control image may not be up to date. To recreate the preview image press the Refresh preview image button.

The Show margins check hides or shows the margin lines.

The Quality % allows you to modify the printer quality percent parameter. By checking the Automatic quality check you instruct the component to automatically compute the best quality percent based on the resolution of your printer.

The Scale 2D fonts indicates whether 2D should be scaled when printing with a better quality. For more information see the NPrintManager topic as well as the topic related to printing in the User's Guide.


Print progress Dialog

This dialog provides a visual feedback to the user about the print progress. It also displays the printer name that the control is currently printing on. Click on the cancel button if you want to interrupt the printing.


Predefined Palettes Property Page

From this property page the user can select from one the predefined palettes that come along with the component. The Palettes list displays the available palettes. The currently selected palette is displayed in the palette preview.


Custom Palettes Property Page

From this property page the user can select one of the custom palettes to be the current palette displayed by all solid color selection dialogs of the component. The Add button invokes the add new palette dialog:

from where you specify the name of the new custom palette.

After the custom palette has been added you can modify the colors it contains with the help of the Modify Color... button.

The user can delete the currently selected custom palette by clicking the Delete button.


Select fill effect Dialog

This dialog allows you to control the fill effect applied on various objects in the 3D scene as well as the background. The dialog has six property pages each of them corresponding to the different types of fill effects. The following links will direct you to a detail description for each property page:

Color

Gradient

Texture

Animated texture

Pattern

Advanced gradient

The Advanced... button shows the Advanced fill effect properties dialog.

The Transparency scroll bar allows you to modify the transparency of the fill effect. A value of 0 means complete opacity whereas a value of 100 means complete transparency.

The Antailiasing combo defines how the fill effect will synchronize with the general polygon antialiasing settings. When this value is Synchronize with control the fill effect will use the general settings. You can also override the general settings by explicitly stating that the fill effect must use or not use antialiasing (Use antialiasing and Do not use antialiasing values).

The Grayscale combo defines how the fill effect will synchronize with the general grayscaling settings. When this value is Synchronize with control the fill effect will use the general settings. You can also override the general settings by explicitly stating that the fill effect must use or not use grayscaling (Use grayscale and Use color values).


Color Property Page

From this property page you can choose the solid color associated with the fill effect. The page shows the Windows basic colors.

Select the Automatic radio button if you want to synchronize the color with the current Windows settings for a window background. The color will automatically change when you change the Windows Appearance settings.

Press the Choose Color... button to select a color more precisely using the standard windows color selection dialog.


Gradient Property Page

From this property page you can choose the gradient associated with the fill effect. Currently there are 6 shading styles. Each of them has 4 variants (except the From Center shading style). Use the radio buttons to choose the desired shading style and the variant selection window to specify a variant.

The Begin and End color combos at the top of the property page show the colors being merged into a gradient. When you press them a color selection window will appear.


Texture Property Page

From this property page you can choose the texture associated with the fill effect.

To a add a new texture to the texture gallery press the add button and the Add image to gallery dialog will appear:

Specify the path to the texture file to the texture file in the file name edit by pressing the "..." button. The supported texture file formats are - JPEG, PNG, GIF, TARGA, TIFF, BMP, DIB and WMF (Windows Metafile).

The Add permanently to gallery check box indicates whether the image information (path and alias) should be stored in the registry.

Use the "+" and "-" buttons to zoom in and out the image gallery.


Animated Texture Property Page

From this property page you can choose the animation associated with the fill effect.

To a add a new animation to the animation gallery press the add button and the Add animation to gallery dialog will appear:

Specify the path to the animation file in the file name edit by pressing the "..." button.

The Add permanently to gallery check box indicates whether the animation information (path and alias) should be stored in the registry.

Use the "+" and "-" buttons to zoom in and out the image gallery. The "play" and "stop" buttons allow you to play the animation.

Warning! Use the video speed with caution. Low delay values may seriously impact the ability of the system to process messages and other user input. In general try to map smaller AVI files and use animated textures only if you have a fast processor.


Pattern Property Page

From this property page you can choose the pattern associated with the fill effect.

Use the Background and Foreground color combos to adjust these pattern parameters. The Default color Background color is black and the default Foreground color is white.


Advanced gradient Propety Page

Advanced gradient Property Page

Press the Add to add a new advanced gradient to the custom gradient collection. The Advanced gradient editor dialog will appear:

from this dialog you can edit the points and the background color of the advanced gradient. The Current point edit shows the current point. The point properties are displayed above the and you can modify them by changing the point position, style, color, intensity and angle. The preview window on the left side will immediately reflect all changes applied on the gradient. You can also modify the position of the points by simply dragging them in the preview window. Note that the current active point will also change accordingly.

The Background color combo allows you to change the default (background) color of the gradient. This color is then merged will the colors of the points to produce the final gradient.

When you check the Add permanently to gallery check the advanced gradient will be stored in the registry and will be listed in the Advanced gradient collection of the control the next time you launch it. This feature is very important if you want to preserve some very complex advanced gradients and store them for reuse.

When you click Ok the changes to the advanced gradient will be applied and the modified gradient will appear in the advanced gradient collection. Back in the Advanced gradient property page you can delete an advanced gradient from the collection by selecting it and then pressing the Delete button. You can also edit existing gradients by selecting them and then pressing the Edit. This will again launch the Advanced gradient editor dialog and you'll be able to modify your gradient.

The + and - buttons zoom in and out respectively the advanced gradient gallery.

If you want to take advantage of the build-in (or predefined) advanced gradient just select a predefined advanced scheme from the Current scheme combo. Each predefined scheme has 15 variants.


Advanced fill effect properties Dialog

This dialog enable you to apply advanced mapping and layout features to the fill effect. It contains two property pages:

1. The Mapping property pages show the texture mapping and layout properties of the fill effect. These properties are relevant when the fill effect is a gradient, texture (image), animation, pattern or advanced gradient. The property page has the following outlook:

When the Use default check is checked then the fill effect will use the default mapping and layout properties for the selected fill effect type. Note that this properties can be different depending of the type of the fill effect. You can find more information on the default mapping and a detail description on the different mapping and layout modes in the Texture mapping control topic in the Users Guide.

The Mapping combo lists the mapping used to apply the fill effect. Possible values are Object linear, Eye linear and Shpere map. By default all fill effect types use Object linear.

The Layout combo allows you to select a layout used with the fill effect. The layout types are: Stretched, Fitted, Tiled, Centered, Stretched to Width, Stretched to height and Crop fitted.

The left side of the property page shows the transformation applied on the texture. You can chose different scaling along the X and Y dimensions of the texture (X Scale and Y Scale edit controls) as well as rotation angle around the center of the texture.

The Black texture background check instructs the fill effect how to fill the parts of the object not covered by the fill effect (if any). For example if you rotate your texture in stretch mode the corners of the object will not be covered by the texture. By default the rest of the object will be filled in black, but in case you want to change this color you must disable the Black texture background check and then select the desired color from the Color property page of the fill effect. Note that you should not change the type of the fill effect to color - to achieve this after you modify the color switch again to the Texture property page and then click Ok.

2. The merging property page exposes the functionality required to mix (or merge) several fill effect types together. This is a unique feature that closely resembles the layers in Photoshop for example. The following screenshot shows a configuration where the resulting fill effect is produced by adding together a gradient and a texture.

Note that the user has indicated a preference to texture component by setting its percentage value to 53%. The Lock check controls on the right side of the scroll bars indicate when you want to "freeze" the value of a particular layer in the resulting fill effect. The sum of the layer percents must be always equal to 100%. For more information on merging fill effects take a look at the Merging fill effects topic in the User's Guide.


Import\Export property sheet

The import export property sheet contains four property pages.

The Control state property page helps you to save and load the control state from a file, the clipboard or a URL.

The Control image property page gives you access to the image export functionality of the component.

The HTML and SVG property page exposes the export to HTML and SVG component capabilities.

The Advanced Export property page supplies the visual interface for exporting the chart data into text delimited, HTML or XML file format.

You can show the Import\Export property sheet by right clicking on the component and then selecting Import\Export from the popup menu.

You can also show the Import\Export property sheet at runtime via the ShowDialog member of the NImportExport object.


Control state Property Page

From this property page you can load and save the control state to and from a file or the clipboard. You can also load the control state from a URL (specified in the URL field).

The Load control dimensions check box instructs the control to load or discard the dimensions stored in the .nsv file you load from a file, URL or the clipboard.


Control image Property Page

From this property page you can save the control to an image file. You can choose the desired file format from the "Format" combo box. The supported formats are JPEG, PNG, Bitmap, Tiff and Targa. When you check the "Use Window Dimensions" check box the exported image will have the dimensions of the control window. Otherwise it will have the dimensions specified by the Width and Height edit controls.

The Options group is changing depending on the file format, because the different file formats support different options. For example PNG supports transparency but does not have parameters such as Quality like JPEG. The Bits per pixel allows you to adjust the color depth.

In PNG mode you can also save the PNG as a Nevron Image Map (.nim) file. These files are read from client side controls. For more information see the topics under the "Building Internet and Intranet Applications" book.


HTML and SVG property page

The HTML and SVG property page of the Import Export dialog consist of three property pages called General, Size and Image settings which allow you to control various aspects of the image map export like to the format, image color resolution and so on. At the bottom of the page are Map file name and Image file name edit controls specifying where the generated image map and adjacent image will be stored.

The following paragraphs describe the properties in each of the General, Size and Image settings property pages.

General property page

The Map format combo box defines the type of the exported image map. Possible values are HTML and SVG.

The Image format combo defines the format of the image associated with the exported image map. Possible values for this combo are BMP, JPEG and PNG. In the case of JPEG and PNG export you can also modify some settings specific for these image formats (like Transparency and Quality) from the Image settings property page.

The Client script combo defines the client side script used to encode the image map. For HTML image maps the control supports VBScript and JScript. SVG image maps can be created only using JScript scripts.

The Bits per pixel combo specifies the color depth of the generated image. Possible values for this combo box are 1, 4, 8, 16 and 24 bpp. Note that in the case of 1, 4, 8 bits per pixel the control will also automatically a color palette to the generated image.

The Use average color check box defines how grid cells of the image map should be snapped to an object in the 3D scene. If checked the control will use an use an algorithm that calculates the area covered by each object intersecting this grid cell and then snaps the cell to the object covering most of the area. Otherwise the component will just pick the middle cell point and associate the cell with the object covering this cell. Generally the produced image map is more accurate when you check this box. Note however that this algorithm is computationally expensive.

The Grid cell size defines the size of each image map grid cell.

The Save as Unicode combo box instruct the control to save the generated image map as Unicode. This feature is available only if you use the Unicode version of the control.

Size property page

When you check the Use Window Dimensions check box the generated image will have dimensions equal to the control dimensions in the container. Otherwise the control will use the dimensions specified by the Width and Height edit controls.

Image settings property page

This property page allows you to control some image specific settings when the generated image is JPEG or PNG. In the case of JPEG you can modify the Quality, Smoothing and Quantize parameters. In the case of PNG you can instruct the control to generate a transparent PNG.

For more information on image map export you can take a look at the following topics:

Exporting HTML and SVG Image maps - Describes how to automate the control to export HTML and SVG image maps using the NImportExport object.

Generating SVG content - Describes how to generated SVG image maps from ASP / ASP .NET scripts,

Image maps - Describes how to generated HTML image maps from ASP / ASP .NET scripts.


Advanced Export Property Page

NOTE: This property page is supported only by the 3DChart component.

The Export Mode combo specifies whether the entire data storage will be exported. When the data storage option is selected the property page has the following outlook:

When the presentation groups option is selected the property page has the following outlook:

The Presentation group grid shows the presentation groups, which the user can currently export. The user selects a specific presentation group for export by checking it's check.

The Options control group contains check boxes specifying whether the Categories, Series and Level names should be exported.

The Target Media combo specifies the advanced export media file format.

The user conducts the export by clicking the Save... button and specifying the name of the export file.

For mode information about the advanced chart export feature please take a look at the Advanced Chart Export topic in the 3DChart users guide.


Labels Property Page

The Labels Property Page exposes the functionality related with labels. It allows you to Add, Delete and Edit the labels displayed in the control window. A Label is a text that is displayed always 2D and overlaps all the other images displayed by the control. If two labels overlap the label that is closer to the top of the list overlaps the other one. You can control the label priority with the spin located on the right of the Delete button.

You can edit the text displayed by the labels directly in the Labels Grid.

The Add and Delete buttons add and delete labels from the label collection. The Properties button shows the text properties dialog for the selected label in the Labels Grid, while the Mouse Response button shows the mouse response properties of the selected label.

The Add Header and Add Footer buttons help you easily add labels for the header and footer of the component. Headers and footers are in fact normal labels that just have a predefined position in the control window.

The Horizontal and Vertical combo boxes control the position of the label origin point inside the control window. The Offset X and Offset Y edit controls specify the offset of the text from the origin point defined by the Horizontal and Vertical combo boxes. By default the origin point is positioned in the center of the control window with no offset (horizontal origin position = Center, vertical origin position = Center, offset X and offset Y are equal to 0).


3d View Property Page

Allows you to specify the polar coordinates of the camera, the zooming factor, the projection type, the X and Y offsets of the scene from the center of the control window and the viewer rotation angle. The camera always points towards the beginning of the coordinate system.

The Rotation and Elevation edit controls specify the polar coordinates.

The Zoom edit specifies the zooming factor. Possible values vary from 1 to 1000. The default value is 100. You should increase the zoom factor when you want to display a bigger 3D scene and decrease it respectively when you want to display a smaller image.

The Viewer rotation edit specifies the rotation of the viewer coordinate system. By default this value is 0.

The Offset X and Offset Y edit controls specify the offset of the scene from the center of the control’s window in percents of the window width and height respectively. For example if you want to display the 3D image in the upper left corner you should set a negative value for the X parameter and a positive value for the Y parameter.

The Projection type combo allows you to choose between perspective and orthogonal projections. In the case of a perspective projection you can also modify the perspective angle. The default projection type is perspective with angle 60 degrees. You can use the orthogonal projection in cases where you do not want perspective – for example when you want to display a 2D Chart, PieChart or Text. To achieve this select Orthogonal as the projection type and 90 as the Elevation degree – this will ensure that you look at the scene perpendicular to the XY plane.

When using the orthogonal projection type you can also take advantage of the X depth angle and Y depth angle parameters. In a normal orthogonal projection the Z value does not affect the projected X and Y coordinates. This is why you cannot achieve a 2 and half projection. The solution is by modifying the X and Y depth angle parameters. For example for a Z value of 1 and a value of 60 degrees for the X depth angle the pixel will have an offset of 0.5 along the X direction compared to a pixel that has a zero Z coordinate.

The Perspective Percent edit controls the perspective depth (giving you the feeling that an object is near or far from the camera), when the projection type is switched in perspective mode.

The Load predefined... button shows the Predefined projections dialog that displays a list of the predefined projections supported by the control.

The Preview shows a preview image of the selected projection. You can also speed up the process of selecting a proper projection by using the mouse and the different mouse modes supported by the control. Note that when you use the Trackball, Offset or Zoom tools the proper parameters on the right side are automatically updated.


Background Property Page

The Fill Effect button allows you to specify a fill effect for the background of the control.

The Frame button helps you specify a frame for the control window.

The Mouse Response button shows the visual interface of the NMouseResponse object assigned to the background, which controls the response of the component to various actions performed by the user with mouse.


Lights Property Page

From this page you can control the lighting applied to the scene. From the Light Model section you can turn on and off the lighting, the local viewpoint lighting and select a global ambient light.

When you check the Enable lighting check the light properties are applied to the scene. Otherwise all the properties regarding the light are discarded (e.g. materials, individual lights and global ambient light).

The Enable local viewpoint lighting check allows you to control the way OpenGL performs the lighting calculations or more specifically the specular angle of the lights. When the local viewpoint lighting check is off specular reflection angles take the view direction to be parallel to and in the direction of the –z axis, regardless of the location of the vertex in eye coordinates. Otherwise specular reflections are computed from the origin of the eye coordinate system. This check is off by default. You should use local viewpoint lighting only when you want to generate a more realistic scene, because it is more computationally expensive.

The Global ambient light color combo allows you to specify the global ambient light applied on the scene.

From the Light properties section you can control the parameters of each individual light. You can control the position, the direction (note that the direction vector is not applied if you use a uniform light distribution light) and the Ambient, Diffuse and Specular light components. The advanced tag allows you modify some advanced features of the light. For a more complete discussion on lighting see the OpenGL lighting model topic.


Events Property Page

The Events Property Page controls the way in which the user interacts with the control.

The first section of controls called Dragging groups together the controls responsible for configuring the mouse drag features of the component. The Drag mode combo allows you to choose from Disabled, Trackball, Zoom and Offset modes. In Disabled mode the control does not allow the user to change the current projection with the mouse. In Trackball mode the user can change the polar coordinates of the camera by dragging the mouse over the control window. In Zoom and Offset modes the user can modify the current zoom factor and offset of the scene respectively.

When you select some form of dragging from the Drag mode of combo you'll notice that the Draw filled objects while dragging and Draw texts while dragging check boxes are enabled. With their help you can modify the visual effects produced by dragging. For more information on this check out the "Mouse" topic in the User's Guide.

After the Dragging section comes the Mouse section. It contains five buttons. When you press one of them the component will show the Mouse modes dialog:

By checking some of the items in the check list control you enable a particular function of the component. For example the above dialog shows the possible actions that can be performed by the control when the user right clicks on the component window. You can select any combination, but you must keep in mind that some actions can be controversial - for example a begin drag operation combined with browser redirection sometimes can not lead to the desired result (most likely the HTML contents will change before you're able to drop on the drop target). A detailed explanation on the different mouse modes can be found in the Interactivity features book in the User's Guide.

The Border... button shows the line properties which will be used when the control is highlighting the current object. This feature is called selection. Check out the Selection topic in the User's Guide for more information.

The Fire keyboard events instructs the control to fire automation event when the users presses a key.

The Enable keyboard while dragging check in collaboration with some dragging mode enable the users to modify the projection by using the keyboard arrows as well as the + and - keys.

The Fire drag and drop events check instructs the control to fire automation events when the user performs drag and drop actions.

The Accept drop in native format enables the control to act as a drop target and to accept data sources that contain native control state.

The Start format combo lists the formats for the data source created by the control. Currently possible values are Bitmap and Native format.

The Display tooltips check indicates the preference of the user whether tooltips should be displayed in general or not.


Settings Property Page

Render graycale enable or disables the grayscaling feature of the component. For a detail description on grayscaling see the Grayscale topic in the User's Guide.

The Recreate OpenGL context on resize check box instruct the control whether to recreate the OpenGL window and associated context when the control dimensions in the container change. This might is necessary because Windows has problems to correctly size the OpenGL viewport. The default value for this property is True.

The Antialias points, Antialias lines and Antialias polygons check boxes turn on and off antialiasing for points, polygons and lines.

The Cache selection rendering check box instructs the component to cache the internal selection images used to determine which object in the 3D scene corresponds to a particular 2D position. You use selection when you display tooltips, change the mouse cursor or display context menus.

The Enable hardware acceleration check box instructs the control to automatically leverage the hardware acceleration of your video board if it supports it. Please note that not all OpenGL hardware implementations are completely compatible with the OpenGL specifications.

The Use jittering check box enables the jittering feature of the control. The Samples, Max deviation and Jitter 2D objects options are just some of the jittering options which are explained in detail in the Jittering topic in the User's guide.

Checking the Windowless control check indicates that the next time the control is activated it will try to run in windowless mode. In this mode the scene is rendered in a bitmap. Please note that some containers may not support windowless control activation. The windowless mode is very useful in conjunction with the Transparent mode. In transparent mode the control does not paint a background - instead it uses the background supplied by the control container.

The Show Palette Manager button displays the palette manager dialog box, which enables you to change the color palette used by all color combo boxes in the component. For more information about palettes please take a look at the Working with palettes topic.

When you check the Enable Windows XP look and feel check box the component will automatically render all custom controls using Windows XP themes API on a XP machine. If you run your program on another version of Windows the controls will retain their original outlook. Check out the WinXP look and feel topic in the Users Guide for more information on how to enable theme support in your applications.

The Apply background frame to image check box indicates whether or not the control must apply the frame properties of the background object when it is exporting an image. This feature is off by default.

The Render large bitmaps on portions check box enable separate rendering of the image. This type of rendering can be very useful if you want to create big images (6000x6000 pixels for example). When this feature is On the control will split the image and render it on small chunks. The Max bitmap size equals screen, Max bitmap widht and Max bitmap height controls define the size of these chunks. You can synchronize their size with the size of the display (Max bitmap size equals screen = True) or specify some custom values (Max bitmap size equals screen = True, Max bitmap widht = custom widht and Max bitmap height = custom height).

When you export large images the 2d objects in the scene are not scaled. You may wish to alter this by setting a different value to the Scale 2d objects %.

When the control is instantiated on the user machine it automatically synchronizes with the local digit and currency presentation settings. If you want to explicitly specify the locale settings you must uncheck the User Default check box and select a locale from the Custom: combo.

The Resource DLL edit control enables you to instruct the component to replace its original resources with custom ones residing in the specified DLL. This feature can be very useful if you want to localize the component to a particular language or to change the standard dialog layouts. For more information on localization please check out the Resource localization topic in the Users Guide.


Annotations Property Page

This property page shows and allows you to edit the annotations applied on the scene. Press the Add button to add a new annotation. The Text field in the Annotations grid controls the text inside the annotation. If you press the Properties... the Annotation properties dialog will appear:

From this dialog you can control the annotation type (Ballon or Arrow) the mode of the annotation the annotation appearance orientation and other properties. For a detailed description on working with annotations check out the Annotations book in the User's guide. In this topic we'll just outline the meaning of the different properties:

Annotation mode tab - you can choose between 2D and 3D mode. The mode defines how the annotation is positioned in the control window. In 2D mode you define annotation position in percents of the control window. In 3D mode on the other hand the annotation position is determined by a 3d point. This 3d point is projected at runtime to produce the 2d coordinates of the annotation. This is why when you rotate or scale the 3d scene the annotation seem attached to the object it is pointing to. Some object like axes and data items can produce 3d point coordinates which can be later used to attach annotations on them.

Appearance and Events - the properties relevant to the annotation appearance and mouse response.

Orientation - the parameters in this group help you to control the size and the slope of the annotation arrow.

Following are the annotation text relevant properties.


General Property Page

The General property page allows customization of the toolbar buttons and selection of the controlled object at design time.

From the Controlled Object combo box you can select the object that the toolbar manipulates.

This combo box is filled with the names of the Nevron controls that are currently placed in the form. In some ActiveX containers this combo box may be disabled – this means that the container does not support design-time enumeration of controls and you have to set the controlled object at runtime (with the help of the ControlledObject or ControlledObjectName properties).

The Large Buttons checkbox determines the size of the toolbar buttons. If it is checked, the toolbar uses large buttons. If it is unchecked – the buttons are small.

The Available Toolbar Buttons list control contains buttons that are not currently on the toolbar but can be placed there. They are sorted in alphabetic order. The Current Toolbar Buttons list control contains the buttons that are currently on the toolbar. They are ordered in the same way that they are placed on the toolbar.

Adding buttons to the toolbar: select the button(s) you want to add from the Available list and then click the “=>” button. The button(s) are added at the end of the Current list.

Removing buttons from the toolbar: select the button(s) you want to remove from the Current list and click the “<=” button.

The Up and Down buttons can be used to reorder the current buttons. When the Up or Down button is clicked all the selected buttons from the “Current” list are moved one position up or down.


Advanced Property Page

The advanced property page can be used to adjust the button steps and the NToolBar frame style.

From the frame style combo you can select one of the three frame styles: 2D, 3D or None.

The values of the button steps are used by the corresponding buttons when they are clicked.

These values determine with how much the properties of the controlled objects will be increased or decreased on each button click. For example if the rotation step is 2.00 then each time the Rotation Left button is clicked, the controlled object will be rotated to left with 2 units (the rotation step affects both Rotation Left and Rotation Right buttons).

Use the edit and spin controls to adjust the button steps values.


Overview

The mouse response properties dialog exposes the visual interface necessary to control the properties of the NMouseResponse object. It contains three properties pages which are described in detail in the following topics. To jump directly to the page description click on the links below:

1. URL Property Page

2. Tooltip Property Page

3. Mouse pointer Property Page


URL Property Page

This page shows the URL relevant properties of the attached NMouseResponse object. Use the URL field to specify an absolute or relative URL (in case you'll later use the component from ASP). The following settings control the parameters of the HTTP Get request. For a detail information refer to the NMouseResponse description in the Object Reference.

The Test URL in IE button will invoke the Microsoft Internet Explorer browser (if present of course) and try to navigate it to the specified URL string.


Tooltip Property Page

The Tooltip property page allows you to change the default tooltip associated with the object with a custom one. To achieve this check the Use custom tooltip check box and type the custom tooltip in the Tooltip text edit field. In addition you can specify how the tooltip should be synchronized with the general settings for tooltips. You can learn more about configuring tooltips in the Tooltips topic.


Mouse pointer Property Page

This property pages allows you to change the mouse cursor associated with the NMouseResponse object. This can be very useful if you want to prompt the user that something will happen if he clicks on a particular object. Additional information on changing the mouse cursor can be found in the Mouse cursor topic in the User's Guide.


ObjectReference

N3DView

NAdvancedExport

NAdvancedGradient

NAdvancedGradientCollection

NAnnotation

NAnnotationCollection

NAppearance

NAppearanceCollection

NAreaPresentGroup

NArgumentCollection

NArrowPresentGroup

NAspManager

NAxis

NAxisConstLine

NAxisConstLineCollection

NAxisLabel

NAxisLabelCollection

NAxisParameter

NAxisParameterCollection

NAxisStripe

NAxisStripeCollection

NBackground

NBackplane

NBarPresentGroup

NBubblePresentGroup

NCategoryRange

NChart

NChartCollection

NChartEvents

NChartManager

NChartWall

NData

NDataSource

NDataSourceCollection

NDataStorage

NDatabase

NDoughnutPresentGroup

NErrorBarPresentGroup

NErrorPresentGroup

NEventManager

NFillEffect

NFloatBarPresentGroup

NFrameProperties

NFunctionPresentGroup

NGalleryCollection

NHighLowPresentGroup

NImportExport

NLabel

NLabelCollection

NLegend

NLegendCollection

NLegendData

NLegendDataCollection

NLightModel

NLightSource

NLightSourceCollection

NLinePresentGroup

NLineProperties

NMapPresentGroup

NMapShape

NMapShapeCollection

NMaterial

NMouseResponse

NMouseState

NPalette

NPaletteManager

NPiePresentGroup

NPoint3D

NPointPresentGroup

NPolarPresentGroup

NPresentGroupCollection

NPresentGroupCommon

NPrintManager

NRadarPresentGroup

NRange

NSerieMapping

NSerieMappingCollection

NSettings

NShmooPresentGroup

NSmoothLinePresentGroup

NStackAreaPresentGroup

NStackBarPresentGroup

NStackLinePresentGroup

NStockPresentGroup

NSurfacePresentGroup

NSystemPalette

NTextEx


EnumReference

AGPointStyle

AdvancedExportMedia

AlignmentMode

AnnotationType

AntialiasingType

AxisCurrentPageMode

AxisPagingMode

AxisScaleMode

AxisStyle

AxisType

BackplaneStyle

BarStyle

BrowserCapabilities

BrowserNavigate

CandleStyle

ChartPropertyPage

ChartWallType

ClientSideScript

CodeMediaType

ConstLineStyle

ControlVersion

DBAnnotationProperties

DBBorderProperties

DBFillEffectProperties

DBMaterialProperties

DBMouseResponseProperties

DBTextExProperties

DataPointObject

DataType

DataValueType

DoughnutStyle

DragDataType

DropEffect

ErrorPresentStyle

FEGradientStyle

FEGradientVariant

FELayout

FEMapType

FEPatternType

FEType

FirstFailType

FrameStyle

GrayScaleType

HTMLTag

HorizontalAlign

ImageMapFormat

ImageMapType

KeyboardState

LegendExpand

LegendMarkShape

LegendMode

LightScheme

LinePresentStyle

LineStyle

LogarithmStepMode

MarginStrategy

MarkType

MouseAction

MouseActionMode

MouseDragMode

MousePointer

PAGradientScheme

PTProjectionType

PaperOrientation

PieGroupMode

PieOrderMode

PieStyle

PointStyle

PredefinedAxisTextPosition

PredefinedFunction

PredefinedProjection

PresentGroupLegendMode

PresentGroupType

RadarStyle

ShapeDepthMode

ShowTooltips

StackStyle

SurfaceFillStyle

SurfaceFrameStyle

SurfacePositionMode

SurfaceSidesOriginMode

VerticalAlign

WallStyle

WinColor


N3DView

Overview Controls the polar coordinates of the camera, the zooming factor, the projection type, the offsets of the scene, the X and Y depth angles and the viewer rotation angle. The camera always points towards the beginning of the coordinate system. The N3DView object possesses a set of 18 predefined projections that allow you to configure your projection settings with only one function call.

Properties

ProjectionType

Rotation

Elevation

Zoom

PerspectivePercent

ViewerRotationAngle

OffsetX

OffsetY

XDepthAngle

YDepthAngle

Methods

SetPredefinedProjection

ShowDialog

OpenGL2Window

Window2OpenGL


NAdvancedExport

Overview This interface exposes the advanced chart export capabilities. The data storage or specific presentation group data can be exported into one of the following media types - text, XML or HTML

Methods

ExportDataStorage

ExportPresentGroups


NAdvancedGradient

Overview Advanced gradients consist of a background color and an arbitrary number of points with different color, style, intensity and position. The purpose of the NAdvancedGradient is to expose the functionality required to manipulate advanced gradients. Following is a description of each of the properties and methods of the NAdvancedGradient object

Properties

BackgroundColor

Methods

AddPoint

GetPoint

EditPoint

GetPointsCount

DeletePoint

Clear

InitFromAdvancedGradient


NAdvancedGradientCollection

Overview The NAdvancedGradientCollection object represents the custom advanced gradients created by the user of the component. This collection is serialized in the registry and thus its contents is not lost if the component is destroyed. Another very important characteristics of this collection is that it is common for all Nevron components working on the machine so be very careful when you modify it because this may impact other programs if they use Nevron components.

Methods

Add

GetAt

RemoveAll

RemoveAt

GetCount


NAnnotation

Overview This object represents an annotation. Annotations are visual objects that can be used to mark or draw attention to some items or areas in the 3DChart.

Properties

Text

PointerPositionX

PointerPositionY

ArrowAngle

ArrowLength

InflateTextX

InflateTextY

AnnotationType

PositionMode3D

Visible

Methods

TextEx

MouseResponse

FillEffect

Border

Position3D

ShowDialog


NAnnotationCollection

Overview The NAnnotationCollection object represents the Annotations added to the 3D scene. Annotations are 2D objects that can be used to mark or draw attention to some items or areas in the 3d scene. The NAnnotationCollection enables you to add, edit and delete Annotations.

Methods

Add

GetAt

RemoveAll

RemoveAt

GetCount


NAppearance

Overview This object describes the appearance of a data point. One appearance can be applied on several data points and this helps you present your data points in an uniform matter. The data point on which the appearance is applied is determined by the presentation group showing the data point. Each presentation group has a collection of appearance objects accessible with the help of the UniformAppearances method of the NPresenentGroup common object. See the Uniform Appearance topic for more information

Properties

Label

Methods

FillEffect

Material

Border


NAppearanceCollection

Overview This collection holds the uniform appearances of the presentation group. See the Uniform Appearances topic for more information

Methods

Add

GetAt

GetByLabel

GetCount

RemoveAt

RemoveAll


NAreaPresentGroup

Overview The NAreaPresentGroup is used for the creation of area charts. See the Area Chart topic for more information.

Properties

DepthPercent

UseOrigin

Origin

DropLines

UseXValue

Stairs

Methods

Common


NArgumentCollection

Overview The Function present group has an instance of this object. The argument collection contains NCategoryRange objects which participate in the function expression as arguments. The NArgumentCollection is accessible with the help of the 'Arguments' method of the NFunctionPresentGroup object. See the Function Chart topic for more information

Methods

Add

GetAt

GetByName

GetCount

RemoveAt

RemoveByName

RemoveAll


NArrowPresentGroup

Overview The NArrowPresentGroup object is used for the creation of arrow charts. See the Arrow Chart topic for more information.

Properties

ArrowWidth

Methods

Common


NAspManager

Overview The NAspManager controls the way a Nevron control integrates with ASP. Version 5.0 of all Nevron components supports automatic temporary file handling, browser type detection and interactive client side ActiveX controls. These small controls written in ATL bring client side functionality and enable the programmer to write client side scripting just as if the server control was installed on the client machine. At the same time they are small, easy to download and have a minimal set of dependent dlls. When the control is instantiated in ASP it automatically tries to load a configuration file for the particular Web server. This configuration file is generated by the NServerConfig executable. With the help of this utility you can instruct the control to generate browser dependent responses and to modify the parameters of the image output. The NServerConfig has an easy to use visual interface, which makes the configuration of your server component an easy task. For more information see the ASP integration topics in the User's Guide.

Properties

RootDirectory

TempDirectory

DownloadDirectory

ImageTemplateTag

WAPImageTemplateTag

ImageMapTemplateTag

SVGImageTemplateTag

EnableAutoDelete

AutoDeleteInterval

BrowserCapabilities

EnableUserImpersonation

Login

Password

Domain

Methods

SetAutoDeleteDelay

ReloadServerSettings

EmbedInHtml

SendImageToBrowser


NAxis

Overview Each of the six chart axes can be controlled by an instance of this class. See the Axes topic for more information

Properties

Visible

Width

AxisStyle

InnerTickLength

OuterTickLength

MinorTickLength

MinorTickCount

MajorLineWidth

MinorLineWidth

Title

ScaleMode

NumberOfDataPointsBetweenTicks

DisplayDataPointsBetweenTicks

StaggerTexts

StaggerOffset

StaggerLevels

AutoMax

AutoMin

AutoStep

Max

Min

Step

ShowMinMaxAsTicks

MaxTickCount

RoundToTick

Inverted

FormatString

LogarithmStepMode

LogarithmBase

PositionOffset

PositionStartPercent

PositionEndPercent

PagingMode

PageCount

PageSize

CurrentPageMode

CurrentPageIndex

CurrentPageValue

Methods

FillEffect

Material

Border

MajorLineFillEffect

MajorLineMaterial

MajorLineBorder

GetMajorShowAtWall

SetMajorShowAtWall

MinorLineFillEffect

MinorLineMaterial

MinorLineBorder

GetMinorShowAtWall

SetMinorShowAtWall

InnerTickLine

OuterTickLine

MinorTickLine

TextEx

TitleTextEx

SetPredefinedTextPosition

PositionAxis

Stripes

ConstLines

Labels

SetStepDateTime

GetStepDateTime

SetMinDateTime

GetMinDateTime

SetMaxDateTime

GetMaxDateTime

GetPoint3DFromValue

MouseResponse


NAxisConstLine

Overview Each constant line displayed by the six chart axes is represented with an instance of the object. It has properties controlling the line appearance and the value associated with the constant line

Properties

Value

LineWidth

Style

BeginValue

EndValue

BeginEndAxis

EnableBeginEnd

Methods

LineProps

FillEffect

Material

GetPoint3DFromPosition


NAxisConstLineCollection

Overview Each axis has an instance of this object, which holds the constant lines displayed on the axis. It is accessible with the help of the ConstLines method of the NAxis object. See the Const Lines topic for more information

Methods

Add

GetAt

GetCount

RemoveAt

RemoveAll


NAxisLabel

Overview Each label displayed by the six chart axes is represented with an instance of this object. It has properties controlling the label appearance and the value associated with it.

Properties

Value

Text

HasLine

Offset

Angle

Methods

TextEx

LineProps


NAxisLabelCollection

Overview Each axis has an instance of this object, which holds the labels displayed on the axis. It is accessible with the help of the Labels method of the NAxis object. See the Labels topic for more information

Methods

Add

GetAt

GetCount

RemoveAt

RemoveAll


NAxisParameter

Overview Each category, serie and level of the data storage is represented by an instance of this object in the respective collection (acessible with the Categories, Series and Levels methods of the NChart object). The labels that each NAxisParameter has, can be displayed on the respective axis when it is switched in asmDimension. By default the Categories and Series axes are operating in this mode. See Categories, Series and Levels topic for more information.

Properties

Label

ShowLabel


NAxisParameterCollection

Overview There is one NAxisParameterCollection for the categories, series and levels of the 3DChart component. See the Categories, Series and Levels topic for more information.

Methods

Add

GetAt

GetCount

RemoveAt

RemoveAll

SetSize

FindByLabel


NAxisStripe

Overview Each axis stripe displayed by the six chart axes is represented by an instance of this object. The object itself has properties controlling the stripe begin and end values as well as it's appearance. See the Axis Stripes topic for more information

Properties

From

To

Methods

FillEffect

Material

GetShowAtWall

SetShowAtWall

GetPoint3DFromPosition

ShowDialog


NAxisStripeCollection

Overview Each axis has an instance of this object, which holds the stripes of the axis. It is accessible with the help of the Stripes method of the NAxis object

Methods

Add

GetAt

GetCount

RemoveAt

RemoveAll


NBackground

Overview This object gives you access to the fill effect, frame and mouse response properties applied on the background of the control. It also controls the control windowless activation. All Nevron components support windowless activation. In this mode the control does not create a window, but instead renders itself into a bitmap. This bitmap is afterwards drawn in the control window using the Windows GDI functions.

Methods

FillEffect

Frame

MouseResponse

ShowDialog


NBackplane

Overview The purpose of the NBackplane automation object is to expose the functionality required to control the back planes applied on different scene elements such as texts, labels, legends and chart margins. You can control the visibility, style, dimensions and the filling of the back plane by just touching some of the properties of NBackplane automation object.

Properties

Visible

Style

EdgePercent

EllipseWidthPercent

EllipseHeightPercent

InflateWidth

InflateHeight

Methods

FillEffect

Material

Frame

MouseResponse

ShowDialog


NBarPresentGroup

Overview The NBarPresentationGroup is used for the creation of single and multi column bar charts. See the Creating Bar Charts topic for more information.

Properties

WidthPercent

DepthPercent

GapPercent

BarStyle

BarEdgePercent

HasJoinLines

HasBottomEdge

HasTopEdge

Methods

Common

MapLevelOnAxis

UnmapLevel

GetLevelAxis

SetLevelOrigin

GetLevelOrigin

JoinLineProps


NBubblePresentGroup

Overview The NBubblePresentGroup object is used for the creation of bubble charts. See the Bubble Chart topic for more information.

Properties

BubbleStyle

MaxSize

MinSize

Methods

Common


NCategoryRange

Overview The NCategoryRange object represents ranges of values from the data storage. These ranges participate in function expressions as function arguments. Each Function present group has an argument collection which contains several NCategoryRange objects. The NCategoryRange object is similar to the NRange object because it is a region of the data storage, but it can contain only one level and only one series. The level of the range is defined by the LevelIndex property while the serie is identified by the SerieIndex.

Properties

BeginX

EndX

InfiniteX

SerieIndex

LevelIndex

ValueType

Name


NChart

Overview The NChart object is the primary object of the 3DChart component. It is the object through which you can gain access to any other object in the 3DChart component.

Properties

ChartWidth

ChartDepth

ChartHeight

LeftMargin

TopMargin

RightMargin

BottomMargin

MarginStrategy

DisplayOnLegend

ChartVisible

Redraw

Methods

DataAt

Walls

Axes

PresentGroups

Categories

Series

Levels

Database

DataStorage

ShowPropertySheet

ShowPropertyPage

Clear

ChartCollection

LegendCollection

MarginBackplane

Get3DView

Background

LightModel

ImportExport

EventManager

LabelCollection

Picture

PrintManager

AspManager

Legend

AboutBox

AnnotationCollection

Settings


NChartCollection

Overview The NChartCollection object represents the charts in the 3DChart control. With the help of this automation object you can add new charts, edit or delete existing ones and modify the current active chart. You can have an arbitrary number of charts, but only one chart can be active at a time. The active chart properties are exposed directly from the main automation object of the control - NChart.

Properties

ActiveChart

Methods

Add

GetAt

RemoveAll

RemoveAt

GetCount


NChartEvents

Overview This interface describes the various events that the 3DChart component fires in response to mouse actions.

Methods

BackgroundMouseEvent

LabelMouseEvent

DataMouseEvent

MapShapeMouseEvent

ChartWallMouseEvent

LegendDataMouseEvent

LegendMouseEvent

AxisMouseEvent

AnnotationMouseEvent

PieOtherSliceMouseEvent

OnDragOver

OnDrop

KeyboardEvent

FunctionEvent

OnDownloadDataAvailable

OnDownloadDataProgress

OnDownloadDataFailed


NChartManager

Overview The NChart object is the primary object of the 3DChart component. It is the object through which you can gain access to any other object in the 3DChart component.

Properties

ChartWidth

ChartDepth

ChartHeight

LeftMargin

TopMargin

RightMargin

BottomMargin

MarginStrategy

DisplayOnLegend

Visible

Methods

DataAt

Walls

Axes

PresentGroups

Categories

Series

Levels

Database

DataStorage

MarginBackplane

Get3DView

LightModel

AnnotationCollection


NChartWall

Overview Each of the five chart walls can be controlled by an instance of this class. See the Chart Walls topic for more information

Properties

Visible

Style

Width

EdgePercent

HasBottomEdge

HasTopEdge

Methods

FillEffect

Material

Border

MouseResponse


NData

Overview There is one NData object for each data point in the data storage. The supported properties from each data point depend on the currently selected data type. Since by default the current data type is set to dtDataType35 in the beginning each data point supports Value1, Value2, Value3 and label properties and the FillEffect, Material, MouseResponse and Border methods. Trying to access a not supported property (like Value5 in this case) raises an exception. See the Data Storage Topic for more information.

Properties

Value1

Value2

Value3

Value4

Value5

Value6

Label

Color

Methods

FillEffect

Material

Border

MouseResponse

TextEx

Annotation

SetValueDateTime

GetValueDateTime

ShowEditDateTimeDlg


NDataSource

Overview Each NDataSource object represents an ADO data source. Each data source is described with its connection string (specifying the database) and SQL string (used for the recordset creation). The SerieMappings method gives you access to the NSerieMappingCollection object holding NSerieMapping objects, which describe the way in which each serie extracts its values from the recordset fields.

Properties

Name

ConnectString

UserName

Password

SQL

CategoryField

ShowCategoryLabels

Methods

TestConnection

TestSQL

SerieMappings

LastErrorStr


NDataSourceCollection

Overview This collection holding NDataSource objects can be accessed with the help of the DataSources method of the NDatabase object. See the ADO Database Integration topic for more information.

Methods

Add

GetAt

GetCount

RemoveAt

RemoveAll


NDataStorage

Overview This object is accessible with the help of the DataStorage method of the NChart object. It controls some properties of the data storage of the component. See the Data Storage topic for more information.

Properties

DataType

CategoryPageSize

SeriePageSize

LevelPageSize

DecimalPointPrecision

Methods

IsValueSupportedByDataType

ShowConfigurationDialog


NDatabase

Overview The NDatabase object is accessible with the help of the Database method of the NChart object. It gives you access to the available data sources and controls the database integration of the component. See the ADO Database Integration topic.

Properties

Enable

CurrentDataSource

DataType

Methods

Requery

DataSources


NDoughnutPresentGroup

Overview The NDoughnutPresentGroup is used for the creation of doughnut charts. See the Doughnut Charts topic for more information.

Properties

DefaultRingRadius

DefaultRingBeginAngle

DefaultRingDetachment

DoughnutStyle

BeginRadius

Methods

Common

SetRingRadius

SetRingDefaultRadius

GetRingRadius

SetRingBeginAngle

SetRingDefaultBeginAngle

GetRingBeginAngle

SetRingDetachment

SetRingDefaultDetachment

GetRingDetachment


NErrorBarPresentGroup

Overview The NErrorBarPresentGroup is used for the creation of error bar charts. See the Creating Error Bar Charts topic for more information.

Properties

WidthPercent

DepthPercent

BarStyle

BarEdgePercent

HasBottomEdge

HasTopEdge

LineStyle

LineWidth

UseXValue

ErrorsInPercents

Methods

Common


NErrorPresentGroup

Overview The NErrorPresentGroup object is used for the creation of error charts. See the Error Chart topic for more information.

Properties

ErrorWidthPercent

LineWidth

LineStyle

ErrorStyle

ErrorsInPercents

Methods

Common


NEventManager

Overview The NEventManager controls the way a Nevron control responds to mouse messages and movement. The mouse responses of the control can be grouped in three categories. The first one is when the control does not respond to the mouse in any way. The second category is when mouse movement impacts the 3D projection settings of the control. In this category fall the trackball, zoom and offset modes. The third category is when the projection parameters do not change, but the control reacts in some way - via a tooltip, context sensitive menu or an automation event.

Properties

LMouseButtonClick

LMouseButtonDoubleClick

RMouseButtonClick

RMouseButtonDoubleClick

MouseMove

DragDrawFilled

DragDrawTexts

MouseDragMode

FireKeyboardEvent

EnableKeyboardDragging

FireDragAndDropEvents

AcceptDropInNativeFormat

DragDataType

DisplayTooltips

Methods

SelectionBorder

ShowDialog


NFillEffect

Overview Probably the major object in the Nevron 3D ActiveX Standard. This object controls the filling applied on the object it is attached to. The NFillEffect object packs together the properties necessary to apply solid color, gradient, texture (image), animation, pattern or advanced gradient. You control the type of the filling by modifying the Type property. As well as modifying the filling parameters you can also specify how the filling is to be applied on the 3D object. The MapType, Layout, XScale, YScale and Rotation properties allow you to change the layout (stretched, fitted, tiled etc.) and modify the scaling and rotation of the fill effect. The Transparency property allows you to control the alpha blending of the fill effect. When lighting is turned on the FillEffect object works together with the material properties to determine the final appearance of the object. The NFillEffect also exposes functionality which helps you to use some advanced special visual effects like fill effect merging, antialiasing and grayscaling. Refer to the User's Guide for more information on using the NFillEffect.

Properties

Type

EnableWindowsColor

WindowsColor

Color

GradientStyle

GradientVariant

GradientColor1

GradientColor2

ImageFileName

AnimationFileName

AnimationSpeed

PatternType

PatternForegroundColor

PatternBackgroundColor

UseDefaultMapping

MapType

Layout

XScale

YScale

Rotation

BlackTextureBackground

MergeFillEffects

SolidColorPercent

GradientPercent

TexturePercent

AnimationPercent

PatternPercent

AdvancedGradientPercent

Transparency

AntialiasingType

GrayScaleType

Methods

ShowDialog

SetSolidColor

SetWindowsColor

SetGradient

SetImage

SetAnimation

SetPattern

SetPredefinedAdvancedGradient

AdvancedGradient

InitFromFillEffect

SetMergePercents

AdvancedGradientGallery

ImageGallery

AnimationGallery

SetImageByAlias

SetAnimationByAlias


NFloatBarPresentGroup

Overview The NFloatBarPresentGroup is used for the creation of floating bar charts. See the Float Bar Charts topic for more information.

Properties

WidthPercent

DepthPercent

BarStyle

BarEdgePercent

HasBottomEdge

HasTopEdge

Methods

Common


NFrameProperties

Overview The NFrameProperties object controls the frame applied on a particular object. The frame itself consists of four elements - the outer bevel, the bevel distance, the inner bevel and the frame border. With the help of the InnerStyle and OuterStyle properties you can control inner and outer bevel style. The BevelDistance property specifies the distance between the inner and the outer bevel. The HasBorder property allows you to enable or disable the frame border. To gain a basic understanding of the way the NFrame object works go to the Background page of the control and press the "Frame..." button. This will show the frame properties applied on the control background.

Properties

OuterStyle

InnerStyle

BevelWidth

BevelDistance

HasBorder

Color

LineStyle

LineWidth

LineFactor

LinePattern

GrayScaleType

Methods

ShowDialog

InitFromFrameProperties


NFunctionPresentGroup

Overview The NFunctionPresentGroup is used for the creation and display of various mathematical, statistical and financial functions. Custom functions can be created with the help of expressions. The functions are represented by a line chart. See the Function Charts topic for more information.

Properties

LineStyle

LineWidth

HasValuePoints

PointStyle

PointSize

UseXValue

Expression

YPositionValue

YAlignmentMode

AppearanceRange

XPositionRange

XValueType

Methods

Common

Arguments

LoadFunction


NGalleryCollection

Overview The NGalleryCollection object represents a collection of associations. Each association maps an alias to a file name. These associations are used when you work with images and animations and can greatly simplify the maintenance of your code if the files used for textures or animations in your charts and graphs frequently change their position.

Methods

Add

DeleteByFile

DeleteByAlias

GetSize

GetAt

Clear


NHighLowPresentGroup

Overview The NHighLowPresentGroup is used for the creation of high low area charts. See the High Low Charts topic for more information.

Properties

DepthPercent

DropLines

UseXValue

Methods

Common

DropLineProps


NImportExport

Overview This automation object is used to save and load the component state and to export images in different picture formats. Currently the supported image formats are JPEG (.jpg), PNG (.png), Bitmap (.bmp), Targa (.tga) or TIFF (.tif). You can also instruct the control to import or export from a file, memory, storage or the clipboard. For some examples check out the VB\ImportExport samples.

Properties

LoadControlDimensions

Methods

Save

Load

SaveJPEGImage

SaveBitmapImage

SaveTargaImage

SaveTiffImage

SavePNGImage

SaveImageMap

LoadFromURL

TerminateDownload

ShowDialog

SetCodeExportOptions

GenerateCode

GetAdvancedExport


NLabel

Overview This object represents a label. Labels are texts that are always displayed over the 3D scene. They usually contain descriptive information about the image generated by the control. You can add labels to the scene with the help of the NLabelCollection object. The NLabel object also allows you to position the label at an arbitrary position in the control window. You specify the position (or origin point) of the label object in percents of the control window dimensions with the help of the OriginOffsetX and OriginOffsetY properties. The OriginHorzAlign specifies how the OriginOffsetX property is to be treated - as an offset from the control left side, right side or the control center. The OriginVertAlign works in the same way except that it specifies whether to align to the control's top side, bottom side or center.

Properties

Text

OriginHorzAlign

OriginVertAlign

OriginOffsetX

OriginOffsetY

Methods

TextEx

MouseResponse


NLabelCollection

Overview The NLabelCollection object represents the labels added to the 3D scene. Labels are 2D texts that are displayed always on top of all 3D scene elements. The NLabelCollection enables you to add, edit and delete labels and also to add headers and footers. Headers and footers are normal labels that are positioned at a predefined position.

Methods

Add

AddHeader

AddFooter

GetAt

RemoveAll

RemoveAt

GetCount

ShowDialog


NLegend

Overview The NLegend object is accessible with the help of the Legend method of the NChart object. It exposes the functionality of the chart legend to the programmer.

Properties

LegendMode

LegendExpand

RowCount

ColCount

InflateCellWidth

InflateCellHeight

TextOffset

MarkSize

HorizontalAlign

VerticalAlign

MarginX

MarginY

StretchWidth

StretchHeight

WidthPercent

HeightPercent

ShadowOffsetX

ShadowOffsetY

Header

Footer

InflateHeaderWidth

InflateHeaderHeight

InflateFooterWidth

InflateFooterHeight

Methods

Backplane

ShadowBackplane

LegendDataCollection

TextEx

HorizontalLinesProps

VerticalLinesProps

OutlineHorizontalLinesProps

OutlineVerticalLinesProps

HeaderTextEx

FooterTextEx

HeaderSeparatorLineProps

FooterSeparatorLineProps

ShowDialog


NLegendCollection

Overview The NLegendCollection object represents the Legends added to the 3D scene. Legends are 2D texts that are displayed always on top of all 3D scene elements. The NLegendCollection enables you to add, edit and delete Legends and also to add headers and footers. Headers and footers are normal Legends that are positioned at a predefined position.

Properties

ActiveLegend

Methods

Add

GetAt

RemoveAll

RemoveAt

GetCount


NLegendData

Overview Each NLegendData represents an individual legend data item. The NLegendData items are contained in a collection accessible with the help of the LegendDataCollection method of the NLegend object. See the Configuring the legend topic for more information.

Properties

Text

MarkShape

Methods

MarkFillEffect

MarkLineProperties

LineProperties

MouseResponse


NLegendDataCollection

Overview This collection holding NLegendData objects can be accessed with the help of the LegendDataCollection method of the NLegend object. See the Configuring the legend topic for more information.

Methods

Add

GetAt

RemoveAll

RemoveAt

GetCount


NLightModel

Overview The NLightModel automation object represents the light model that is global for the whole scene. The NLightModel object allows you to enable lighting and to apply predefined lighting schemes.

Properties

GlobalAmbientLight

EnableLighting

LocalViewpointLighting

GrayScaleType

Methods

LightSourceCollection

SetLightScheme

ShowDialog


NLightSource

Overview The NLightSource object represents a light source in the 3D scene. It can control the light source emission characteristics, its position and direction. You add light sources to the 3D scene with the help of the NLightSourceCollection. The number of light source is limited to eight in the current Microsoft OpenGL implementation. For more information on the way that OpenGL implements lighting see the "OpenGL lighting model" topic in the User's Guide.

Properties

Name

AmbientColor

SpecularColor

DiffuseColor

SpotCutoff

SpotExponent

ConstantAttenuation

LinearAttenuation

QuadraticAttenuation

PositionX

PositionY

PositionZ

DirectionX

DirectionY

DirectionZ

GrayScaleType


NLightSourceCollection

Overview Represents the collection of lights that are applied to the scene. With the help of this collection you can add, remove and modify the lights applied on the 3D scene. The number of lights in the current Microsoft OpenGL implementation is limited to eight. This is why you cannot add more than eight lights to the NLightSourceCollection.

Methods

Add

GetAt

RemoveAll

RemoveAt

GetCount


NLinePresentGroup

Overview The NLinePresentGroup is used for the creation of line charts. See the Line Chart topic for more information.

Properties

LineStyle

LineWidth

HasValuePoints

PointStyle

PointSize

UseXValue

UseYValue

Stairs

Methods

Common


NLineProperties

Overview This object controls the line (or border) parameters of the object it is applied to. With its help you can modify the line style, color or width or even completely disable the lines.

Properties

EnableLines

Color

Style

Width

Factor

Pattern

AntialiasingType

GrayScaleType

Methods

ShowDialog

InitFromLineProperties


NMapPresentGroup

Overview The NMapPresentGroup object is used for the creation of map charts - widely used in the Geographic Informational Systems. See the Map Chart topic for more information.

Properties

UsePalette

AutomaticPalette

PaletteTransparency

PaletteSteps

SmoothPalette

ShapeDepthMode

Methods

Common

Shapes

Palette

BorderProperties


NMapShape

Overview This object represents a polygon displayed by the map presentation group. See the Map Chart topic for more information.

Properties

Text

Value

Methods

FillEffect

Material

Border

TextEx

Annotation

MouseResponse

AddPoint

GetPointAt

RemovePointAt

RemoveAllPoints

GetPointCount


NMapShapeCollection

Overview This object is accessible with the help of the Shapes method the NMapPresentGroup object. See the Map Chart topic for more information.

Methods

Add

GetAt

GetCount

RemoveAt

RemoveAll


NMaterial

Overview The NMaterial object represents the material applied on the object. Materials work together with fill effects when the scene is rendered with lighting to determine the final appearance of the object. When you render the scene without lighting the material properties have no effect on the object's appearance. For more information see the OpenGL lighting model topic in the User's Guide.

Properties

AmbientColor

SpecularColor

DiffuseColor

EmissiveColor

Shininess

GrayScaleType

Methods

ShowDialog

SetAmbientDiffuseColor

SetAllColors

InitFromMaterial


NMouseResponse

Overview The NMouseResponse objects controls the way in which objects react to different mouse actions.

  • The URL relevant properties - URL, Flags, TargetFrameName, PostData and Headers work together with the client agent controls when the control is integrated in ASP. With their help you can instruct the client control to direct the browser to some URL location when the user clicks on an object that has attached NMouseResponse properties. If the URL field is empty instead of directing the browser to an empty URL the client control will generate an automation event. You can intercept this event and use client side scripting just as if you had the server control installed on the client machine.
  • The other two properteis - UseCustomTooltip and Tooltip allow you to specify a custom tooltip for the particular object. Custom tooltips are very useful when you want to display some descriptive information about a particular object in the scene.

    Properties

    URL

    Flags

    TargetFrameName

    PostData

    Headers

    UseCustomTooltip

    Tooltip

    ChangeMouseCursor

    MousePointer

    ShowTooltips

    Methods

    SetTooltip

    ShowDialog

    InitFromMouseResponse

            •


NMouseState

Overview The NMouseState automation object represents the state of the mouse when the user clicked on some object that generates events. All the properties of this object are read-only.

Properties

MouseAction

MouseX

MouseY

HWND

LeftAlt

RightAlt

LeftShift

RightShift

LeftControl

RightControl

Alt

Shift

Control


NPalette

Overview This object represents a custom palette, which assigns colors to values. It is used in variety of places where elevation information needs to be highlighted.

Methods

Add

GetAt

RemoveAt

RemoveAll

GetCount


NPaletteManager

Overview The NPaletteManager controls the palette used in all color selection controls of the component. The user is able to select from several predefined palettes as well as create his own custom ones.

Methods

SetCurrentPalette

GetCurrentPalette

AddPalette

RemovePaletteByName

RemovePaletteByIndex

GetPaletteAtIndex

GetPaletteByName

GetPaletteCount

ShowDialog


NPiePresentGroup

Overview The NPiePresentGroup object is used for the creation of pie charts. See the Pie Chart topic for more information.

Properties

PieStyle

Depth

Radius

BeginAngle

PieEdgePercent

TotalAngle

OrderMode

GroupMode

GroupValue

GroupLabel

GroupDetachment

Methods

Common

GroupFillEffect

GroupMaterial

GroupBorder

GroupMouseResponse

GroupTextEx

GroupAnnotation


NPoint3D

Overview The NPoint3D object represents a point in the 3-dimensional space of the chart. It is used as an origin point for annotation objects, which work in 3D mode.

Properties

PosX

PosY

PosZ

Methods

InitFromPoint3D


NPointPresentGroup

Overview The NPointPresentGroup object is used for the creation of points charts. See the Point Chart topic for more information.

Properties

PointStyle

Size

UseXValue

UseYValue

Methods

Common

JoinLineProps

DisplayJoinLine

IsJoinLineDisplayed


NPolarPresentGroup

Overview The NPolarPresentGroup object is used for the creation of polar charts. See the Polar Chart topic for more information.

Properties

XRadius

YRadius

HasValuePoints

PointStyle

PointSize

BeginAngle

AngleStep

LabelOffset

LabelFormat

ClockwiseLabels

WindRoseLabels

WindRoseAngleStep

CloseContour

Methods

Common

LabelTextEx


NPresentGroupCollection

Overview This object holds the created presentation groups. It is accessible with the help of the PresentGroups method of the NChart object. This collection is not homogenous, which means that it holds object from different types. Because of that it is up to the developer to explicitly cast to the appropriate type when he wants to get access to a particular object in the collection. The GetTypeAt method can also be used to provide you with information about the type of a particular item in the collection.

Methods

Add

GetAt

GetCommonAt

GetTypeAt

GetCount

RemoveAt

RemoveAll

Example:

Dim bar As NBarPresentGroup
Set bar = NChart1.PresentGroups.Add(pgtBar) 'perform explicit cast to the proper type -> operation will succeed
Dim area As NAreaPresentGroup
Set area = NChart1.PresentGroups.GetAt(0) 'try to perform explicit cast to a wrong type -> operation will fail


NPresentGroupCommon

Overview Each presentation group has an instance of this object accessible from the presentation group with the help of the Common method. It groups properties and methods common for all presentation groups.

Properties

Name

MarkType

UniformMarks

FormatString

ArrowLength

EnableUniformAppearance

ShowInLegend

LegendMode

LegendFormatString

InflateMargins

DataPointsBetweenMarks

Visible

Methods

Range

TextEx

Annotation

ArrowLine

UniformAppearances

DisplayOnAxis

IsDisplayedOnAxis

CanDraw

ShowDialog


NPrintManager

Overview The NPrintManager object allows you to print your control. With its help you can enumerate the installed local printers as well as the printers in the network that you have connected to. You can also control the margins of the printed image, the paper orientation as well as some aspects of the image scaling.

Properties

LeftMargin

TopMargin

RightMargin

BottomMargin

QualityPercent

Copies

CurrentPrinter

Scale2DFonts

PaperOrientation

AutomaticQualityPercent

Methods

GetPrinterName

GetPrinterCount

BeginPrint

ShowPrintPreview

ResetMargins

SetProportionalMargins


NRadarPresentGroup

Overview The NRadarPresentGroup object is used for the creation of radar charts. See the Radar Chart topic for more information.

Properties

RadarStyle

XRadius

YRadius

HasValuePoints

PointStyle

PointSize

CategoryTextOffset

Methods

Common

CategoryTextEx


NRange

Overview The NRange object describes the ranges of values from the data storage presented by the presentation group. Each presentation group has an instance of this object which can be accessed with the help of the Range method of the NPresentGroupCommon object of the presentation group (accessible with the help of the Common method). Except the InfiniteX, InfiniteY and InfiniteZ the other properties of the NRange object are self explanatory - they just help you define a range of values in a three dimensional array. The InfiniteX, InfiniteY and InfiniteZ flags ignore the respective end coordinated and replace it with the biggest available one. This is very useful, since you will probably dynamically change the categories, series and levels of the data storage and it will be very inconvenient to specify an exact ending coordinate each time.

Properties

BeginX

BeginY

BeginZ

EndX

EndY

EndZ

InfiniteX

InfiniteY

InfiniteZ


NSerieMapping

Overview The NSerieMapping object is used to represent a serie in the database integration model. It also has methods helping you specify the fields from which individual level values will be extracted. See the Ado Database Integration topic for more information

Properties

Label

ShowLabel

LevelCount

Methods

SetLevelValueField

GetLevelValueField

SetLevelValueFieldEx

GetLevelValueFieldEx


NSerieMappingCollection

Overview This collection holding NSerieMapping objects can be accessed with the help of the SerieMappings method of the NDataSource object. See the ADO Database Integration topic for more information.

Methods

Add

GetAt

GetCount

RemoveAt

RemoveAll


NSettings

Overview Use this object to control the system settings of the control.

Properties

RenderGrayScale

AntialiasPoints

AntialiasLines

AntialiasPolygons

UseJittering

JitteringSamples

JitteringDeviation

Jitter2DObjects

ApplyBackgroundFrameToImage

RenderLargeBitmapsOnPortions

MaxBitmapSizeEqualsScreen

MaxBitmapWidth

MaxBitmapHeight

Scale2DObjectsPercent

UserDefaultNumberFormat

NumberFormatCustomLocale

Windowless

Transparent

RecreateContextOnResize

CacheSelectionRendering

CacheRenderedBitmaps

ResourceDLL

EnableWinXPLookAndFeel

EnableHardwareAcceleration

Methods

PaletteManager

RecreateOpenGLContext


NShmooPresentGroup

Overview The NShmooPresentGroup is used for the creation of shmoo charts. See the Shmoo Chart topic for more information.

Properties

AllFailHidden

HighlightFirstFail

FirstFailType

Methods

Common

ShowXRow

ShowYRow

ShowZRow


NSmoothLinePresentGroup

Overview The NSmoothLinePresentGroup is used for the creation of smooth line charts. See the Smooth Line Chart topic for more information.

Properties

LineStyle

LineWidth

HasValuePoints

PointStyle

PointSize

Smoothness

UseXValue

Interpolation2D

Methods

Common


NStackAreaPresentGroup

Overview The NStackAreaPresentGroup is used for the creation of stack area charts. See the Stack Area Chart topic for more information.

Properties

DepthPercent

StackStyle

DropLines

Stairs

Methods

Common


NStackBarPresentGroup

Overview The NStackBarPresentGroup is used for the creation of stack bar charts. See the Stack Bar Charts topic for more information.

Properties

WidthPercent

DepthPercent

BarStyle

StackStyle

BarEdgePercent

HasJoinLines

HasBottomEdge

HasTopEdge

HasMiddleEdge

RoundLastVisible

Methods

Common

JoinLineProps


NStackLinePresentGroup

Overview The NStackLinePresentGroup is used for the creation of stack line charts. See the Stack Line Charts topic for more information.

Properties

LineStyle

LineWidth

HasValuePoints

PointStyle

PointSize

StackStyle

Stairs

Methods

Common


NStockPresentGroup

Overview The NStockPresentGroup object is used for the creation of stock charts. See the Stock Chart topic for more information.

Properties

CandleStyle

CandleWidth

CandleDepthPercent

VolumeStyle

VolumeWidth

VolumeDepthPercent

VolumeEdgePercent

HasVolume

UseXValue

ShowOpen

ShowClose

ShowHighLow

VolumeAxis

UseVolumeOrigin

VolumeOrigin

VolumeHasBottomEdge

VolumeHasTopEdge

Methods

Common


NSurfacePresentGroup

Overview The NSurfacePresentGroup object is used for the creation of surface charts. See the Surface Chart topic for more information.

Properties

DrawFlat

PositionMode

PositionValue

AutomaticPalette

SmoothPalette

FrameStyle

PaletteFrame

FillStyle

PaletteFill

PaletteTransparency

UseXValue

UseYValue

OptimizeTriangulation

SyncPaletteWithAxisScale

PaletteSteps

VisibleSurfaceSides

SidesOriginMode

SidesOrigin

SurfaceHoles

Methods

Common

FrameLine

ReTriangulate

Palette

SidesFillEffect

SidesMaterial

SidesBorder


NSystemPalette

Overview This object represents a palette used by the component. The palettes can be two types - predefined or custom. In the case of a predefined palette the user is not able to change its name and colors - his actions are limited to only reading this information. All palettes contained in the collection have 48 colors.

Properties

PredefinedPalette

PaletteName

Methods

GetColor

SetColor


NTextEx

Overview Most of the objects in the 3D scene have associated texts. In many cases you need to modify the text's appearance, because you want to achieve better readability, orientation and so on. The texts controlled by the NTextEx object have two modes - 2D and 3D. You can think of 2D texts like you think about the ordinary texts that you see displayed in Windows. You can offset these texts from their original position, align them horizontally and vertically to their original position (also called origin point) and modify their Font. 3D texts on the other hand are texts that are rendered in the 3D space and are a little bit more complex to handle because it is more difficult to position them properly. Both 2D and 3D texts have their advantages and disadvantages. 2D texts are more readable when you use small fonts but you cannot apply gradients or textures on them. They also do not scale when you resize the control. You can apply gradients and textures on 3D texts, but you'll loose some readability when using small fonts with 3D texts. You control the mode of the text by using the Use2DText property.

Properties

Font

OriginRotation

OriginElevation

OriginDistance

RotateAroundXAxis

RotateAroundYAxis

RotateAroundZAxis

Extrusion

Use2DText

TextOverlapsImage

OffsetX

OffsetY

Orientation

HorzAlign

VertAlign

Methods

FillEffect

Material

Backplane

ShowDialog

InitFromTextEx


Chart margins

Chart margins are a very convenient way to place your chart relatively in the control window. They define an area called chart area where the chart is positioned. The control guarantees that the chart walls and contents will not be displayed outside the chart area. Margins are specified in percents of the control window width and height. There are four margins as you might expect - Left chart margin, Right chart margin, Top chart margin and Bottom chart margin. Margins are specified in percents of the control window width (left and right margin) and control window height (top and bottom margin). The left chart margin must be always smaller or equal to the right one. The same rule is valid for the top and the bottom margin. To modify the chart margins you must change the LeftMargin, RigthMargin, TopMargin and BottomMargin properties of the NChart or NChartManager objects. By default the chart is positioned at LeftMargin = 10, TopMargin = 10, RightMargin = 90 and BottomMargin = 90. The following code modifies the default chart margins in order to display the chart in the upper left corner of the control window

NChart1.LeftMargin = 10
NChart1.TopMargin = 10
NChart1.RightMargin = 50
NChart1.BottomMargin = 50

Another very useful property related with chart margins is the ability to control the algorithm used to fit the chart into the chart area. The default algorithm is trying to scale the chart in all dimensions (X, Y, Z) proportionally. This algorithm (or margin strategy) is called Fit. There are cases however when this scaling is not desired - for example in a 2D bar chart that needs to be stretched along the width and height of the chart. In such cases you can take advantage of the Stretch algorithm. The following VB code snippet changes the default Fit algorithm to Stretch:

NChart1.MarginStrategy = msStretch

The possible values for the MarginStrategy property are msFit, msStretch and msNoMargins. When the MarginStrategy is set to msNothe the chart does not try to fit into the chart area. In this mode only the N3DView object properties control the chart dimensions. Following are some simple bar chart screenshots that illustrate how the Fit and Stretch margins strategies work in practice:

Fit margin strategy

Stretch margin strategy

Notice that in the above chart there is a smooth edge rectangle occupying the chart area. This is because we enabled the backplane object associated with the chart area. The properties of this object are available through the MarginBackplane method of the NChart or NChartManager objects. The following line of VB code makes the margin backplane visible:

NChart1.MarginBackplane.Visible = True

For more information on the NBackplane object refer to the "Working with backplanes" topic in the users guide or the NBackplane object description in the object reference.

Related examples. The multiple charts and legend example located in 3DChart\VB\MultipleCharts\General directory illustrates how to work with margins in practice.


Configuring the legend

3DChart possesses an integrated legend that can display various information about the chart. The flexible design of the integrated legend helps you to customize the displayed data with ease.

The NLegend object encapsulates the legend functionality. The user can gain access to the chart legend object with the help of the Legend method of the NChart object.

Dim legend As NLegend
Set legend = NChart1.Legend()

Currently the legend can operate in three modes: lmDisabled, lmAutomatic and lmManual. To change the legend mode you must modify the LegendMode property of the NLegend object. For example the following line of VB code disables the legend:

legend.LegendMode = lmDisabled

It is easy to guess that in lmDisabled mode the legend is not displayed, but how do the other modes function?

In lmAutomatic the legend displays information supplied by the presentation groups. Each presentation group has a NPresentGroupCommon object, which has several properties concerning the legend automatic mode. The first one is ShowInLegend. It controls whether the presentation group adds any entries to the chart legend. The LegendMode property controls what data about the presentation group is displayed in the chart legend. The following table gives explanation to the different presentation group legend modes.

Legend Mode | Comment
pglmCategories | The group will add in the legend the category labels of the categories in the presentation group range. The fill effect of the legend marks will be synchronized with the fill effect of the items
pglmSeries | The group will add in the legend the serie labels of the series in the presentation group range. The fill effect of the legend marks will be synchronized with the fill effect of the items
pglmDataItems | The group will add in the legend all data items in the presentation group range and format the legend texts with the LegendFormatString
pglmUniformAppearances | The group will add the Uniform Appearances in the legend. The legend mark labels will display the names the of the Uniform Appearances.
pglmPresentationGroup | The group will add only one item in the legend and the label of this item will be the name of the presentation group.
pglmPresentationGroupCustom | The group will add group specific information

Choosing lmAutomatic is most appropriate if the information that you want to display is contained in some way in the chart e.g. when you want to display categories, series, data items, uniform appearances or presentation groups in the integrated legend.

If you want to display some other information you should choose lmManual and feed the data in the legend manually. Each legend data item is represented by a NLegendData object. The legend data items are contained in a NLegendDataCollection object accessible with the help of the LegendDataCollection method of the NLegend object. Each NLegendData object has properties controlling the legend mark shape, text, mark fill effect, mark border and line properties.

Important: You are not able to pass data in the legend through the object if the legend is not in lmManual state. You must also have in mind that every time you change the legend mode the legend automatically deletes all manual items. This is why for example the following code will clear the legend:

NChart1.Legend.LegendMode = lmAutomatic
NChart1.Legend.LegendMode = lmManual

After choosing the legend mode you may also want to alter the position of the legend. The legend position is specified relatively to the control window with the help of the XMargin and YMargin properties:

NChart1.Legend.MarginX = 65
NChart1.Legend.MarginY = 25

In addition you can also specify how the legend must align relatively to the x and y margins. This is achieved with the help of the VerticalAlign and HorizontalAlign properties. The possible values for the VerticalAlign property are: vaCenter, vaBottom and vaTop. You can assign haCenter, haLeft and haBottom for the HorizontalAlign property respectively. The following screenshots illustrate how the chart positioning works:

Left horizontal and top vertical align | Center vertical and horizontal align

As you can see from the pictures above with the help of the MarginX, MarginY, HorizontalAlign and VerticalAlign properties you can position your virtually anywhere in the chart window. Following are some code snippets that define the most common legend positions:

1. Left

  NChart1.Legend.HorizontalAlign
 = haRight
NChart1.Legend.VerticalAlign = vaCenter
NChart1.Legend.MarginX = 5
NChart1.Legend.MarginY = 50

2. Right

  NChart1.Legend.HorizontalAlign
 = haLeft
NChart1.Legend.VerticalAlign = vaCenter
NChart1.Legend.MarginX = 95
NChart1.Legend.MarginY = 50

3. Top

  NChart1.Legend.HorizontalAlign
 = haCenter
NChart1.Legend.VerticalAlign = vaTop
NChart1.Legend.MarginX = 50
NChart1.Legend.MarginY = 5

4. Bottom

  NChart1.Legend.HorizontalAlign
 = haCenter
NChart1.Legend.VerticalAlign = vaBottom
NChart1.Legend.MarginX = 50
NChart1.Legend.MarginY = 95

This ends the discussion on chart margins and position. Now lets take a look at another very useful feature of the legend - the ability to stretch its width and height according to the control window dimensions. To illustrate when this feature may come handy lets imagine that you have to build a chart which is used to create thumbnail and large size images of some company sales in the web. One of the problems that you'll meet is that the legend dimension is determined by the size of the data items texts, font and mark size. All these components are specified in device units (pixels). When you produce the thumbnail the legend will look larger than in the original image. To avoid this side effect you can define the legend width and height in percents of the control window width and height respectively. Thus when you scale the image the legend proportions relatively to the conrol window will remain the same. The following VB code instructs the legend to stretch to 20% of the control window width and 50% of the control window height:

NChart1.Legend.StretchHeight = True
NChart1.Legend.StretchWidth = True
NChart1.Legend.WidthPercent = 20
NChart1.Legend.HeightPercent = 50

Now after we covered how you can position and stretch your legends its time to show you how you can decorate them. Each legend has a two backplanes - legend base and legend shadow. By default the shadow backplane is disabled but you may wish to enable it:

NChart1.Legend.ShadowBackplane.Visible = True

and probably set the Transparency value of the NFillEffect object associated with the backplane to 50%.

NChart1.Legend.ShadowBackplane.FillEffect.Transparency = 50

In addition you can also change legend base and shadow form to Rectangle, Ellipse, Circle, Cut edge rectangle or Smooth edge rectangle. The following code modifies the legend base shape:

NChart1.Legend.Backplane.Style = bpsSmoothEdgeRectangle ' I want my legend base to be a smooth edge rectangle

The shadow and base backplane objects are both instances of the NBackplane object which is described in detail in the "Working with backplanes" topic. So a complete discussion of the properties of this object is out of the scope of this topic.

Finally you should know that the legend data items can be displayed as a grid. This is achieved by enabling the Horizontal and Vertical lines of the legend:

NChart1.Legend.HorizontalLinesProps.EnableLines = True
NChart1.Legend.VerticalLinesProps.EnableLines = True

in addition you can also modify the legend border with the help of the OuterHorizontaLinesProps and OuterVerticalLinesProps methods which allow you to gain access to the NLineProperties objects controlling the outer legend borders.

Note that in this topic we intentionally omitted how you can work with multiple legends - this is achieved in another topic called Multiple charts and legends.

Related Examples. The example located in the Examples\3DChart\VB\Legend folder demonstrates the usage of the legend properties.


NAxisStripe

© 1998 - 2002 NEVRON LLC. All rights reserved.


Nevron LLC 3D ActiveX Standard

To ease the user to operate with all Nevron LLC components in an intuitive and consistent manner, we have created a set of automation objects and automation property pages, which are common to all Nevron components and that is why they were called The Nevron LLC 3D ActiveX Standard. Following is a brief description of these objects.

Fill Effects. One of the most important things in 3d imaging controls is the filling of 3d objects and surfaces. Every surface or 3D object in the components developed by Nevron has an attached NFillEffect object through which the user can control its filling from both visual and automation interfaces. The visual interface of the NFillEffect can be shown at runtime also. There are five types of fill effects:

  • Solid color - the user can also specify a standard window color and the component will automatically synchronize it with the current machine settings.

  • Gradient - 22 types of Excel like gradients.

  • Texture - apply a texture extracted from an image file. Currently the control support bitmap, GIF, JPEG, Tiff, Targa, WMF and PNG file formats.

  • Animated filling - this cool feature enables you to apply an animated texture extracted from an AVI file.

  • Pattern - 40 Excel like patterns.

The gradient, texture, animated texture and pattern filling types also have properties controlling their actual mapping on the surface. Three different map types are supported. The user can also choose from seven mapping layouts. The size and orientation of the applied filling can also be controlled. In general you will never have to deal with those properties, because the component automatically uses the best configuration for the current filling type, but they are a nice thing to have if you want to be more specific about the way you map your textures. The snapshots below show bars with different fill fill effects.

Solid Color | Gradient | Texture | Pattern

Materials. Except fill effect each 3d object has properties describing the way in which in reflects lighting. The programmer can control the surface ambient, diffuse and specular reflection colors as well as the object shininess and self - illuminance with the help of the standard NMaterial object. As far as lighting is concerned Nevron components can generally operate in two modes - with or without lightning. When the lighting is disabled then the material properties of the 3d objects and surfaces do not affect the image in any way. When lighting is turned on material properties work closely together with the fill effect to determine the final object filling. When solid color is specified as a fill effect of a particular object, only the material properties are taken into account. Other kinds of fill effects work in conjunction with material properties to determine the final surface appearance. The NMaterial object also has a visual interface, which can be displayed at runtime. The snapshots below show bars with different materials.

Smooth edge bar with red ambient and diffuse colors | Smooth edge bar with blue ambient and yellow diffuse color

Line Properties. All lines and 3d objects that have borders use the NLineProperties object to specify the line width, color and style. The NLineProperties object has a visual interface, which can be invoked at runtime. The snapshots below show lines with different color, width and style.

Dash line with green color | Line with dash dot style and red color

Frame Properties. Frame properties are used to specify frame surrounding of a particular area. The frame properties of an object are exposed to the programmer via the NFrameProperties automation object. The NFrameProperties also has a visual interface, which can be invoked at runtime. The most common usage of this object is for the surrounding of the control background.

Texts. Each text that is displayed by the Nevron LLC components has some properties controlling its appearance. These properties are exposed to the programmer via two automation objects - NText and NTextEx. The NText object controls the appearance of 2D texts only, while the NTextEx object also supports 3D texts mode. When the component visualizes 2D texts the user is able to control the font style, font size, boldness, italic and text orientation. Besides this the texts can be displayed with a back plane surronded by a frame. This feature is very useful especially in the case of labels which are primary used for displaying headers and footers. The 3D texts on the otherhand use OpenGL rendering primitives and are displayed in the 3D space of the component. The user is able to apply gradients and textures on 3D texts as well as control their extrusion.

Each of the two technologies has its advantages and drawbacks. The 2D texts are very useful when you have to display texts that must be very small (like texts with font size 9 for example), but still must be readable. Such texts appear for example on top of the bars in a bar chart or along the different axes. Another very useful feature of the 2D texts is that they always face the viewer and are independent from the current zoom factor applied on the 3D scene. You can also use alpha blending (transparency) on 2D texts. A certain disadvantage of 2D texts is that you are not able to apply more advanced fill effects like gradients, textures, animations or patters. 2D texts are also not affected by lighting.

Unlike 2D texts 3D texts are zoom dependable. Amongst the advantages of using 3D texts is that you can apply transformations (like rotations around the XYZ axes, scaling and translation). There is a normal vector associated with each 3D glyph (character) so lighting effects and material properties do influence the text visualization. The possibility to determine a 3D bounding rectangle around the text also makes the implementation of fill effects like gradients, textures, animations and patterns a trivial task. 3D texts also support transparency. All this makes 3D texts ideal when you want to display impressing texts. As you might expect there is a dark side. The first one is that when using 3D texts for displaying small texts they often become jagged and unreadable. The other one is that positioning a 3D text so that it faces the viewer is not an easy task and there is still no automated way in Nevron controls to do that.

The following table demonstrates 2d and 3d texts.

2D text with Arial bold font | 2D text with orientation 45 degrees | 2D text with a back plane
3D text with Arial bold font and gradient fill effect | 3D text with extrusion | 3D text with back plane

Import / Export functionality. The ActiveX components developed by Nevron come equipped with build in import / export capabilities provided from the NImportExport automation object. With it you can load and save the current state of the component in nsv files (the extension is an abbreviation from Nevron Save File). These save files are not only backward compatible (new versions will be able to read old save files) but are also component independent. This means that you can use the nsv file created from the 3DChart component to load the background of a 3DPieChart component for example. The nsv file can be loaded from URL addresses.

The NImportExport object also gives you the possibility to save the currently rendered image as a bitmap, png, jpeg, tiff and targa image file formats. The visual interface of this automation object is displayed with the ShowDialog method. The component also have a Import / Export verb which also displays the same dialog (in Visual Basic the verbs are shown in the menu when you click the right mouse button on the component).

3D View. Another important feature of the Nevron components is the ability to control the users view on the 3d scene. This is done trough the standard N3DView object. The Elevation, Rotation and Viewer rotation properties help you look at the scene from different positions and angles. The Zoom property helps you zoom in and out the image. The OffsetX and OffsetY properties move the image along the X and Y axes. Through the N3DView object you can also set an Orthogonal projection which is very helpful when you want to display a 2d like image. The 3DView property page visually exposes the functionality of the N3DView object of the component.

Lighting. All components developed by Nevron can have up to 8 lights to lit the scene. All lights can be individually controlled with properties specifying their lightning emission, position, light distribution and in the case of a directed light source - it's direction. Three automation objects programmatically expose this functionality - NLightModel, NLightSource and NLightCollection. The Lights property page visually exposes the functionality of these three objects. The preview window helps you visually see the result of the lights that you create.


AdvancedExportMedia

Overview Identifies the media in which the component must export the data

Values
aemText = 0
aemHTML = 1
aemXML = 2


AGPointStyle

Overview The style of a point in an advanced gradient.

Values
agpsCircle = 0
agpsRectangle = 1
agpsLine = 2


AlignmentMode

Overview Alignment modes for the function present group.

Values
amFront = 0
amCenter = 1
amBack = 2


AnnotationType

Overview Different types of annotation shapes.

Values
atBalloon = 0
atArrow = 1


AntialiasingType

Overview Defines how fill effects and lines synchronize with the general control settings for antialiasing

Values
atSynchronizeWithControl = 0
atUseAntialiasing = 1
atDoNotUseAntialiasing = 2


AxisCurrentPageMode

Overview Defines the current page modes

Values
acpmIndex = 0
acpmValue = 1


AxisPagingMode

Overview Defines the paging mode of the axes

Values
apmNone = 0
apmFixedPageCount = 1
apmFixedPageSize = 2


AxisScaleMode

Overview Defines the possible axis scale modes. This custom type is accepted by the ScaleMode property of the NAxis object and determines the scaling mode of the NAxis object.

Values
asmDimension = 0
asmValue = 1
asmLogarithmic = 2
asmDateTime = 3


AxisStyle

Overview Defines the shape of the chart axes

Values
asBar = 0
asTube = 1


AxisType

Overview Defines the axes of the 3DChart component. This custom type is accepted by the Axes method of the NChart object which gives you access to the desired chart axis.

Values
atLeftAxis = 0
atBackAxis = 1
atRightAxis = 2
atFrontAxis = 3
atCategoriesAxis = 4
atSeriesAxis = 5


BackplaneStyle

Overview The shape of the backplane applied on texts, legends, chart margins and labels.

Values
bpsRectangle = 0
bpsEllipse = 1
bpsCircle = 2
bpsCutEdgeRectangle = 3
bpsSmoothEdgeRectangle = 4


BarStyle

Overview Defines the possible bar styles. This custom type is used in presentation groups, which display bars and is used to specify different styles for the bars

Values
bsBar = 0
bsCylinder = 1
bsCone = 2
bsInvertedCone = 3
bsPyramid = 4
bsInvertedPyramid = 5
bsSmoothEdgeBar = 6
bsCutEdgeBar = 7


BrowserCapabilities

Overview When the control generates HTTP response it is useful to know the capabilities of the client browser. This is especially useful when you're building a web page which will be accessed from desktop computers or mobile devices (such as WAP enabled phones, Pocket PC or Palm.

Values
bcHTML = 0
bcWAP = 1


BrowserNavigate

Overview When the control generates "active response" the different object in the 3D scene have associated URL links. When the user clicks on an object the client control will navigate the browser (IE only) to the destination URL. For more information see the NMouseResponse object in the Object Reference.

Values
bnOpenInNewWindow = 1
bnNoHistory = 2
bnNoReadFromCache = 4
bnNoWriteToCache = 8
bnAllowAutosearch = 16
bnBrowserBar = 32


CandleStyle

Overview Defines the style of the candle. This custom type is accepted by the CandleStyle property of the NStockPresentGroup object.

Values
csBar = 0
csStick = 1


ChartPropertyPage

Overview Specifies which property page will be shown

Values
cppGeneralPPage = 0
cppDataPPage = 1
cppPresentGroupsPPage = 2
cppAxesPPage = 3
cppWallsPPage = 4
cppDatabasePPage = 5
cppLegendPPage = 6
cppAnnotationsPPage = 7
cppSettingsPPage = 8


ChartWallType

Overview This custom type defines the chart walls. It is passed as a parameter to the Walls method of the NChart object and determines the wall to which you want to gain access.

Values
cwtLeft = 0
cwtBack = 1
cwtRight = 2
cwtFront = 3
cwtFloor = 4


ClientSideScript

Overview The client side script used to describe the image map generated by the control.

Values
cssVBScript = 0
cssJScript = 1


CodeMediaType

Overview Specifies the type of code in which the state will be exported.

Values
cmdVisualBasic = 0
cmdVBScript = 1
cmdJScript = 2
cmdCPlusPlus = 3
cmdCSharp = 4


Advanced light settings Dialog

From this dialog you can modify some advanced parameters of the light source. When you check the uniform light distribution the light source distributes light in all directions. Otherwise it is emitting light in the direction specified by the direction vector. When the light source is a directional one (e.g. it is distributing light in a certain direction) you can also specify the spot cutoff angle parameter. The spot cutoff angle is defined as the maximum angle between the direction of the light and the direction from the light to the vertex being lighted. If it is greater than the spot cutoff angle, then the light is completely masked. Otherwise the spot exponent and the attenuation factors control its intensity. For more information see the OpenGL lighting model topic.


Common_ASPNET_Getting started

Type topic text here.


Building Internet and Intranet Applications

Nevron Components support VBScript and this makes possible their embedding in ActiveX containers that use this language. When it comes to building an Internet or Intranet charting solutions there is always one question – where does the component reside – on the client or on the server machine? In this topic we will discuss the usage of Nevron components on both the client and the server side.

  1. On The Client Side – in this case we assume that the component is already installed on the client machine (see Deploying Nevron ActiveX Components for more information). Inserting the control in HTML pages is done with the help of the <OBJECT> tag.

    Example:

    <OBJECT classid=clsid:B5CE1CD3-3AB9-11D3-9502-525400E61EDC height=370 id=Chart1
    style="HEIGHT: 370px; LEFT: 0px; TOP: 0px; WIDTH: 492px" width=492>
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_ExtentX" VALUE="13018">
    <PARAM NAME="_ExtentY" VALUE="9790">
    <PARAM NAME="_StockProps" VALUE="0">
    <PARAM NAME="Windowless" VALUE="1">
    <PARAM NAME="Transparent" VALUE="1">
    </OBJECT>

    This piece of code will add the 3DChart component in an HTML page. See the Deploying Nevron ActiveX components to get a list of the components CLSIDs.
    The first four properties are part of the standard MFC control properties. The last ones are of special interest when it comes to HTML pages. When the Windowless property is set to True the component does not have a window – it is instead displayed as a bitmap by the container. When Windowless is set to True you can also set the Transparent property to true , which will discard the currently activated background and replace it with the background of the container. This feature is very useful in HTML pages with applied background images or themes and gives the page more consistent outlook, because the chart seems to be a part of the image.

    The components can be controlled programmatically with scripting and can also load their state from files located on an Internet or Intranet address. This is achieved with the help of the LoadFile And LoadFromURL methods of the NImportExport object. You can use this feature to load the component’s state created on a server machine residing on the Intranet or the Internet.

    Examine the Internet Explorer examples to see some real code about the usage of the components in HTML pages.

  2. On The Server Side – Nevron ActiveX components can be integrated with ASP. The idea of this integration is that the component can dynamically render JPEG images as a response to user requests and place them in the resulting HTML page. Unfortunately you cannot use transparent backgrounds with ASP. The following piece of code creates the 3DChart component on the server side.

    ' create the chart component on the server
    Set NChart1 = Server.CreateObject("3DCHART.NChart.4")

    After you have already created the component you can modify it’s properties and finally render the image in a JPEG file:

    ' render the image as a JPEG with 100% quality
    NChart1.ImportExport.SaveJPEGImageFile “c:\ImageDir\Chart.jpg”, FALSE, 600, 400, True, 100, 0

    Now that we have the JPEG image we can easily place it in the resulting HTML with the following code:

    <img SRC=“c:\ImageDir\Chart.jpg”>

    Examine the ASP example that comes along with this product, to see some real code of ASP integration.

  3. Advanced ASP Integration Issues – there are cases when the server is accessed from more than one user, and the application must create the JPEG image dynamically as a response to the users requests. In this case we cannot use only one JPEG image file, because it might still be in use from another user when we try to render a new one. There are a lot of possible resolutions of this problem, but the common in all of them is that you must implement a naming mechanism that generates unique image file names. A nice idea is to use the Session ID with a time stamp:

    ’generate the image file names as a concatenation of the session id and a time stamp
    JPEGfile = "Chart" & Session.SessionId & Replace(Time,".","") & ".jpg"

    Other useful techniques can use GUIDs or randomly generated values. After the session with the user is over the application must delete the rendered images.
    There are more simple techniques that can be used to resolve the multi user problem. A nice idea is to set a maximum number of simultaneous visitors and iterated through a statically predefined number of image file names. Take a look at the ASP example that comes along with this product to see this technique in action.


Fill effect examples

To change the fill effect you must first modify the Type property to: fetSolidColor, fetGradient, fetImage, fetAnimation or fetPattern and then specify the parameter of the fill effect such as Color or ImageFileName. You can also use the shortcut functions that provide a convenient and efficient way to configure the NFIllEffect object. Using the shortcut functions is recommended because you can configure the fill effect with only one function call, which is generally faster and also ensures that you would not miss some parameters required by the fill effect.

The following pieces of VB code illustrate how to do this.

  1. Solid color

SomeObject.FillEffect.Type = fetSolidColor

SomeObject.FillEffect.Color = vbRed

-or-

SomeObject.FillEffect.SetSolidColor vbRed

  2. Gradient

SomeObject.FillEffect.Type = fetGradient

SomeObject.FillEffect.GradientStyle = gsHorizontal

SomeObject.FillEffect.GradientVariant = gvVariant3

SomeObject.FillEffect.GradientColor1 = vbYellow

SomeObject.FillEffect.GradientColor2 = vbRed

-or-

SomeObject.FillEffect.SetGradient gsHorizontal, gvVariant3, vbYellow, vbRed

  3. Texture (Image)

SomeObject.FillEffect.Type = fetImage

SomeObject.FillEffect.ImageMapType = mtMapType1

SomeObject.FillEffect.ImageFileName = “SwimmingPool.bmp"

-or-

SomeObject.FillEffect.SetImage “SwimmingPool.bmp", mtMapType1

  4. Animation

SomeObject.FillEffect.Type = fetAnimation

SomeObject.FillEffect.AnimationMapType = mtMapType0

SomeObject.FillEffect.AnimationFileName = “animation1.avi"

-or-

SomeObject.FillEffect.SetAnimation “animation1.avi", mtMapType0

  5. Pattern

SomeObject.FillEffect.Type = fetPattern

SomeObject.FillEffect.PatternType = ptDivot

SomeObject.FillEffect.PatternSize = psMedium

SomeObject.FillEffect.PatternForegroundColor = vbBlue

SomeObject.FillEffect.PatternBackgroundColor = vbRed

-or-

SomeObject.FillEffect.SetPattern ptDivot, psMedium, vbBlue, vbRed


IDL

IDL (Interface Definition Language) is a language that has its origins in OSF DCE and was originally used to define functional RPC interfaces in DCE and Microsoft RPC. Currently IDL is the best language for defining all things in COM.


NText

The NText automation object represents a 2D text. It is very much alike the NTextEx interface except that it has a simplified design and functionality. NText has the following properties and methods:
Name: Font
Type: IDispatch* - the font automation object
Description: Gives you access to the text’s font.
Name: HasBackPlane
Type: VARIANT_BOOL
Description: Indicates whether the text has a back plane. The default value for this property is FALSE.
Name: BackPlaneBound
Type: float
Description: Sometimes you may want to draw a rectangle around the text called a back plane. You must modify the BackPlaneBound property if you want to increase the size of the bounding back plane. The default value for this property is 0.20
Name: OffsetX
Type: float
Description: Controls the offset of the text along the X axis in pixels. The initial value for this property is 0.
Name: OffsetY
Type: float
Description: Controls the offset of the text along the Y axis in pixels. The initial value for this property is 0.
Name: HorzAlign
Type: HorizontalTextAlign (haCenter = 0, haLeft = 1, haRight = 2)
Description: the horizontal alignment of the text around the origin point.
Name: VertAlign
Type: VerticalTextAlign (vaCenter = 0, vaTop = 1, vaBottom = 2)
Description: the vertical alignment of the text around the origin point.
Methods:
Name: FillEffect
Parameters: None
Return Value: IDispatch* - the NFillEffect applied to the text.
Description: Gives you access the fill effect applied on the text.
Name: BackPlaneFillEffect
Parameters: None
Return Value: IDispatch* - the NFillEffect applied to the back plane.
Description: Gives you access the fill effect applied to the back plane of the text.
Name: BackPlaneLineProperties
Parameters: None
Return Value: IDispatch* - the NLIneProperties applied to back plane.
Description: Gives you access the line properties applied on the back plane.
Name: ShowDialog
Parameters: None
Return Value: VARIANT_BOOL - when FALSE indicates that no changes were made to the Text object.
Description: Shows a dialog that allows you to visually edit the NText object.


Overview

In the beginning of the Internet revolution web sites were static – meaning that they did not change their contents in response to the user’s demands. However this restriction was overcome with the introduction of different technologies for both the client and the server side. Two of them – the client side scripting and the server side scripting with ASP (Active Server Pages) will be discussed here in more detail, because they closely relate to the Internet integration strategy introduced by Nevron. This strategy is pursuing the following goals:

    • Ease of use – This is our main goal because we want to allow the programmer to concentrate on the logic of the web application rather than on the implementation details.

    • The ability to generate static images in the most common image file formats currently used. Nevron components have support for JPEG, PNG, TIFF, Targa and Bitmap. They are also do not dependent on the server video adapter or video settings, which ensures that your server side applications will produce the images with the required quality independent from the server settings. For example you can produce a true color (16bpp or 24bpp) on a server with a video adapter with only 8 bits per pixel.

    • The ability to generate active response. Today users and programmers are not satisfied if they’re only able to generate a static image on the web server. They want to be able to add client side programming to their HTML pages, which results in better interactivity. For example the server can generate a bar chart of the sales by regions and assign different URL links to bars. When the user clicks on a particular bar the client control will navigate the browser to the specified URL. You can also assign custom ToolTip’s containing descriptive information about the different chart elements.

    • Automatic temporary file handling – In the process of interaction between the client and the server the server controls generate a lot of temporary files such as JPEG, PNG or Bitmap images that can take a lot of disk space. However not all of them must be kept on the server. These files are called expired. Nevron components have a build in feature that enables them to automatically delete the expired temp files.

    • Browser detection – There are a lot of different browsers used by the Internet population these days. They differ in the extent of the support to some image file formats, support for client side scripting and ActiveX controls. Nevron controls can be configured to produce browser sensitive response. For example you can configure your component to send active response if your client is using IE or a PNG image if he is using Netscape or another browser.

All Nevron components can be used as server side components that generate images for Internet and corporate Intranet web sites. The following topics describe the necessary steps to integrate a Nevron component into your server applications.

We assume that you are familiar with:

- Internet Information Server

- Active Server Pages scripting

- HTML basics

- VBScript


Useful tips

There are a few simple


Welcome
Replace this sample help topic with your own help topic, or type Ctrl-T to add a new Help topic.


ConstLineStyle

Overview Defines the style of an axis const line. This custom type is accepted by the Style property of the NAxisConstLine object.

Values
clsLine = 0
clsRectangle = 1
clsParallelepiped = 2


ControlVersion

Overview The Control version defined by the language and whether or not the control is Unicode

Values
cvEnglishUSAnsi = 0
cvEnglishUSUnicode = 1
cvBrazilianPortugueseAnsi = 2
cvBrazilianPortugueseUnicode = 3
cvSpanishCatalanAnsi = 4
cvSpanishCatalanUnicode = 5
cvChineseSimplifiedAnsi = 6
cvChineseTraditionalUnicode = 7
cvDanishAnsi = 8
cvDanishUnicode = 9
cvDutchAnsi = 10
cvDutchUnicode = 11
cvFrenchAnsi = 12
cvFrenchUnicode = 13
cvGermanAnsi = 14
cvGermanUnicode = 15
cvItalianAnsi = 16
cvItalianUnicode = 17
cvJapaneseAnsi = 18
cvJapaneseUnicode = 19
cvPolishAnsi = 20
cvPolishUnicode = 21
cvRussianAnsi = 22
cvRussianUnicode = 23
cvSpanishAnsi = 24
cvSpanishUnicode = 25


DataPointObject

Overview Identifies the object properties of the data point. This enum is primary used in the database integration when the user maps a field to a specific property of one of the objects its data point contains

Values
dpoFillEffect = 0
dpoMaterial = 1
dpoBorder = 2
dpoMouseResponse = 3
dpoTextEx = 4
dpoAnnotation = 5


DataType

Overview Defines the data type of the data storage. See the Data Storage topic for more information.

Values
dtDataType11 = 0
dtDataType12 = 1
dtDataType13 = 2
dtDataType14 = 3
dtDataType15 = 4
dtDataType16 = 5
dtDataType21 = 6
dtDataType22 = 7
dtDataType23 = 8
dtDataType24 = 9
dtDataType25 = 10
dtDataType26 = 11
dtDataType31 = 12
dtDataType32 = 13
dtDataType33 = 14
dtDataType34 = 15
dtDataType35 = 16
dtDataType36 = 17
dtDataType45 = 18
dtDataType46 = 19
dtDataType55 = 20
dtDataType56 = 21
dtDataType65 = 22
dtDataType66 = 23


DataValueType

Overview Defines the possible data values of each data point.

Values
dvtValue1 = 0
dvtValue2 = 1
dvtValue3 = 2
dvtValue4 = 3
dvtValue5 = 4
dvtValue6 = 5
dvtLabel = 6
dvtColor = 7
dvtFillEffect = 8
dvtMaterial = 9
dvtBorder = 10
dvtMouseResponse = 11
dvtTextEx = 12
dvtAnnotation = 13


DBAnnotationProperties

Overview Identifies the properties of the NAnnotation object that can be imported from a database

Values
dbtpText = 0
dbtpAnnotationType = 1
dbtpVisible = 2


DBBorderProperties

Overview Identifies the properties of the line properties object that can be imported from a database

Values
dbbpColor = 0
dbbpStyle = 1
dbbpWidth = 2
dbbpFactor = 3
dbbpPattern = 4


DBFillEffectProperties

Overview Identifies the properties of the fill effect that can be imported from a database

Values
dbfepColor = 0
dbfepImageFileName = 1
dbfepAnimationFileName = 2


DBMaterialProperties

Overview Identifies the properties of the material that can be imported from a database

Values
dbmpAmbientColor = 0
dbmpSpecularColor = 1
dbmpDiffuseColor = 2
dbmpEmissiveColor = 3


DBMouseResponseProperties

Overview Identifies the properties of the mouse response object that can be imported from a database

Values
dbmrpURL = 0
dbmrpFlags = 1
dbmrpTargetFrameName = 2
dbmrpPostData = 3
dbmrpHeaders = 4
dbmrpTooltip = 5
dbmrpMousePointer = 6


DBTextExProperties

Overview Identifies the properties of the NTextEx object that can be imported from a database

Values
tepOffsetX = 0
tepOffsetY = 1
tepOrientation = 2
tepHorzAlign = 3
tepVertAlign = 4


DoughnutStyle

Overview Controls the shape of the doughnut segments

Values
dsSegment = 0
dsTorus = 1


DragDataType

Overview Specifies the type of drag data. When the drag data type is dtBitmap the control will store a Windows bitmap in the drag data source. Otherwise when the type is dtNative the control will store native state data in .nsv format.

Values
dtBitmap = 0
dtNative = 1


DropEffect

Overview The effect that the user chose for the drop operation. It can be one or more of the following: a copy, move or link operation.

Values
deNone = 0
deCopy = 1
deMove = 2
deLink = 3
deScroll = 4


ErrorPresentStyle

Overview Defines the error style in the error presentation group

Values
epsTop = 0
epsBottom = 1
epsTopBottom = 2
epsLeft = 3
epsRight = 4
epsLeftRight = 5


FEGradientStyle

Overview Defines the style of the gradient or in other words the way the starting color fades to the ending color. For more information see the NFillEffect object description in the Object Reference.

Values
gsHorizontal = 0
gsVertical = 1
gsDiagonalUp = 2
gsDiagonalDown = 3
gsFromCorner = 4
gsFromCenter = 5


FEGradientVariant

Overview Defines the gradient variant. Every gradient style has four different variations except the gsFromCenter style. For more information see the NFillEffect object description in the Object Reference.

Values
gvVariant1 = 0
gvVariant2 = 1
gvVariant3 = 2
gvVariant4 = 3


FELayout

Overview The layout used when mapping a texture on some object in the 3D space. For more information see the NFillEffect object description in the Object Reference.

Values
lStretched = 0
lFitted = 1
lCentered = 2
lTiled = 3
lStretchedToWidth = 4
lStretchedToHeight = 5
lCropFitted = 6


FEMapType

Overview Defines how textures are mapped on the object surface. Mapping can be relative to the viewer (mtEyeLinear) relative to the object (mtObjectLinear) or environmental (mtSphere). In mtObjectLinear you can also specify a mapping layout. mtSphere is used for special visual effects like reflection. For more information see the NFillEffect object description in the Object Reference.

Values
mtEyeLinear = 0
mtObjectLinear = 1
mtSphere = 2


FEPatternType

Overview Defines the pattern type. For more information see the NFillEffect object description in the Object Reference.

Values
ptPercent5 = 0
ptPercent10 = 1
ptPercent20 = 2
ptPercent25 = 3
ptPercent30 = 4
ptPercent40 = 5
ptPercent50 = 6
ptPercent60 = 7
ptPercent70 = 8
ptPercent75 = 9
ptPercent80 = 10
ptPercent90 = 11
ptLightDownwardDiagonal = 12
ptLightUpwardDiagonal = 13
ptDarkDownwardDiagonal = 14
ptDarkUpwardDiagonal = 15
ptWideDownwardDiagonal = 16
ptWideUpwardDiagonal = 17
ptLightVertical = 18
ptLightHorizontal = 19
ptNarrowVertical = 20
ptNarrowHorizontal = 21
ptDarkVertical = 22
ptDarkHorizontal = 23
ptDashedDownwardDiagonal = 24
ptDashedUpwardDiagonal = 25
ptDashedHorizontal = 26
ptDashedVertical = 27
ptSmallConfetti = 28
ptLargeConfetti = 29
ptZigZag = 30
ptWave = 31
ptDiagonalBrick = 32
ptHorizontalBrick = 33
ptWeave = 34
ptPlaid = 35
ptDivot = 36
ptDottedGrid = 37
ptDottedDiamond = 38
ptShingle = 39
ptTrellis = 40
ptSphere = 41
ptSmallGrid = 42
ptLargeGrid = 43
ptSmallCheckerBoard = 44
ptLargeCheckerBoard = 45
ptOutlinedDiamond = 46
ptSolidDiamond = 47


FEType

Overview Defines the possible fill effects

Values
fetSolidColor = 0
fetGradient = 1
fetImage = 2
fetAnimation = 3
fetPattern = 4
fetAdvancedGradient = 5


FirstFailType

Overview Defines the first fail algorithm of the NShmooPresentGroup.

Values
fftFirstXFail = 0
fftFirstYFail = 1
fftFirstZFail = 2


FrameStyle

Overview Defines the style of the frame. You may need a frame when you want your control background to be more consistent with the other Windows controls displayed by your form. For more information see the NFrameProperties object in the Object Reference.

Values
fsNone = 0
fsRaised = 1
fsSunken = 2


GrayScaleType

Overview Defines how fill effects, lines, materials and lights synchronize with the general control settings for grayscaling.

Values
gsSynchronizeWithControl = 0
gsGrayScale = 1
gsColor = 2


Index

© 1998 - 2002 NEVRON LLC. All rights reserved.


Content

© 1998 - 2002 NEVRON LLC. All rights reserved.


HorizontalAlign

Overview The horizontal alignment relative to the origin (margin) point.

Values
haCenter = 0
haLeft = 1
haRight = 2


HTMLTag

Overview Defines the returned tag type from the EmbedInHtml function when the control is used in ASP scripts. For more information see the NAspManager object in the Object Reference.

Values
tAuto = 0
tJPEG = 1
tPNG = 2
tTIFF = 3
tTARGA = 4
tBitmap = 5
tActiveX = 6
tImageMap = 7
tFullControl = 8
tSVG = 9


ImageMapFormat

Overview Defines the image format used for the image attached to the generated image map.

Values
imfJPEG = 0
imfPNG = 1
imfBitmap = 2


ImageMapType

Overview Identifies the whether the control should encode image maps in HTML or SVG

Values
imtHTML = 0
imtSVG = 1


KeyboardState

Overview When the control fires a keyboard event this enum is used to identify whether some special keys like Alt or Ctrl has been pressed

Values
ksNone = 0
ksLeftAlt = 1
ksRightAlt = 2
ksLeftShift = 4
ksRightShift = 8
ksLeftControl = 16
ksRightControl = 32
ksAlt = 64
ksShift = 128
ksControl = 256


LegendExpand

Overview Defines the legend expand strategies, or in other words in which dimension will the legend grow when new items are added to the legend data item collection

Values
leRowsOnly = 0
leColsOnly = 1
leRowsFixed = 2
leColsFixed = 3


LegendMarkShape

Overview Defines the possible legend mark shapes. This custom type is accepted by the MarkShape property of the NLegendData object and is used to specify the shape of the legend mark. When the legend is operating in lmAutomatic mode the component automatically determines the appropriate legend mark shapes.

Values
lmsNone = 0
lmsRectangle = 1
lmsCircle = 2
lmsDiamond = 3
lmsTriangle = 4
lmsInvertedTriangle = 5
lmsCross = 6
lmsDiagonalCross = 7
lmsStar = 8


LegendMode

Overview This custom type is accepted by the LegendMode property and controls the mode of the 3DChart integrated legend. When the LegendMode property is set to lmDisabled the legend is not shown. In lmAutomatic mode the legend displays the presentation groups of the component. In lmManual mode the user is able to fill the legend with custom data. See the Configuring the Legend topic for more information.

Values
lmDisabled = 0
lmAutomatic = 1
lmManual = 2


LightScheme

Overview Nevron controls posses nine predefined light schemes that enable you to configure your light sources with one function call.

Values
lsStandardWhite = 0
lsStandardRed = 1
lsStandardGreen = 2
lsStandardBlue = 3
lsSpotWhite = 4
lsSpotRed = 5
lsSpotGreen = 6
lsSpotBlue = 7
lsArena = 8


LinePresentStyle

Overview Defines the style of the line displayed by the NLinePresentGroup (used for line charts). This custom type is accepted by the LineStyle property of the NLinePresentGroup object.

Values
lpsTube = 0
lpsTape = 1
lpsLine = 2


LineStyle

Overview Defines the line style (or pattern).

Values
lsCustom = 0
lsSolid = 1
lsDash = 2
lsDot = 3
lsDashDot = 4
lsDashDotDot = 5


LogarithmStepMode

Overview Defines the logarithm step mode, when the axis is operating in logarithmic mode.

Values
lsmExponent = 0
lsmFixed = 1


Log file

3dchartThu Nov 23 20:03:10 2000


MarginStrategy

Overview Defines the strategy used to fit the chart in the margin area

Values
msNoMargins = 0
msStretch = 1
msFit = 2


MarkType

Overview Controls the type of annotation displayed at each data point

Values
mtNone = 0
mtText = 1
mtAnnotation = 2


MouseAction

Overview When the control fires event it always passes as a parameter a NMouseState object defining the mouse and keyboard state at the time when the event was generated. The MouseAction enumeration defines the mouse action that caused the event. For more information see the NMouseState object description in the Object Reference.

Values
maLButtonClick = 0
maLButtonDoubleClick = 1
maRButtonClick = 2
maRButtonDoubleClick = 3
maMouseMove = 4


MouseActionMode

Overview Defines how the controls must respond to mouse input. For more information see the NEventManager object description in the Object Reference.

Values
mmDisabled = 0
mmSelection = 1
mmEvent = 2
mmTooltip = 4
mmContextMenu = 8
mmBeginDrag = 16
mmChangeMouseCursor = 32
mmRedirectBrowser = 64


MouseDragMode

Overview Defines how the controls must respond to mouse input. For more information see the NEventManager object description in the Object Reference.

Values
mdDisabled = 0
mdTrackBall = 1
mdZoom = 2
mdOffset = 3


MousePointer

Overview Defines a mouse pointer. For a complete description on the different mouse pointers see the description of MousePointer property of the NMouseResponseObject.

Values
mpArrow = 1
mpCross = 2
mpBeam = 3
mpSizeNESW = 4
mpSizeNS = 5
mpSizeNWSE = 6
mpSizeWE = 7
mpUpArrow = 8
mpWait = 9
mpNo = 10
mpAppStarting = 11
mpHelp = 12
mpSizeAll = 13
mpLinkSelect = 14
mpHand = 15


Elevation

Name: Elevation

Applies To: N3DView

Type: Single

Remarks: The elevation of the viewpoint in degrees. The default value is 90 degrees which ensures that the viewer looks at the scene from the top of the Z-axis.

Example:

NevronControl.Get3DView.Elevation = 120 'modify the Elevation


OffsetX

Name: OffsetX

Applies To: N3DView

Type: Single

Remarks: Sometimes you may want to offset the 3D scene center from the control's center. An example of such a case is when you have a chart and a legend that completely occupies the right part of the control. To avoid overlapping you may consider moving the chart to the left side of the control's window. The OffsetX parameter enables you to do this. The OffsetX is given in OpenGL units. The default value for this property is 0 resulting in a centered 3D scene.

Example:

NevronControl.Get3DView.OffsetX = -1 'offset the 3D scene from the center to the left


OffsetY

Name: OffsetY

Applies To: N3DView

Type: Single

Remarks: The OffsetY property works in the same way as the OffsetX property except that it moves the 3D scene along the Y axis. For more information see the OffsetX property description.

Example:

NevronControl.Get3DView.OffsetY = -1 'offset the 3D scene from the center to the top


OpenGL2Window

Name: OpenGL2Window

Applies To: N3DView

Parameters:

Single fGLX

Single fGLY

Single fGLZ

ByRef Single pnWinX

ByRef Single pnWinY

ByRef Single pnWinZ

Return Value: Boolean

Remarks: Converts OpenGL coordinates to window coordinates. The fGLX, fGLY and fGLZ are given in OpenGL units. If the conversion is successful the projected coordinates are received in pnWinX, pnWinY, pnWinZ. The pnWinX and pnWinY parameters receive the projected coordinates in pixels relatively to the bottom left window corner.The pnWinZ parameters receives the depth of the point and ranges from 0 to 1. A depth of 0 indicates that the point lies on the near volume plane whereas 1 means that the point lies on the far volume plane. The function will fail and return False if the control has invalid window dimensions (like in ASP for example).

Example:

NevronControl.Get3DView.OpenGL2Window 0, 0, 0, fWinX, fWinY, fWinZ ' fWinX, fWinY, fWinZ receive the window coordinates where the center of the OpenGL coordinate system will be projected.


PerspectivePercent

Name: PerspectivePercent

Applies To: N3DView

Type: Single

Remarks: In perspective projection the projection matrix is determined as a linear combination of a perspective matrix and a linear matrix. The PerspectivePercent percent controls this process. If PerspectivePercent is 100% then the projection is perspective. If it is 0 the projection matrix is an orthogonal matrix. Thus smaller PerspectivePercent values mean less perspective. The possible values of this property vary from 0 to 100. The default value is 100.

Example:

NevronControl.Get3DView.PerspectivePercent = 50 'use perspective projection with less perspective


ProjectionType

Name: ProjectionType

Applies To: N3DView

Type: PTProjectionType

Remarks: Specifies the projection type of the camera. Possible values are ptPerspective and ptOrthogonal. ptPerspective is more suitable for 3D scenes. If you want to display a 2D scene you may consider switching to orthogonal projection. In perspective mode you can also control the perspective percent parameter. In ptOrthogonal you can modify XDepthAngle and YDepthAngle parameters that allow you to achieve 2 and a half projection.

Example:

NevronControl.Get3DView.ProjectionType = ptOrthogonal 'switch to orthogonal projection
            NevronControl.Get3DView.XDepthAngle = 46 '2 and a half projection
NevronControl.Get3DView.YDepthAngle = 45


Rotation

Name: Rotation

Applies To: N3DView

Type: Single

Remarks: The rotation of the viewpoint around the Z-axis in degrees. The default value is 270.

Example:

NevronControl.Get3DView.Rotation = 250


SetPredefinedProjection

Name: SetPredefinedProjection

Applies To: N3DView

Parameters:

PredefinedProjection nPredefinedProjection

Return Value: None

Remarks: Nevron controls posses 18 predefined projection schemes. The SetPredefinedProjection loads a predefined projection. Possible values are pp2D, pp2DHorizontalLeft, pp2DHorizontalRight, pp2DTop, pp2DTopHorizontalLeft, pp2DTopHorizontalRight, pp2DHalf ,pp2DHalfHorizontalLeft, pp2DHalfHorizontalRight, pp2DHalfTop, pp2DHalfTopHorizontalLeft, pp2DHalfTopHorizontalRight, pp3D, pp3DHorizontalLeft, pp3DHorizontalRight, pp3DTop,pp3DTopHorizontalLeft and pp3DTopHorizontalRight. To see the predefined projection you go the "3D View" property page of the control and press the "Predefined projections..." button.

Example:

NevronControl.Get3DView.SetPredefinedProjection pp2DHalfTop 'load pp2DHalfTop projection


ShowDialog

Name: ShowDialog

Applies To: N3DView

Parameters: None

Return Value: None

Remarks: Shows the visual interface of the 3DView object.

Example:

NevronControl.Get3DView.ShowDialog


ViewerRotationAngle

Name: ViewerRotationAngle

Applies To: N3DView

Type: Single

Remarks: The rotation of the viewer coordinate system. The default value is 0.

Example:

NevronControl.Get3DView.ViewerRotationAngle = 90 'rotate the viewer at 90 degrees


Window2OpenGL

Name: Window2OpenGL

Applies To: N3DView

Parameters:

Single fWinX

Single fWinY

Single fWinZ

ByRef Single pglX

ByRef Single pglY

ByRef Single pglZ

Return Value: Boolean

Remarks: This function is analogous to the OpenGL2Window function. It takes window coordinates (fWinX, fWinY and fWinZ) and unprojects them in the OpenGL coordinate system. The function will fail and return False if the control has invalid window dimensions (like in ASP for example).

Example:

NevronControl.Get3DView.Window2OpenGL 100, 100, 0, glX, glY, glZ 'get the OpenGL coordinates which project to point with coordinates 100, 100


XDepthAngle

Name: XDepthAngle

Applies To: N3DView

Type: Single

Remarks: The X depth angle in degrees when using 2D projection. When you use the standard 2D projection the Z coordinate does not influence the projected coordinates, because the depth is not taken into account. To create a 2 and a half projection for example you'll need a projection that uses the Z coordinate to generate a positive or negative offset. This property controls the X offset added to the projected object coordinates.

Example:

NevronControl.Get3DView.ProjectionType = ptOrthogonal 'switch to orthogonal projection
            NevronControl.Get3DView.XDepthAngle = 45 '2 and a half projection
NevronControl.Get3DView.YDepthAngle = 45


YDepthAngle

Name: YDepthAngle

Applies To: N3DView

Type: Single

Remarks: The Y depth angle in degrees when using 2D projection. When you use the standard 2D projection the Z coordinate does not influence the projected coordinates, because the depth is not taken into account. To create a 2 and a half projection for example you'll need a projection that uses the Z coordinate to generate a positive or negative offset. This property controls the Y offset added to the projected object coordinates.

Example:

NevronControl.Get3DView.ProjectionType = ptOrthogonal 'switch to orthogonal projection
            NevronControl.Get3DView.XDepthAngle = 45 '2 and a half projection
NevronControl.Get3DView.YDepthAngle = 45


Zoom

Name: Zoom

Applies To: N3DView

Type: Single

Remarks: The zooming factor applied to the 3D scene. The possible values for this property vary from 1 to 1000. The default value is 100%.

Example:

NevronControl.Get3DView.Zoom = 125 'zoom in a little bit


ExportDataStorage

Name: ExportDataStorage

Applies To: NAdvancedExport

Parameters:

String bstrFile

AdvancedExportMedia media

Boolean bExportCategories

Boolean bExportSeries

Boolean bExportLevels

Return Value: Boolean


ExportPresentGroups

Name: ExportPresentGroups

Applies To: NAdvancedExport

Parameters:

String bstrFile

AdvancedExportMedia media

Variant arrPresGroups

Boolean bExportCategories

Boolean bExportSeries

Boolean bExportLevels

Return Value: Boolean


AddPoint

Name: AddPoint

Applies To: NAdvancedGradient

Parameters:

None nX

None nY

OLE_COLOR rcColor

AGPointStyle nPointStyle

None nIntensity

Single fAngle

Return Value: None

Remarks: Adds a new point to the advanced gradient at coordinates [nX, nY]. The coordinates are specified in percents of the gradient image where [0, 0] means the upper left corner of the advanced gradient and [100, 100] points to the bottom right. rcColor defines the color of the new point. nPointStyle can be one of the following: agpsCircle, agpsLine, agpsRectangle and defines the how the point distributes its color in the gradient. nIntensity defines the intensity (influence) of the point into the final gradient. For line and rectangle style points you can also use the fAngle in order to rotate the rectangle or line arount the point specified by nX and nY.

Example:

NAdvancedGradient.AddPoint 50, 50, vbRed, agpsCircle, 70, 0 'add a circle red point with intensity 70
NAdvancedGradient.AddPoint 50, 10, vbWhite, agpsLine, 10, 0 'add a low intesity horizontal white line
NAdvancedGradient.AddPoint 10, 20, vbYellow, agpsRectangle, 10, 45 ' add a low intensity rectange at the left top corner of the gradient. The rectange is rotated at 45%.


BackgroundColor

Name: BackgroundColor

Applies To: NAdvancedGradient

Type: OLE_COLOR

Remarks: The background color of the advanced gradient. This color is merged with the colors of the different points in the gradient.

Example:

AdvancedGradient.BackgroundColor = vbRed ' set a red background color for the gradient


Clear

Name: Clear

Applies To: NAdvancedGradient

Parameters: None

Return Value: None

Remarks: Resets the advanced gradient. This function will remove all points from the advanced gradient and then will set the background color of the gradient to Black.

Example:

NAdvancedGradient.Clear 'reset the gradient


DeletePoint

Name: DeletePoint

Applies To: NAdvancedGradient

Parameters:

None nIndex

Return Value: None

Remarks: Deletes the point at position nIndex in the device gradient. The function will fail if you pass an invalid index. The following example will delete the first point of the gradient:

Example:

NAdvancedGradient.DeletePoint 0


EditPoint

Name: EditPoint

Applies To: NAdvancedGradient

Parameters:

None nIndex

None nX

None nY

OLE_COLOR rcColor

AGPointStyle nPointStyle

None nIntensity

Single fAngle

Return Value: None

Remarks: Modifies the properties of the point with index nIndex in the advanced gradient. The function will fail if you pass an incorrect index. The nX, nY, rcColor, nPointStyle, nIntensity, fAngle parameters have the same meaning as the parameters of the AddPoint function. The following example retrieves and modifies the first point position by moving it towards the bottom of the gradient.

Example:

Dim nX As Long
Dim nY As Long
Dim nIntensity As Long
Dim rcColor As OLE_COLOR
Dim PointStyle As AGPointStyle
Dim fAngle As Single
NFillEffect.Type = fetAdvancedGradient
NFillEffect.AdvancedGradient.Clear
NFillEffect.AdvancedGradient.AddPoint 50, 50, vbRed, agpsCircle, 70, 0
NFillEffect.AdvancedGradient.GetPoint 0, nX, nY, rcColor, PointStyle, nIntensity, fAngle
nY = nY + 20
NFillEffect.AdvancedGradient.EditPoint 0, nX, nY, rcColor, PointStyle, nIntensity, fAngle


GetPoint

Name: GetPoint

Applies To: NAdvancedGradient

Parameters:

None nIndex

ByRef None pnX

ByRef None pnY

ByRef OLE_COLOR prcColor

ByRef AGPointStyle pnPointStyle

ByRef None pnIntensity

ByRef Single pfAngle

Return Value: None

Remarks: Retrieves the properties of the point with index nIndex in the advanced gradient. The function will fail if you pass an incorrect index. The pnX, pnY, prcColor, pnPointStyle, pnIntensity, pfAngle output parameters have the same meaning as the parameters of the AddPoint function. The following example retrieves and modifies the first point position by moving it towards the bottom of the gradient.

Example:

Dim nX As Long
Dim nY As Long
Dim nIntensity As Long
Dim rcColor As OLE_COLOR
Dim PointStyle As AGPointStyle
Dim fAngle As Single
NFillEffect.Type = fetAdvancedGradient
NFillEffect.AdvancedGradient.Clear
NFillEffect.AdvancedGradient.AddPoint 50, 50, vbRed, agpsCircle, 70, 0
NFillEffect.AdvancedGradient.GetPoint 0, nX, nY, rcColor, PointStyle, nIntensity, fAngle
nY = nY + 20
NFillEffect.AdvancedGradient.EditPoint 0, nX, nY, rcColor, PointStyle, nIntensity, fAngle


GetPointsCount

Name: GetPointsCount

Applies To: NAdvancedGradient

Parameters: None

Return Value: None

Remarks: Returns the count of the points in the advanced gradient.The following example will display "1".

Example:

NAdvancedGradient.Clear
NAdvancedGradient.AddPoint 50, 50, vbRed, agpsCircle, 70, 0
MsgBox CStr(NAdvancedGradient.GetPointsCount)


InitFromAdvancedGradient

Name: InitFromAdvancedGradient

Applies To: NAdvancedGradient

Parameters:

Object pAdvancedGradient

Return Value: None

Remarks: This method initializes the object from another advanced gradient object.

Example:

NAdvancedGradient1.Clear
NAdvancedGradient1.AddPoint 50, 50, vbRed, agpsCircle, 70, 0
NAdvancedGradient2.InitFromAdvancedGradient NAdvancedGradient1 'now NAdvancedGradient2 is the same as NAdvancedGradient1


Add

Name: Add

Applies To: NAdvancedGradientCollection

Parameters: None

Return Value: Object

Remarks: Adds a new advanced gradient to the custom advanced gradient collection and returns a reference to it.

Example:

Dim AdvancedGradient As NAdvancedGradient
Set AdvancedGradient = NChart1.Background.FillEffect.AdvancedGradientGallery.Add
AdvancedGradient.AddPoint 50, 50, vbWhite, agpsCircle, 100, 0 ' modify the new advanced gradient


GetAt

Name: GetAt

Applies To: NAdvancedGradientCollection

Parameters:

Long Index

Return Value: Object

Remarks: Returns the NAdvancedGradient object at Index position in the NAdvancedGradientCollection. The index is zero based.

Example:

Dim AdvancedGradient As NAdvancedGradient
Set AdvancedGradient = NAdvancedGradientCollection.GetAt(0) 'retrieve the first advanced gradient in the collection


GetCount

Name: GetCount

Applies To: NAdvancedGradientCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of the custom advanced gradient in the NAdvancedGradientCollection.

Example:

NAdvancedGradientCollection.GetCount 'get the count of the advanced gradients in the collection


RemoveAll

Name: RemoveAll

Applies To: NAdvancedGradientCollection

Parameters: None

Return Value: None

Remarks: Removes all the custom advanced gradients from the NAdvancedGradientCollection collection.

Example:

NAdvancedGradientCollection.RemoveAll 'clear the collection


RemoveAt

Name: RemoveAt

Applies To: NAdvancedGradientCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the custom advanced gradient at Index position in the NAdvancedGradientCollection. The Index is zero based.

Example:

NAdvancedGradientCollection.RemoveAt 0 ' remove the first custom advanced gradient


AnnotationType

Name: AnnotationType

Applies To: NAnnotation

Type: AnnotationType

Remarks: Defines the type of the annotation object. Possible values are atBalloon (default) and atArrow.

Example:

annotation.AnnotationType = atArrow


ArrowAngle

Name: ArrowAngle

Applies To: NAnnotation

Type: Long

Remarks: The angle between the annotation's arrow and a horizontal line. Measured in Degrees. With the help of this property the annotation can be rotated around its arrow pointer.

Example:

annotation.ArrowAngle = 45


ArrowLength

Name: ArrowLength

Applies To: NAnnotation

Type: Long

Remarks: Defines the length of the annotation's arrow (for Balloon only).

Example:

annotation.ArrowLength = 55


Border

Name: Border

Applies To: NAnnotation

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLineProperties object applied on the annotation border.

Example:

annotation.Border.Width = 3


FillEffect

Name: FillEffect

Applies To: NAnnotation

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFillEffect object applied on the annotation.

Example:

annotation.FillEffect.SetSoldColor vbRed


InflateTextX

Name: InflateTextX

Applies To: NAnnotation

Type: Long

Remarks: Determines the number of pixels the annotation is wider than the text that it contains.

Example:

annotation.InflateTextX = 20


InflateTextY

Name: InflateTextY

Applies To: NAnnotation

Type: Long

Remarks: Determines the number of pixels the annotation is higher than the text that it contains.

Example:

annotation.InflateTextY = 10


MouseResponse

Name: MouseResponse

Applies To: NAnnotation

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMouseResponse object applied on the annotation.

Example:

annotation.MouseResponse.SetTooltip "This Annotation has a custom tooltip"


PointerPositionX

Name: PointerPositionX

Applies To: NAnnotation

Type: Long

Remarks: This is the x-position of the annotation pointer when the position mode is 2D. It is measured in percents of the chart window.

Example:

annotation.PointerPositionX = 50


PointerPositionY

Name: PointerPositionY

Applies To: NAnnotation

Type: Long

Remarks: This is the y-position of the annotation pointer when the position mode is 2D. It is measured in percents of the chart window.

Example:

annotation.PointerPositionX = 50


Position3D

Name: Position3D

Applies To: NAnnotation

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPoint3D object that controls the position of the annotation arrow pointer when the annotation works in 3D positioning mode.

Example:

annotation.Position3D.PosX = 0.7


PositionMode3D

Name: PositionMode3D

Applies To: NAnnotation

Type: Boolean

Remarks: Determines the positioning mode of the annotation object. If the property is set to True (default) then the annotation is in 3D positioning mode. The arrow pointer is "attached" to a point in the 3-dimensional chart space. The coordinates of that point are defined by a NPoint3D object, returned by the Position3D method. If the property is set to False, then the annotation is in 2D positioning mode - the position of the arrow pointer is a 2D point with x and y coordinates defined by PointerPositionX and PointerPositionY.

Example:

annotation.PositionMode3D = False


ShowDialog

Name: ShowDialog

Applies To: NAnnotation

Parameters: None

Return Value: Long

Remarks: Shows the NAnnotation properties dialog at runtime. The return value indicates whether the user clicked the Ok button.


Text

Name: Text

Applies To: NAnnotation

Type: String

Remarks: The text displayed by the annotation.

Example:

annotation.Text = "This is an annotation"


TextEx

Name: TextEx

Applies To: NAnnotation

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx applied on the annotation's text.

Example:

annotation.TextEx.FillEffect.SetSolidColor vbWhite


Visible

Name: Visible

Applies To: NAnnotation

Type: Boolean

Remarks: Determines if the annotation is visible.

Example:

annotation.Visible = False 'Hide the annotation


Add

Name: Add

Applies To: NAnnotationCollection

Parameters: None

Return Value: Object

Remarks: Adds a new Annotation to the NAnnotationCollection.

Example:

Dim Annotation As NAnnotation
Set Annotation = NevronControl.AnnotationCollection.Add
Annotation.Text = "Annotation"


GetAt

Name: GetAt

Applies To: NAnnotationCollection

Parameters:

Long Index

Return Value: Object

Remarks: Returns the NAnnotation object at Index position in the NAnnotationCollection. The index is zero based.

Example:

Dim Annotation As NAnnotation
Set Annotation = NevronControl.AnnotationCollection.GetAt(1) 'retrieve the second Annotation


GetCount

Name: GetCount

Applies To: NAnnotationCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of the Annotations in the NAnnotationCollection.

Example:

for i = 0 to NevronControl.AnnotationCollection.GetCount - 1
' do something
next i


RemoveAll

Name: RemoveAll

Applies To: NAnnotationCollection

Parameters: None

Return Value: None

Remarks: Removes all the Annotations from the NAnnotationCollection collection.

Example:

NevronControl.AnnotationCollection.RemoveAll 'clear the collection


RemoveAt

Name: RemoveAt

Applies To: NAnnotationCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the Annotation at Index position in the NAnnotationCollection. The Index is zero based.

Example:

NevronControl.AnnotationCollection.RemoveAt 0 ' remove the first one


Border

Name: Border

Applies To: NAppearance

Parameters: None

Return Value: Object

Remarks: The border of the appearance. The presentation group can assign this border to a data point if the Uniform Appearances of the presentation group are enabled

Example:

appearance.Border.Width = 2


FillEffect

Name: FillEffect

Applies To: NAppearance

Parameters: None

Return Value: Object

Remarks: The fill effect of the appearance. The presentation group can assign this fill effect to a data point if the Uniform Appearances of the presentation group are enabled

Example:

appearance.FillEffect.SetSolidColor = vbRed


Label

Name: Label

Applies To: NAppearance

Type: String

Remarks: The label of the appearance object. The presentation group can be configured to show this label in the legend

Example:

appearance.Label = "Some Text"


Material

Name: Material

Applies To: NAppearance

Parameters: None

Return Value: Object

Remarks: The material of the appearance. The presentation group can assign this material to a data point if the Uniform Appearances of the presentation group are enabled

Example:

appearance.Material.SetAmbientDiffuseColor = vbRed


Add

Name: Add

Applies To: NAppearanceCollection

Parameters:

String Label

Return Value: Object

Remarks: Adds a new appearance to the collection and returns the new NAppearance object.

Example:

Set appearance = collection.Add("New Item")


GetAt

Name: GetAt

Applies To: NAppearanceCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Gets the NAppearance object at the specified index.

Example:

Set appearance = collection.GetAt(0)


GetByLabel

Name: GetByLabel

Applies To: NAppearanceCollection

Parameters:

String Label

Return Value: Object

Remarks: Gets the NAppearance object which has the specified label.

Example:

Set appearance = collection.GetByLabel("New Item")


GetCount

Name: GetCount

Applies To: NAppearanceCollection

Parameters: None

Return Value: Long

Remarks: Returns the number of objects in the collection.

Example:

count = collection.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NAppearanceCollection

Parameters: None

Return Value: None

Remarks: Removes all uniform appearance in the collection

Example:

collection.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NAppearanceCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the NAppearance object at the specified index.

Example:

collection.RemoveAt 0


Common

Name: Common

Applies To: NAreaPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = bar.Common()


DepthPercent

Name: DepthPercent

Applies To: NAreaPresentGroup

Type: Long

Remarks: Controls the depth of area in percents of the floor grid cell depth.

Example:

area.DepthPercent = 50 'half the cell depth


DropLines

Name: DropLines

Applies To: NAreaPresentGroup

Type: Boolean

Remarks: Controls the visibility of the area separation lines.

Example:

area.DropLines = True


Origin

Name: Origin

Applies To: NAreaPresentGroup

Type: Double

Remarks: Specifies the area origin value when the UseOrigin is set to True. By default 0.

Example:

area.Origin = 10 ' areas will begin from value 10


Stairs

Name: Stairs

Applies To: NAreaPresentGroup

Type: Boolean

Remarks: When set to True the area is drawn in stairs mode.

Example:

area.Stairs = True


UseOrigin

Name: UseOrigin

Applies To: NAreaPresentGroup

Type: Boolean

Remarks: When turned on the area is displayed with the origin specified by the Origin property. When turned off the area is displayed with the maximal possible origin value.

Example:

area.UseOrigin = False


UseXValue

Name: UseXValue

Applies To: NAreaPresentGroup

Type: Boolean

Remarks: When set to True Value2 is used as X position of the data point.

Example:

area.UseXValue = True


Add

Name: Add

Applies To: NArgumentCollection

Parameters:

String Name

Boolean bXPosArg

Return Value: Object

Remarks: Adds a new argument to the collection and returns the new NCategoryRange object. Argument names must be unique. They can contain alphabetic characters, digits and underscores, but cannot start with a digit. If the bXPosArg parameter is True, then this argument is set as a X-position argument of the function present.

Example:

Set arg = arguments.Add("Arg_N1", False)


GetAt

Name: GetAt

Applies To: NArgumentCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Gets the NCategoryRange object at the specified index.

Example:

Set arg = arguments.GetAt(0)


GetByName

Name: GetByName

Applies To: NArgumentCollection

Parameters:

String Name

Return Value: Object

Remarks: Gets the NCategoryRange object which has the specified name.

Example:

Set arg = arguments.GetByName("A1")


GetCount

Name: GetCount

Applies To: NArgumentCollection

Parameters: None

Return Value: Long

Remarks: Returns the number of objects in the collection.

Example:

count = arguments.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NArgumentCollection

Parameters: None

Return Value: None

Remarks: Clears all objects from the argument collection.

Example:

collection.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NArgumentCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the NCategoryRange object at the specified index.

Example:

arguments.RemoveAt 0


RemoveByName

Name: RemoveByName

Applies To: NArgumentCollection

Parameters:

String Name

Return Value: None

Remarks: Removes the NCategoryRange object with the specified name. Since names are unique inside the argument collection, ambiguity cannot occur.

Example:

arguments.RemoveByName "A1"


ArrowWidth

Name: ArrowWidth

Applies To: NArrowPresentGroup

Type: Single

Remarks: Defines the width of the Arrows in OpenGL units. The default value is 20.

Example:

arrows.ArrowWidth = 30


Common

Name: Common

Applies To: NArrowPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = arrows.Common()


AutoDeleteInterval

Name: AutoDeleteInterval

Applies To: NAspManager

Type: Long

Remarks: Controls how many response generations must be processed before performing the check for expired temporary files on the server.

Example:

Configure the control to check for expired temp files at every second file generation. A temp file is considered expired after 2 minutes from its creation.
NevronControl.AspManager.EnableAutoDelete = TRUE 'enable auto delete
NevronControl.AspManager.AutoDeleteInterval = 2
NevronControl.AspManager.SetAutoDeleteDelay 0, 0, 2, 0 'day, hour, minute, second


BrowserCapabilities

Name: BrowserCapabilities

Applies To: NAspManager

Type: Long

Remarks: Returns the type of response expected by the browser accessing the page. Possible values are bcHTML and bcWAP. You can use this property to customize the component according to the browser - for example for WAP browsers it is recommended to use patterns instead of color filled images/charts because such browsers usually accept only monochrome bitmaps (1 bit per pixel). For more information check out the WAP integration topics in the Users Guide.


Domain

Name: Domain

Applies To: NAspManager

Type: String

Remarks: When EnableUserImpersonation is set to TRUE this property specifies the domain used to authenticate the user. The default value for this property is "." or the local machine. For more information on this property check the EnableUserImpersonation and the Security topics in the Users Guide.


DownloadDirectory

Name: DownloadDirectory

Applies To: NAspManager

Type: String

Remarks: When the server control generates an active response (a response that contains an object tag), the client machine needs to know the location of the CAB file containing the client ActiveX control. If this control is not installed on the client machine the client browser will download the CAB file from the server, uncompress it and then install the ActiveX controls in it. The DownloadDirectory specifies the location of this CAB file on the server. It must be a subfolder of the RootDirectory. Note that by default this property is correctly initialized by the NServerConfig.exe and you do not need to modify it.


EmbedInHtml

Name: EmbedInHtml

Applies To: NAspManager

Parameters:

Long Width

Long Height

HTMLTag TagType

String ControlID

String AltText

Return Value: String

Remarks:

  • The Width and Height parameters define the dimensions of the generated simple image, image map, active content or the full control send to the browser
  • The TagType specifies the image and tag generated in the returned HTML tag. The possible values for this property are tAuto = 0, tJPEG = 1, tPNG = 2, tTIFF = 3, tTARGA = 4, tBitmap = 5, tActiveX.= 6, tImageMap = 7 and tFullControl = 8. In the case of tJPEG, tPNG, tTIFF, tTARGA or tBitmap the returned tag is an image tag and the generated image has the JPEG, PNG, TIFF, TARGA or Bitmap file format. In the case of tActiveX the returned html tag is an object tag and the control generates an "active" response. You can only use the tActiveX response if the client is using a version of IE that support ActiveX controls. The tImageMap constant instructs the control to describe the generated image with an HTML image map. In tFullControl mode EmbedInHtml will insert the server object CLSID in the HTTP response and save its state so that it can be downloaded from the control instantiated on the client. The tAuto type is a little bit more complex. When you use this type the control will take a decision based on the client browser's user agent string (the user agent string identifies the type of the client browser). You configure this response via the NServerConfig utility.
  • The ControlID string identifies the client control name on the client side if you used the tActiveX type or tAuto decided that it will generate a tActiveX response. You can use this name in a client side script to handle the events generated by the client ActiveX control.
  • The AltText specifies the alternative text displayed by the browser if it cannot display the associated image. This property can be very useful if you're not sure whether the client browser will support a given response type. For example Braille browsers do not display images. It is recommended always to supply proper descriptive information about the image.

    Example:

    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 1, "NevronControl", "Image")) ' generate a JPEG image
    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 2, "NevronControl", "Image")) ' generate a PNG image
    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 3, "NevronControl", "Image")) ' generate a TIFF image
    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 4, "NevronControl", "Image")) ' generate a TARGA image
    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 5, "NevronControl", "Image")) ' generate a Bitmap image
    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 6, "NevronControl", "Image")) ' generate an Active response
    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 7, "NevronControl", "Image")) ' generate an Image map response
    Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 8, "NevronControl", "Image")) ' generate a Full control response

    • © 1998 - 2002 NEVRON LLC. All rights reserved.


EnableAutoDelete

Name: EnableAutoDelete

Applies To: NAspManager

Type: Boolean

Remarks: Enables automatic temporary file deletion. Each time the control generates an image you can instruct it to check for expired temp files on the server. When the control detects an expired temp file it will automatically delete it. This ensures that you'll not waste your disk space for expired temporary files.

Example:

Configure the control to check for expired temp files at every second file generation. A temp file is considered expired after 2 minutes from its creation.
NevronControl.AspManager.EnableAutoDelete = TRUE 'enable auto delete
NevronControl.AspManager.AutoDeleteInterval = 2
NevronControl.AspManager.SetAutoDeleteDelay 0, 0, 2, 0 'day, hour, minute, second


EnableUserImpersonation

Name: EnableUserImpersonation

Applies To: NAspManager

Type: Boolean

Remarks: Enables server side impersonation for the component. Can be very useful if you do not want to assign write permissions for the IUSR_MachineName or ASPNET account used to instantiate the component on the server. To use impersonation you must enable this property and supply the necessary credentials with the help of the Login, Password and Domain property of the NaspManager object. The control will use the specified account to create images or native state data in the NevronTemp directory so you must make sure that this account has write permissions for this directory. The following example demonstrates how to enable impersonation.

Example:

NevronControl.AspManager.EnableUserImpersonation = TRUE
NevronControl.AspManager.Login = "MYACCOUNT"
NevronControl.AspManager.Password = "MYACCOUNTPASSWORD"
NevronControl.AspManager.Password = "." 'this machine must authenticate me


ImageMapTemplateTag

Name: ImageMapTemplateTag

Applies To: NAspManager

Type: String

Remarks: When the server control generates an image map it sends an image tag containing the generated image and an id to the image map. The default value for this property is "<IMG SRC="<image_file>" ID ="<image_id>" <image_map>>". For example if you need to have a border around the generated image tag you can replace the ImageTemplateTag to "<IMG BORDER=4 SRC="<image_file>" ID ="<image_id>". The server control will replace <image_file> with the name of the generated temp file.

Example:

In your ASP script you can modify the ImageMapTemplateTag:
NevronControl.AspManager.ImageTemplateTag = <IMG BORDER=4 SRC="<image_file>" ID ="<image_id>


ImageTemplateTag

Name: ImageTemplateTag

Applies To: NAspManager

Type: String

Remarks: When the server control generates an image file on the server it sends an image tag containing the generated image. The default value for this property is "<IMG SRC=<image_file>>". For example if you need to have a border around the generated image tag you can replace the ImageTemplateTag to "<IMG BORDER=4 SRC=<image_file>>". The server control will replace <image_file> with the name of the generated temp file.

Example:

In your ASP script you can modify the ImageTemplateTag:
NevronControl.AspManager.ImageTemplateTag = "<IMG BORDER=4 SRC=<image_file>>"
Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 2, "NevronControl")) ' generate a PNG image


Login

Name: Login

Applies To: NAspManager

Type: String

Remarks: When EnableUserImpersonation is set to TRUE the control will use the account specified by Login to access the NevronTemp directory. For more information on this property check the EnableUserImpersonation and the Security topics in the Users Guide.


Password

Name: Password

Applies To: NAspManager

Type: String

Remarks: When EnableUserImpersonation is set to TRUE this property specifies the password for the impersonated account. For more information on this property check the EnableUserImpersonation and the Security topics in the Users Guide.


ReloadServerSettings

Name: ReloadServerSettings

Applies To: NAspManager

Parameters:

String sFileName

Return Value: Boolean

Remarks: This function reloads the server settings that reside in the NevronConfig directory. You can modify the server settings with the help of the NServerConfig.exe utility. If you modified the RootDirectory, TempDirectory, DownloadDirectory, ImageTemplateTag, EnableAutoDelete or the AutoDeleteInterval you may wish to restore their default values. Another useful technique related with this function is if you want to have several different server configurations. In this case all you have to do is to save them in different .cfg files in the server and load them dynamically from the ASP page. The default .cfg file created by the NServerConfig is NConfig.cfg.

Example:

NevronControl.AspManager.ImageTemplateTag = "<IMG BORDER=4 SRC=<image_file>>"
Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 2, "NevronControl")) ' generate a PNG image with border
NevronControl.ReloadServerSettings NConfig.cfg 'reload the default setting
Response.Write(NevronControl.AspManager.EmbedInHtml(400, 400, 2, "NevronControl")) ' generate a PNG image without a border


RootDirectory

Name: RootDirectory

Applies To: NAspManager

Type: String

Remarks: Once the control is instantiated in ASP it will automatically load the server settings. The RootDirectory is the directory when the web root has been associated (usually wwwroot). In general you do not need to modify the RootDirectory, because the server control will not be able to generate correct object and image tags.


SendImageToBrowser

Name: SendImageToBrowser

Applies To: NAspManager

Parameters:

Long nWidth

Long nHeight

ImageMapFormat imgType

Return Value: None

Remarks: Generates an image and streams it directly to the browser without saving a temporary file on the server. The nWidth and nHeight parameters determine the width and the height of the image. The imgType parameter determines the image type: imfJPEG, imfPNG or imfBitmap.
NOTE: Asp scripts that call SendImageToBrowser must not contain html tags, because this will change the content type from image/.... to text/html. To embed an image generated by an asp script with SendImageToBrowser into a html page just specify the name of the asp script as SRC in the IMG tag.


SetAutoDeleteDelay

Name: SetAutoDeleteDelay

Applies To: NAspManager

Parameters:

Long Day

Long Hour

Long Minute

Long Second

Return Value: None

Remarks: This functions enables you to specify when a temp file is considered obsolete and may be removed from the server. The function takes four parameters that identify a time span (day, hour, minute, second).

Example:

Configure the control to check for expired temp files at every second file generation. A temp file is considered expired after 2 minutes from its creation.
NevronControl.AspManager.EnableAutoDelete = TRUE 'enable auto delete
NevronControl.AspManager.AutoDeleteInterval = 2
NevronControl.AspManager.SetAutoDeleteDelay 0, 0, 2, 0 'day, hour, minute, second


SVGImageTemplateTag

Name: SVGImageTemplateTag

Applies To: NAspManager

Type: String

Remarks: When the server control generates an SVG response it sends an SVG image tag containing the generated image and image dimensions. The default tag has the following form "<IMG SRC="<image_file>" ID ="<image_id>" <image_map>>". For example if you need to have a border around the generated image tag you can replace the ImageTemplateTag to "<IMG BORDER=4 SRC="<image_file>" ID ="<image_id>". The server control will replace <image_file> with the name of the generated temp file.

Example:

In your ASP script you can modify the ImageMapTemplateTag:
NevronControl.AspManager.SVGImageTemplateTag = <IMG BORDER=4 SRC="<image_file>" ID ="<image_id>


TempDirectory

Name: TempDirectory

Applies To: NAspManager

Type: String

Remarks: This contains the directory on the server used to store the temp files generated by all Nevron components from the particular web server. This property is automatically initialized when the control is instantiated in ASP. There are cases however when you want to modify the temporary directory at runtime. Note that it must be a subfolder of the RootDirectory, because otherwise the client browser will be unable to locate the files stored in it. Note that by default this property is correctly initialized by the NServerConfig.exe and you do not need to modify it.

Example:

NevronControl.AspManager.TempDirectory = "c:\InetPub\wwwroot\MyTemp" 'change the temp file directory


WAPImageTemplateTag

Name: WAPImageTemplateTag

Applies To: NAspManager

Type: String

Remarks: When the server control generates an image file for a WAP device on the server it sends an image tag containing the generated image. The WAPImageTemplateTag exists because there is a difference between the image tag in HTML which is used by the "normal" internet browsers and WML - the equivalent of HTML in the mobile world. The default value for this property is "<img alt=<alternative_text>> src=<image_file> localsrc = ""/>". You can customize this property in the same fashion as the ImageMapTemplate propery, but you must keep in mind that WML browsers are very sensitive and do not allow you to miss attributes - this is why when you customize you image tag you must make sure that you include the alt, src and localhost attributes. The server control will replace <image_file> with the name of the generated temp file and <alternative_text> with the AltText parameter specified of the EmbedInHtml function (by default empty)


AutoMax

Name: AutoMax

Applies To: NAxis

Type: Boolean

Remarks: When set to True the component automatically determines the max of the scale axis. When set to False the Max property specifies the Max value of the axis

Example:

NChart1.Axes(atLeftAxis).AutoMax = False
NChart1.Axes(atLeftAxis).Max = 200


AutoMin

Name: AutoMin

Applies To: NAxis

Type: Boolean

Remarks: When set to True the component automatically determines the min of the scale axis. When set to False the Min property specifies the Min value of the axis

Example:

NChart1.Axes(atLeftAxis).AutoMin = False
NChart1.Axes(atLeftAxis).Min = -10


AutoStep

Name: AutoStep

Applies To: NAxis

Type: Boolean

Remarks: When set to True the component automatically determines the axis step. Otherwise the step is specified by the Step property.

Example:

NChart1.Axes(atLeftAxis).AutoStep = False
NChart1.Axes(atLeftAxis).Step = 10


AxisStyle

Name: AxisStyle

Applies To: NAxis

Type: AxisStyle

Remarks: Controls the shape of the axis.

Example:

NChart1.Axes(atLeftAxis).AxisStyle = asTube


Border

Name: Border

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the border of the axis. If the Width property is 0, then the border properties are used for the display of the axis line.

Example:

NChart1.Axes(atRightAxis).Border.Width = 3


ConstLines

Name: ConstLines

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the collection of NAxisConstLine objects.

Example:

Dim lines As NAxisConstLineCollection
Set lines = NChart1.Axes(atLeftAxis).ConstLines()


CurrentPageIndex

Name: CurrentPageIndex

Applies To: NAxis

Type: Long

Remarks: Specifies the index the current page when the CurrentPageMode property is set to acpmIndex


CurrentPageMode

Name: CurrentPageMode

Applies To: NAxis

Type: AxisCurrentPageMode

Remarks: Specifies the mode of the current page displayed by the axis. When set to acpmValue the CurrentPageValue property specifies the beginning value of the axis page. When set to acpmIndex the CurrentPageIndex property specifies the index of the current page displayed by the axis.


CurrentPageValue

Name: CurrentPageValue

Applies To: NAxis

Type: Double

Remarks: Specifies the begin value of the current page when the CurrentPageMode property is set to acpmValue


DisplayDataPointsBetweenTicks

Name: DisplayDataPointsBetweenTicks

Applies To: NAxis

Type: Boolean

Remarks: Controls the position of the data point relative to the tick positions. If set to True the data point is positioned between two adjacent ticks, otherwise it is positioned exactly on the tick. In the second case you may consider turning on the InflateMargins flag of the presentation groups to fit the chart inside the chart area.

Example:

NChart1.Axes(atCategoriesAxis).DisplayDataPointsBetweenTicks = False


FillEffect

Name: FillEffect

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the fill effect of the axis. The axis has a fill effect if the Width property is bigger than 0.

Example:

NChart1.Axes(atRightAxis).FillEffect.SetSolidColor = vbRed


FormatString

Name: FormatString

Applies To: NAxis

Type: String

Remarks: Specifies the formatting of the axis texts. Supported is value (the V command) and date time formatting (the D command.). See the Formatting Commands topic for more information.

Example:

NChart1.Axes(atLeftAxis).FormatString = "%V(1,TRUE,1)" 'format with 1 decimal, commas on thousands and no division
NChart1.Axes(atRightAxis).FormatString = "%D(%x)" 'format as date time with locale format


GetMajorShowAtWall

Name: GetMajorShowAtWall

Applies To: NAxis

Parameters:

ChartWallType wall

Return Value: Boolean

Remarks: Determines whether the major gridlines are displayed at the specified chart wall.

Example:

bDisplayed = NChart1.Axes(atRightAxis).GetMajorShowAtWall(cwtLeft) ' check whether the major lines of the right axis are displayed at the left wall


GetMaxDateTime

Name: GetMaxDateTime

Applies To: NAxis

Parameters:

ByRef Long pYear

ByRef Long pMonth

ByRef Long pDay

ByRef Long pHour

ByRef Long pMin

ByRef Long pSec

ByRef Long pMilisecond

Return Value: None

Remarks: Retreives the current axis max value as date time values. This method can be very useful if the axis is switched in asmDateTime scale mode.

Example:

Dim nYear As Long, nMonth As Long, nDays As Long, nHours As Long, nMinutes As Long, nSeconds As Long
NChart1.Axes(atLeftAxis).GetMaxDateTime nYear, nMonth, nDay, nHour, nMin, nSec, nMilisecond


GetMinDateTime

Name: GetMinDateTime

Applies To: NAxis

Parameters:

ByRef Long pYear

ByRef Long pMonth

ByRef Long pDay

ByRef Long pHour

ByRef Long pMin

ByRef Long pSec

ByRef Long pMilisecond

Return Value: None

Remarks: Retreives the current axis min value as date time values. This method can be very useful if the axis is switched in asmDateTime scale mode.

Example:

Dim nYear As Long, nMonth As Long, nDays As Long, nHours As Long, nMinutes As Long, nSeconds As Long
NChart1.Axes(atLeftAxis).GetMinDateTime nYear, nMonth, nDay, nHour, nMin, nSec, nMilisecond


GetMinorShowAtWall

Name: GetMinorShowAtWall

Applies To: NAxis

Parameters:

ChartWallType wall

Return Value: Boolean

Remarks: Determines whether the minor gridlines are displayed at the specified chart wall.

Example:

bDisplayed = NChart1.Axes(atRightAxis).GetMinorShowAtWall(cwtLeft) ' check whether the minor lines of the right axis are displayed at the left wall


GetPoint3DFromValue

Name: GetPoint3DFromValue

Applies To: NAxis

Parameters:

Double dValue

ByRef Object ppDisp

Return Value: Boolean

Remarks: Gets the position of the 3D point corresponding to the specified value of the axis. This method produces a NPoint3D object that can be used as an origin point for annotations. The first parameter is the axis value. The second parameter is an "out" parameter - the NPoint3D object that represents the 3D point. The function returns a boolean value that shows whether the call was successful. If the function returns True, the 3D point is valid and can be used. If the return value is False, then the 3D point is not valid. This may happen for example when there is a Pie or Doughnut present group, because these present groups do not use axes. The following code may be used to attach an Annotation Object to some specific value of an axis:

Example:

Dim pnt As NPoint3D
Dim ann As NAnnotation

If NChart1.Axes(atLeftAxis).GetPoint3DFromValue(2, pnt) = True Then
Set ann = NChart1.AnnotationCollection.Add
ann.Position3D.InitFromPoint3D pnt
End If


GetStepDateTime

Name: GetStepDateTime

Applies To: NAxis

Parameters:

ByRef Long pYears

ByRef Long pMonths

ByRef Long pDays

ByRef Long pHours

ByRef Long pMinutes

ByRef Long pSeconds

ByRef Long pMiliseconds

Return Value: None

Remarks: Gets the current axis step as a date time interval. This method can be very useful if the axis is switched in asmDateTime scale mode.

Example:

Dim Days As Long, Hours As Long, Minutes As Long, Seconds As Long, Miliseconds As Long
NChart1.Axes(atLeftAxis).GetStepDateTime Days, Hours, Minutes, Seconds, Miliseconds


InnerTickLength

Name: InnerTickLength

Applies To: NAxis

Type: Single

Remarks: Controls the length of the major inner ticks. Inner ticks are drawn towards the chart center. By default 0.04.

Example:

NChart1.Axes(atLeftAxis).InnterTickLength = 0.15 ' inner ticks are long 0.15 OpenGL units


InnerTickLine

Name: InnerTickLine

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the line properties applied on the inner ticks.

Example:

NChart1.Axes(atLeftAxis).InnerTickLine.Width = 2 ' inner ticks of the left axis are 2 pixels in width


Inverted

Name: Inverted

Applies To: NAxis

Type: Boolean

Remarks: When set to True the axis is scaled in inverted order.

Example:

NChart1.Axes(atLeftAxis).Inverted = True ' the scale is inverted


Labels

Name: Labels

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the collection of NAxisLabel objects.

Example:

Dim labels As NAxisLabelCollection
Set labels = NChart1.Axes(atLeftAxis).Labels()


LogarithmBase

Name: LogarithmBase

Applies To: NAxis

Type: Single

Remarks: Specifies the logarithm base if ScaleMode is set to asmLogarithmic. See the Axes topic for more information.

Example:

NChart1.Axes(atLeftAxis).LogarithmStepMode = lsmFixed


LogarithmStepMode

Name: LogarithmStepMode

Applies To: NAxis

Type: LogarithmStepMode

Remarks: When lsmExponent the axis formats powers of the logarithm base. When lsmFixed the axis ticks increase with equal values. See the Axes topic for more information.

Example:

NChart1.Axes(atLeftAxis).LogarithmStepMode = lsmFixed


MajorLineBorder

Name: MajorLineBorder

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the border of the major lines. If the Width property is 0, then the border properties are used for the display of the major gridlines.

Example:

NChart1.Axes(atRightAxis).MajorLineBorder.Color = vbYellow


MajorLineFillEffect

Name: MajorLineFillEffect

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the fill effect of the major grid lines. The major gridlines have fill effect properties if the MajorLineWidth is bigger than 0.

Example:

NChart1.Axes(atRightAxis).MajorLineFillEffect.SetSolidColor = vbRed


MajorLineMaterial

Name: MajorLineMaterial

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the material of the major grid lines. The major gridlines have material properties if the MajorLineWidth is bigger than 0.

Example:

NChart1.Axes(atRightAxis).MajorLineMaterial.SetAmbientDiffuseColor = vbRed


MajorLineWidth

Name: MajorLineWidth

Applies To: NAxis

Type: Single

Remarks: Controls the width of major grid lines. When bigger than 0 - fill effect and material properties are applied on the lines. When set to 0 the lines are drawn using the border gridline properties

Example:

NChart1.Axes(atLeftAxis).MajorLineWidth = 0.10


Material

Name: Material

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the material of the axis. The axis has a material if the Width property is bigger than 0.

Example:

NChart1.Axes(atRightAxis).Material.SetAmbientDiffuseColor = vbRed


Max

Name: Max

Applies To: NAxis

Type: Double

Remarks: Specifies the maximal value of the axis when AutoMax property is set to True.

Example:

NChart1.Axes(atLeftAxis).AutoMax = False
NChart1.Axes(atLeftAxis).Max = 200


MaxTickCount

Name: MaxTickCount

Applies To: NAxis

Type: Long

Remarks: Specifies the maximal number of ticks when AutoStep is set to True.

Example:

NChart1.Axes(atLeftAxis).AutoStep = True
NChart1.Axes(atLeftAxis).MaxTickCount = 10 ' no more than 10 ticks on the axis scale


Min

Name: Min

Applies To: NAxis

Type: Double

Remarks: Specifies the minimal value of the axis when AutoMin property is set to True.

Example:

NChart1.Axes(atLeftAxis).AutoMin = False
NChart1.Axes(atLeftAxis).Min = -10


MinorLineBorder

Name: MinorLineBorder

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the border of the minor lines. If the Width property is 0, then the border properties are used for the display of the minor gridlines.

Example:

NChart1.Axes(atRightAxis).MinorLineBorder.Color = vbYellow


MinorLineFillEffect

Name: MinorLineFillEffect

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the fill effect of the minor grid lines. The minor gridlines have fill effect properties if the MajorLineWidth is bigger than 0.

Example:

NChart1.Axes(atRightAxis).MinorLineFillEffect.SetSolidColor = vbRed


MinorLineMaterial

Name: MinorLineMaterial

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Specifies the material of the minor grid lines. The minor gridlines have material properties if the MinorLineWidth is bigger than 0.

Example:

NChart1.Axes(atRightAxis).MinorLineMaterial.SetAmbientDiffuseColor = vbRed


MinorLineWidth

Name: MinorLineWidth

Applies To: NAxis

Type: Single

Remarks: Controls the width of minor grid lines. When bigger than 0 - fill effect and material properties are applied on the lines. When set to 0 the lines are drawn using the border gridline properties

Example:

NChart1.Axes(atLeftAxis).MinorLineWidth = 0.10


MinorTickCount

Name: MinorTickCount

Applies To: NAxis

Type: Long

Remarks: Controls the count of the minor ticks displayed between two major ones. By default 0 which means that initially the axes do not show the minor ticks.

Example:

NChart1.Axes(atLeftAxis).MinorTickCount = 10 ' 10 minor ticks between major ones


MinorTickLength

Name: MinorTickLength

Applies To: NAxis

Type: Single

Remarks: Controls the length of the minor ticks. Minor ticks are displayed between major ones are are drawn at the outer side of the chart area. By default 0.02.

Example:

NChart1.Axes(atLeftAxis).MinorTickLength = 0.10 ' minor ticks are 0.10 OpenGL units


MinorTickLine

Name: MinorTickLine

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the line properties applied on the minor ticks.

Example:

NChart1.Axes(atLeftAxis).MinorTickLine.Color = vbRed ' minor ticks of the left axis are red


MouseResponse

Name: MouseResponse

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMouseResponse object of the axis. The NMouseResponse properties are used when the component is used on an ASP server and define the client side response to different user actions. You can also use the NMouseResponse object to assign custom tooltips.

Example:

NChart1.Axes(atLeftAxis).MouseResponse.URL = "www.nevron.com" ' the client browser will jump to www.nevron.com when the client clicks on the left axis


NumberOfDataPointsBetweenTicks

Name: NumberOfDataPointsBetweenTicks

Applies To: NAxis

Type: Long

Remarks: Controls the number of data points that lay between two data ticks. By default 1.

Example:

NChart1.Axes(atCategoriesAxis).NumberOfDataPointsBetweenTicks = 2 ' now the chart shows 2 categories between two ticks


OuterTickLength

Name: OuterTickLength

Applies To: NAxis

Type: Single

Remarks: Controls the length of the major outer ticks. Outer ticks are drawn at the outer side of the chart area. By default 0.04.

Example:

NChart1.Axes(atLeftAxis).OuterTickLength = 0.15 ' outer ticks are long 0.15 OpenGL units


OuterTickLine

Name: OuterTickLine

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the line properties applied on the outer ticks.

Example:

NChart1.Axes(atLeftAxis).OuterTickLine.Color = vbBlue ' outer ticks of the left axis are blue


PageCount

Name: PageCount

Applies To: NAxis

Type: Long

Remarks: Specifies the number of axis pages when the PagingMode is apmFixedPageCount.


PageSize

Name: PageSize

Applies To: NAxis

Type: Double

Remarks: Specifies the size of axis pages when the PagingMode is apmFixedPageSize.


PagingMode

Name: PagingMode

Applies To: NAxis

Type: AxisPagingMode

Remarks: Controls the paging mode of the axis. When set to apmFixedPageSize each axis page has the size specified by the PageSize property. When set to apmFixedPageCount the axis has exactly PageCount pages.


PositionAxis

Name: PositionAxis

Applies To: NAxis

Parameters:

AxisType SynchronizeWithAxis

Double dValue

Boolean bSynchronize

Return Value: None

Remarks: This method helps you specify a dynamic axis position based on the position of some value at another axis. By default none of the axes is synchronized with any of the other axes. The vertical axes accept only the category and serie axes as parameters. The category axis accepts the four vertical axes and the serie axis. The serie axis accepts the four vertical axes and the category axis. Setting bSynchronize to False turns of the value synchronization for the specified axis (the dValue parameter is then ignored)

Example:

NChart1.Axes(atLeftAxis).PositionAxis atCategoriesAxis, 0, True 'left axis is at 0 position of the category axis
NChart1.Axes(atLeftAxis).PositionAxis atSeriesAxis, 0, False 'left axis is not synchronized with the series axis


PositionEndPercent

Name: PositionEndPercent

Applies To: NAxis

Type: Long

Remarks: Specifies the end of the axis ruler in percents of the axis length. By default 100. Can be very useful if you want to split the chart.

Example:

NChart1.Axes(atRightAxis).PositionEndPercent = 50 'rigth ruler ends at half the chart height


PositionOffset

Name: PositionOffset

Applies To: NAxis

Type: Single

Remarks: Specifies the offset of the axis from the original position determined by the component.

Example:

NChart1.Axes(atLeftAxis).PositionOffset = 0.10 'offset left axis to 0.10 OpenGL units to the right


PositionStartPercent

Name: PositionStartPercent

Applies To: NAxis

Type: Long

Remarks: Specifies the start of the axis ruler in percents of the axis length. By default 0. Can be very useful if you want to split the chart.

Example:

NChart1.Axes(atLeftAxis).PositionStartPercent = 50 'left ruler begins from the chart height


RoundToTick

Name: RoundToTick

Applies To: NAxis

Type: Boolean

Remarks: Instruct the axis to end exactly on a tick value. This may increase the maximal value of the axis.

Example:

NChart1.Axes(atLeftAxis).RoundToTick = True ' scale ends exactly on a tick


ScaleMode

Name: ScaleMode

Applies To: NAxis

Type: AxisScaleMode

Remarks: Controls the scale mode of the axis. Currently the axes can operate in 4 axis modes. See the Axes topic for more information. The four vertical axes are initially operating in asmValue, while the Categories and Series axes are operating in asmDimension mode.

Example:

NChart1.Axes(atLeftAxis).ScaleMode = asmDimension ' the left axis is now showing the data levels of the component


SetMajorShowAtWall

Name: SetMajorShowAtWall

Applies To: NAxis

Parameters:

ChartWallType wall

Boolean bShow

Return Value: None

Remarks: Shows the major lines at the specified wall.

Example:

NChart1.Axes(atRightAxis).SetMajorShowAtWall(cwtLeft, True) ' show the major lines of the right axis at the left wall


SetMaxDateTime

Name: SetMaxDateTime

Applies To: NAxis

Parameters:

Long nYear

Long nMonth

Long nDay

Long nHour

Long nMin

Long nSec

Long nMilisecond

Return Value: None

Remarks: Set the max value of the axis with the numeric equivalent of the specified date time. This method can be very useful if the axis is switched in asmDateTime scale mode.

Example:

NChart1.Axes(atLeftAxis).SetMaxDateTime 1900, 3, 4, 13, 0, 0


SetMinDateTime

Name: SetMinDateTime

Applies To: NAxis

Parameters:

Long nYear

Long nMonth

Long nDay

Long nHour

Long nMin

Long nSec

Long nMilisecond

Return Value: None

Remarks: Set the min value of the axis with the numeric equivalent of the specified date time. This method can be very useful if the axis is switched in asmDateTime scale mode.

Example:

NChart1.Axes(atLeftAxis).SetMinDateTime 1900, 3, 4, 13, 0, 0, 1


SetMinorShowAtWall

Name: SetMinorShowAtWall

Applies To: NAxis

Parameters:

ChartWallType wall

Boolean bShow

Return Value: None

Remarks: Shows the minor lines at the specified wall.

Example:

NChart1.Axes(atRightAxis).SetMinorShowAtWall(cwtLeft, True) ' show the minor lines of the right axis at the left wall


SetPredefinedTextPosition

Name: SetPredefinedTextPosition

Applies To: NAxis

Parameters:

PredefinedAxisTextPosition Position

Return Value: None

Remarks: This method helps you specify a predefined position of the axis texts. It is often used when you change the projection of the component to create horizontal charts. The patpVertical is the default axis text position. patpHorizontalLeft and patpHorizontalRight are used when you load some of the horizontal chart projection.

Example:

NChart1.Axes(atLeftAxis).SetPredefinedTextPosition patpHorizontalLeft ' prepare the left axis texts for a horizontal left chart


SetStepDateTime

Name: SetStepDateTime

Applies To: NAxis

Parameters:

Long nYears

Long nMonths

Long nDays

Long nHours

Long nMinutes

Long nSeconds

Long nMiliseconds

Return Value: None

Remarks: Set the step of the axis with the numeric equivalent of the specified time interval. This method can be very useful if the axis is switched in asmDateTime scale mode.

Example:

NChart1.Axes(atLeftAxis).SetStepDateTime 0, 0, 2, 3, 5, 4, 8 ' the step of the left axis is 0 years, 0 months, 2 days, 3 hours, 5 minutes, 4 seconds and 8 miliseconds


ShowMinMaxAsTicks

Name: ShowMinMaxAsTicks

Applies To: NAxis

Type: Boolean

Remarks: Specifies the min and max scale values are shown as ticks

Example:

NChart1.Axes(atLeftAxis).ShowMinMaxAsTicks = True


StaggerLevels

Name: StaggerLevels

Applies To: NAxis

Type: Long

Remarks: Controls the number of the stagger levels. Increase this value if you want to position the texts on more levels. By default 2.

Example:

NChart1.Axes(atCategoriesAxis).StaggerLevels = 5


StaggerOffset

Name: StaggerOffset

Applies To: NAxis

Type: Single

Remarks: Controls the offset of the staggered texts. Increase this value if you want to separate the texts more.

Example:

NChart1.Axes(atCategoriesAxis).StaggerOffset = 0.15 ' 0.15 OpenGL units distance between two adjacent texts


StaggerTexts

Name: StaggerTexts

Applies To: NAxis

Type: Boolean

Remarks: When set to True the axis texts are displayed in a stagger manner. This feature is helpful if you want to eliminate overlapping texts

Example:

NChart1.Axes(atCategoriesAxis).StaggerTexts = True ' now category labels are displayed in a stagger manner


Step

Name: Step

Applies To: NAxis

Type: Double

Remarks: Specifies the axis step when AutoStep property is set to True.

Example:

NChart1.Axes(atLeftAxis).AutoStep = False
NChart1.Axes(atLeftAxis).Step = 10


Stripes

Name: Stripes

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the collection of NAxisStripe objects.

Example:

Dim stripes As NAxisStripeCollection
Set stripes = NChart1.Axes(atLeftAxis).Stripes()


TextEx

Name: TextEx

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the text properties applied on the axis texts.

Example:

NChart1.Axes(atLeftAxis).TextEx.Font.Size = 15 'size of text on the left axis is 15


Title

Name: Title

Applies To: NAxis

Type: String

Remarks: Controls the displayed axis title.

Example:

NChart1.Axes(atLeftAxis).Title = "Dollar Sales"


TitleTextEx

Name: TitleTextEx

Applies To: NAxis

Parameters: None

Return Value: Object

Remarks: Gives you access to the text properties applied on the axis title.

Example:

NChart1.Axes(atLeftAxis).TitleTextEx.Font.Size = 15 'size of left axis title is 15


Visible

Name: Visible

Applies To: NAxis

Type: Boolean

Remarks: This flag controls the visibility of the axis

Example:

NChart1.Axes(atBackAxis).Visible = False ' hide the back axis


Width

Name: Width

Applies To: NAxis

Type: Single

Remarks: Controls the width of the chart axis. If Width bigger than 0 the control assigns fill effect and material properties on the axis. When Width is 0 the axis is displayed as a simple line with the border properties

Example:

NChart1.Axes(atBackAxis).Width = 0


BeginEndAxis

Name: BeginEndAxis

Applies To: NAxisConstLine

Type: AxisType

Remarks: Specifies the axis on which the Begin and End values are mapped. For const lines of the vertical axes this can be only atCategoriesAxis. For const lines of the categories and series axes the BeginEndAxis can be any of the vertical axes.

Example:

line.BeginEndAxis = atCategoriesAxis


BeginValue

Name: BeginValue

Applies To: NAxisConstLine

Type: Double

Remarks: Begin value for the const line. This value is mapped on the axis specified by BeginEndAxis. and determines the starting point for the const line.

Example:

line.BeginValue = 7.9


EnableBeginEnd

Name: EnableBeginEnd

Applies To: NAxisConstLine

Type: Boolean

Remarks: Allows the user to specify starting and ending values for the const line. For example - the const lines of the vertical axes are parallel to the categories axis and by default they have the same length as the categories axis. With the help of the Begin and End values the user can make a const line to spread only over a definite range of the categories axis.

Example:

line.EnableBeginEnd = True


EndValue

Name: EndValue

Applies To: NAxisConstLine

Type: Double

Remarks: End value for the const line. This value is mapped on the axis specified by BeginEndAxis. and determines the ending point for the const line.

Example:

line.EndValue = 13.4


FillEffect

Name: FillEffect

Applies To: NAxisConstLine

Parameters: None

Return Value: Object

Remarks: Gives you access to the FillEffect applied on the constant line when the const line style is clsRectangle or clsParallelepiped.

Example:

line.FillEffect.Transparency = 70


GetPoint3DFromPosition

Name: GetPoint3DFromPosition

Applies To: NAxisConstLine

Parameters:

Long nPercent

ByRef Object ppDisp

Return Value: Boolean

Remarks: Gets the coordinates of a 3D point corresponding to a specified position on an axis const line. This method produces a NPoint3D object that can be used as an origin point for annotations. The first parameter is the position of the point on the const line in percents of the line length. For example the position in the beginning of the line is 0, in the middle - 50 and in the end of the line is 100. The second parameter is an "out" parameter - the NPoint3D object that represents the 3D point. The function returns a boolean value that shows whether the call was successful. If the function returns True, the 3D point is valid and can be used. If the return value is False, then the 3D point is not valid. This may happen for example when there is a Pie or Doughnut present group, because these present groups do not use axes and const lines cannot be shown. The following code may be used to attach an Annotation Object to a const line:

Example:

Dim pnt As NPoint3D
Dim cl As NAxisConstLine
Dim ann As NAnnotation

Set cl = NChart1.Axes(atLeftAxis).ConstLines.Add
cl.Value = 4.5

If cl.GetPoint3DFromPosition(20, pnt) = True Then
Set ann = NChart1.AnnotationCollection.Add
ann.Position3D.InitFromPoint3D pnt
End If


LineProps

Name: LineProps

Applies To: NAxisConstLine

Parameters: None

Return Value: Object

Remarks: Gives you access to the line properties applied on the constant line

Example:

line.LineProps.Width = 2


LineWidth

Name: LineWidth

Applies To: NAxisConstLine

Type: Single

Remarks: The width of the constant line, when the style is clsRectangle or clsParallelepiped. If the style is clsLine then the width is controlled by the border properties.

Example:

line.LineWidth = 0.08


Material

Name: Material

Applies To: NAxisConstLine

Parameters: None

Return Value: Object

Remarks: Gives you access to the Material applied on the constant line when the const line style is clsRectangle or clsParallelepiped.

Example:

line.Material.SetAmbientDiffuseColor RGB(255,0,120)


Style

Name: Style

Applies To: NAxisConstLine

Type: ConstLineStyle

Remarks: The style of the constant line. This can be one of the following values: clsLine, clsRectangle, clsParallelepiped. The default is clsLine.

Example:

line.Style = clsParallelepiped


Value

Name: Value

Applies To: NAxisConstLine

Type: Double

Remarks: The value of the constant line. The line is displayed at this value on the corresponding axis

Example:

line.Value = 10


Add

Name: Add

Applies To: NAxisConstLineCollection

Parameters: None

Return Value: Object

Remarks: Adds a const line to the collection and returns the new NConstLine object

Example:

Set line = NChart1.Axes(atLeftAxis).ConstLines.Add()


GetAt

Name: GetAt

Applies To: NAxisConstLineCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Gets the NConstLine object at the specified index

Example:

Set line = NChart1.Axes(atLeftAxis).ConstLines.GetAt(0)


GetCount

Name: GetCount

Applies To: NAxisConstLineCollection

Parameters: None

Return Value: Long

Remarks: Returns the number of objects in the collection

Example:

count = NChart1.Axes(atLeftAxis).ConstLines.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NAxisConstLineCollection

Parameters: None

Return Value: None

Remarks: Removes all const lines in the collection

Example:

NChart1.Axes(atLeftAxis).ConstLines.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NAxisConstLineCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the NConstLine object at the specified index

Example:

NChart1.Axes(atLeftAxis).ConstLines.RemoveAt 0


Angle

Name: Angle

Applies To: NAxisLabel

Type: Double

Remarks: Angle of the offset from the original position. Originally 0.

Example:

label.Angle = 30


HasLine

Name: HasLine

Applies To: NAxisLabel

Type: Boolean

Remarks: Controls the visibility of the label connection line

Example:

label.HasLine = True


LineProps

Name: LineProps

Applies To: NAxisLabel

Parameters: None

Return Value: Object

Remarks: Controls the appearance of the axis connection line

Example:

line.LineProps.Color = vbBlue


Offset

Name: Offset

Applies To: NAxisLabel

Type: Double

Remarks: Offset of the label from the original position. Originally 0.

Example:

label.Offset = 0.3


Text

Name: Text

Applies To: NAxisLabel

Type: String

Remarks: The text of the axis label.

Example:

label.Text = "My special label"


TextEx

Name: TextEx

Applies To: NAxisLabel

Parameters: None

Return Value: Object

Remarks: Gives you access to the text properties applied on the label

Example:

line.TextEx.Font.Size = 12


Value

Name: Value

Applies To: NAxisLabel

Type: Double

Remarks: The value of the axis label. The label is displayed at this value on the corresponding axis

Example:

label.Value = 10


Add

Name: Add

Applies To: NAxisLabelCollection

Parameters: None

Return Value: Object

Remarks: Adds a label to the collection and returns the new NAxisLabel object

Example:

Dim label as NAxisLabel
Set label = NChart1.Axes(atLeftAxis).Labels.Add()


GetAt

Name: GetAt

Applies To: NAxisLabelCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Gets the NLabel object at the specified index

Example:

Dim label as NAxisLabel
Set label = NChart1.Axes(atLeftAxis).Labels.GetAt(0)


GetCount

Name: GetCount

Applies To: NAxisLabelCollection

Parameters: None

Return Value: Long

Remarks: Returns the number of objects in the collection

Example:

count = NChart1.Axes(atLeftAxis).Labels.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NAxisLabelCollection

Parameters: None

Return Value: None

Remarks: Removes all labels in the collection

Example:

NChart1.Axes(atLeftAxis).Labels.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NAxisLabelCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the NAxisLabel object at the specified index

Example:

NChart1.Axes(atLeftAxis).Labels.RemoveAt 0


Label

Name: Label

Applies To: NAxisParameter

Type: String

Remarks: The label of the object


ShowLabel

Name: ShowLabel

Applies To: NAxisParameter

Type: Boolean

Remarks: Controls the visibility of the label


Add

Name: Add

Applies To: NAxisParameterCollection

Parameters:

String Label

Boolean ShowLabel

Return Value: Object

Remarks: Adds a new NAxisParamter with the specified Label and ShowLabel properties and returns the newly created object.

Example:

Dim param As NAxisParamter
Set param = NChart1.PresentGroups.Categories.Add("Hello", True)


FindByLabel

Name: FindByLabel

Applies To: NAxisParameterCollection

Parameters:

String sLabel

Return Value: Long

Remarks: Returns the index of the first NAxisParameter that has the specified label

Example:

index = NChart1.Categories.FindByLabel "Apples"


GetAt

Name: GetAt

Applies To: NAxisParameterCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Get the NAxisParamter at the specified index

Example:

Dim param As NAxisParamter
Set param = NChart1.PresentGroups.Categories.GetAt()


GetCount

Name: GetCount

Applies To: NAxisParameterCollection

Parameters: None

Return Value: Long

Remarks: Retrieves the count of the objects in the collection

Example:

objcount = NChart1.Categories.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NAxisParameterCollection

Parameters: None

Return Value: None

Remarks: Removes all elements in the collection.

Example:

NChart1.Categories.RemoveAll() 'remove all categories


RemoveAt

Name: RemoveAt

Applies To: NAxisParameterCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the element at the specified index.

Example:

NChart1.Categories.RemoveAt(0)


SetSize

Name: SetSize

Applies To: NAxisParameterCollection

Parameters:

Long nSize

Boolean bNumericLabels

Return Value: None

Remarks: Sets the size of the collection to nSize. If bNumericLabels is set to True the component automatically assigns labels to the dimensions of the component. The labels represent the index of the NAxisParameter objects in the collection.

Example:

NChart1.Categories.SetSize 100, True


FillEffect

Name: FillEffect

Applies To: NAxisStripe

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFillEffect object of the axis stripe.

Example:

stripe.FillEffect.SetSolidColor vbBlue


From

Name: From

Applies To: NAxisStripe

Type: Double

Remarks: Specifies the beginning value of the axis stripe

Example:

stripe.From = 10


GetPoint3DFromPosition

Name: GetPoint3DFromPosition

Applies To: NAxisStripe

Parameters:

Long nPercent

ChartWallType wall

ByRef Object ppDisp

Return Value: Boolean

Remarks: Gets the coordinates of a 3D point corresponding to a specified position on an axis stripe. This method produces a NPoint3D object that can be used as an origin point for annotations. The first parameter is the position of the point on the stripe in percent of the stripe length. For example the position in the beginning of the line is 0, in the middle - 50 and in the end of the line is 100. The second parameter specifies a chart wall. The third parameter is an "out" parameter - the NPoint3D object that represents the 3D point. The function returns a boolean value that shows whether the call was successful. If the function returns True, the 3D point is valid and can be used. If the return value is False, then the 3D point is not valid. This may happen for example when there is a Pie or Doughnut present group, because these present groups do not use axes and stripes cannot be shown. The following code may be used to attach an Annotation Object to a stripe:

Example:

Dim pnt As NPoint3D
Dim sl As NAxisStripe
Dim ann As NAnnotation

Set sl = NChart1.Axes(atLeftAxis).Stripes.Add
sl.From = 4.5
sl.To = 5.7
sl.SetShowAtWall cwtBack, True

If sl.GetPoint3DFromPosition(20, cwtBack, pnt) = True Then
Set ann = NChart1.AnnotationCollection.Add
ann.Position3D.InitFromPoint3D pnt
End If


GetShowAtWall

Name: GetShowAtWall

Applies To: NAxisStripe

Parameters:

ChartWallType wall

Return Value: Boolean

Remarks: Check whether the stripe is shown on the specified chart wall.

Example:

bShownOnLeftWall = stripe.GetShowAtWall(cwtLeft)


Material

Name: Material

Applies To: NAxisStripe

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFillEffect object of the axis stripe.

Example:

stripe.FillEffect.SetSolidColor vbBlue


SetShowAtWall

Name: SetShowAtWall

Applies To: NAxisStripe

Parameters:

ChartWallType wall

Boolean bDisplay

Return Value: None

Remarks: Show the stripe on the specified chart wall.

Example:

stripe.SetShowAtWall cwtBack, True


ShowDialog

Name: ShowDialog

Applies To: NAxisStripe

Parameters: None

Return Value: Boolean

Remarks: Shows the Axis Stripe visual interface. The return value indicates whether the user clicked the OK button

Example:

bOK = stripe.ShowDialog()


To

Name: To

Applies To: NAxisStripe

Type: Double

Remarks: Specifies the ending value of the axis stripe

Example:

stripe.To = 10


Add

Name: Add

Applies To: NAxisStripeCollection

Parameters: None

Return Value: Object

Remarks: Adds a stripe to the collection and returns the new NAxisStripe object

Example:

Set stripe = NChart1.Axes(atLeftAxis).Stripes.Add()


GetAt

Name: GetAt

Applies To: NAxisStripeCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Gets the NAxisStripe object at the specified index

Example:

Set stripe = NChart1.Axes(atLeftAxis).Stripes.GetAt(0)


GetCount

Name: GetCount

Applies To: NAxisStripeCollection

Parameters: None

Return Value: Long

Remarks: Returns the number of objects in the collection

Example:

count = NChart1.Axes(atLeftAxis).Stripes.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NAxisStripeCollection

Parameters: None

Return Value: None

Remarks: Removes all stripes in the collection

Example:

NChart1.Axes(atLeftAxis).Stripes.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NAxisStripeCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the NAxisStripe object at the specified index

Example:

NChart1.Axes(atLeftAxis).Stripes.RemoveAt 0


FillEffect

Name: FillEffect

Applies To: NBackground

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFillEffect object applied on the background. Note that the transparency property of the fill effect is discarded. If you want to achieve a transparent background use the Transparent property of the Background object.

Example:

NevronControl.Background.FillEffect.SetGradient gsHorizontal, gvVariant1, vbWhite, vbBlack 'apply gradient filling


Frame

Name: Frame

Applies To: NBackground

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFrameProperties object applied on the background.

Example:

NevronControl.Background.Frame.OuterStyle = fsNone ' disable the background outer bevel frame


MouseResponse

Name: MouseResponse

Applies To: NBackground

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMouseResponse properties applied on the background.

Example:

NevronControl.EventManager.MouseMove = mmChangeMouseCursor NevronControl.Background.MouseResponse.MousePointer = mpHelp ' change the mouse cursor of the background


ShowDialog

Name: ShowDialog

Applies To: NBackground

Parameters: None

Return Value: None

Remarks: Shows the visual interface of the NBackground object.

Example:

NevronControl.Background.ShowDialog


EdgePercent

Name: EdgePercent

Applies To: NBackplane

Type: Long

Remarks: Controls the edge size of the smooth edge or cut edge rectangle (the Style property must be set to bpsSmoothEdgeRectangle or bpsSmoothEdgeRectangle) in percents of the rectangle width or height depending on which one of them is smaller.

Example:

NBackplane.EdgePercent = 35


EllipseHeightPercent

Name: EllipseHeightPercent

Applies To: NBackplane

Type: Long

Remarks: When the style of the backplane is bpsEllipse you can apply additional scaling along the y axis by using this property.

Example:

NBackplane.EllipseHeightPercent = 120 ' add 20% to the height of the ellipse


EllipseWidthPercent

Name: EllipseWidthPercent

Applies To: NBackplane

Type: Long

Remarks: When the style of the backplane is bpsEllipse you can apply additional scaling along the x axis by using this property.

Example:

NBackplane.EllipseWidthPercent = 120 ' add 20% to the width of the ellipse


FillEffect

Name: FillEffect

Applies To: NBackplane

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFillEffect object controlling the fill effect applied on the backplane.

Example:

NBackplane.FillEffect.SetSolidColor vbRed ' make the floor red


Frame

Name: Frame

Applies To: NBackplane

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFrameProperties object controlling the frame properties applied on the backplane.

Example:

NBackplane.Frame.Width = 2 'chart wall border width


InflateHeight

Name: InflateHeight

Applies To: NBackplane

Type: Long

Remarks: The control automatically determines the dimensions of the backplane depending on the object it is attached to. For example if you have a text object the control will calculate the bounding rectangle of the text and then modify the backplane dimensions so that they match the text bounding rectangle. You can additionally inflate or deflate these dimensions by using the InflateHeight property. The inflate is always specified in device units (pixels).

Example:

NBackplane.InflateHeight = 20 ' add 20px to the control generated width of the backplane


InflateWidth

Name: InflateWidth

Applies To: NBackplane

Type: Long

Remarks: The control automatically determines the dimensions of the backplane depending on the object it is attached to. For example if you have a text object the control will calculate the bounding rectangle of the text and then modify the backplane dimensions so that they match the text bounding rectangle. You can additionally inflate or deflate these dimensions by using the InflateWidth property. The inflate is always specified in device units (pixels).

Example:

NBackplane.InflateWidth = 20 ' add 20px to the control generated width of the backplane


Material

Name: Material

Applies To: NBackplane

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMaterial object associated with the backplane. The material properties take effect only when the is applied on 3D backplanes such as the backplane. if a 3D text for example. Backplanes applied on the legend, 2D texts and labels do not use this property.

Example:

NBackplane.Material.AmbientColor = RGB(25, 25, 25) 'modify the ambient material of the backplane


MouseResponse

Name: MouseResponse

Applies To: NBackplane

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMouseResponse object of the backplane.

Example:

NBackplane.MouseResponse.URL = "www.nevron.com" ' the client browser will jump to www.nevron.com when the client clicks on the backplane


ShowDialog

Name: ShowDialog

Applies To: NBackplane

Parameters: None

Return Value: Long

Remarks: Shows the visual interface of the backplane object at runtime.

Example:

NBackplane.ShowDialog ' show the backplane properties


Style

Name: Style

Applies To: NBackplane

Type: BackplaneStyle

Remarks: Defines the style of the backplane. The possible values are: bpsRectangle, bpsEllipse, bpsCircle, bpsCutEdgeRectangle and bpsSmoothEdgeRectangle.

Example:

NBackplane.Style = bpsSmoothEdgeRectangle 'change the backplane style to smooth edge rectangle


Visible

Name: Visible

Applies To: NBackplane

Type: Boolean

Remarks: Controls the visibility of the back plane. When set to False the back plane is not displayed.

Example:

NBackplane.Visible = False ' do not display the backplane


BarEdgePercent

Name: BarEdgePercent

Applies To: NBarPresentGroup

Type: Long

Remarks: Controls the edge size of the smooth edge bar and cut edge bar(the BarStyle property must be set to bsSmoothEdgeBar or bsCutEdgeBar) in percents of the smaller bar dimension (width or depth).

Example:

bar.BarEdgePercent = 35


BarStyle

Name: BarStyle

Applies To: NBarPresentGroup

Type: BarStyle

Remarks: Controls the style of the bars. Valid values are:

  • bsBar
  • bsCylinder
  • bsCone
  • bsInvertedCone
  • bsPyramid
  • bsInvertedPyramid
  • bsSmoothEdgeBar
    By default it is set to bsBar.

    Example:

    bar.BarStyle = bsInvertedPyramid 'bars are now displayed as pyramids

            •


Common

Name: Common

Applies To: NBarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = bar.Common()


DepthPercent

Name: DepthPercent

Applies To: NBarPresentGroup

Type: Long

Remarks: Controls the depth of bars in percents of the floor grid cell depth.

Example:

bar.DepthPercent = 50 'half the cell depth


GapPercent

Name: GapPercent

Applies To: NBarPresentGroup

Type: Long

Remarks: Controls the gap between the bars in percents of the floor grid cell width.

Example:

bar.GapPercent = 10 'one tenth of the cell width


GetLevelAxis

Name: GetLevelAxis

Applies To: NBarPresentGroup

Parameters:

Long nLevel

ByRef AxisType pAxis

Return Value: Boolean

Remarks: Query on which axis is the specified level mapped. The return value indicates whether the level is mapped to any secondary axis or not. See the Bar Chart topic for more information.

Example:

Dim axis As AxisType
If bar.GetLevelAxis 1, axis Then
' level 1 is mapped on axis
Else
' level 1 is not mapped at all on axis
EndIf


GetLevelOrigin

Name: GetLevelOrigin

Applies To: NBarPresentGroup

Parameters:

Long nLevel

ByRef Double pdOrigin

ByRef Boolean pbUseOrigin

Return Value: None

Remarks: This method gives you information about the origin value and origin mode of a specified level.

Example:

Dim originvalue As Double
Dim useorigin As Boolean
bar.GetLevelOrigin 0, originvalue, useorigin


HasBottomEdge

Name: HasBottomEdge

Applies To: NBarPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a bottom edge. By default False.

Example:

bar.HasBottomEdge = True


HasJoinLines

Name: HasJoinLines

Applies To: NBarPresentGroup

Type: Boolean

Remarks: Controls the visibility of the bars join lines

Example:

bar.HasJoinLines = True


HasTopEdge

Name: HasTopEdge

Applies To: NBarPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a top edge. By default True.

Example:

bar.HasTopEdge = True


JoinLineProps

Name: JoinLineProps

Applies To: NBarPresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the appearance of the line connecting the bars

Example:

bar.JoinLineProps.Width = 2


MapLevelOnAxis

Name: MapLevelOnAxis

Applies To: NBarPresentGroup

Parameters:

Long nLevel

AxisType Axis

Return Value: None

Remarks: Scales the level on the specified axis. This method can be very useful if you intend to display multi column charts and the values for the columns have different measures. See the Bar Chart topic for more information.

Example:

bar.MapLevelOnAxis 1, atRightAxis 'values from level 1 are displayed on the right axis


SetLevelOrigin

Name: SetLevelOrigin

Applies To: NBarPresentGroup

Parameters:

Long nLevel

Double dOrigin

Boolean bUseOrigin

Return Value: None

Remarks: This method helps you specify the beginning value of the bars (or the so called bar origin) on a per level basis. By default the bars use origin 0. You can change this value (dOrigin) or even turn off the bar origin (bUseOrigin = False). In this case the bars will begin from the maximal possible value. This feature is very useful if you display bar charts with big absolute values, but with small relative difference.


UnmapLevel

Name: UnmapLevel

Applies To: NBarPresentGroup

Parameters:

Long nLevel

Return Value: Boolean

Remarks: Unmaps the level from any secondary scaling axis. The return value indicates whether the level was mapped or not.

Example:

bar.UnmapLevel 1 'values from level 1 are displayed on the right axis


WidthPercent

Name: WidthPercent

Applies To: NBarPresentGroup

Type: Long

Remarks: Controls the width of bars in percents of the floor grid cell width.

Example:

bar.WidthPercent = 50 'half the cell width


BubbleStyle

Name: BubbleStyle

Applies To: NBubblePresentGroup

Type: PointStyle

Remarks: Controls the shape of the bubbles. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond

    Example:

    bubble.BubbleStyle = psSphere

            •


Common

Name: Common

Applies To: NBubblePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = surface.Common()


MaxSize

Name: MaxSize

Applies To: NBubblePresentGroup

Type: Single

Remarks: Controls the size of the biggest bubble in OpenGL units.

Example:

bubble.MaxSize = 0.5 'max bubble has diameter 0.5


MinSize

Name: MinSize

Applies To: NBubblePresentGroup

Type: Single

Remarks: Controls the size of the smallest bubble in OpenGL units.

Example:

bubble.MinSize = 0.5 'min bubble has diameter 0.5


BeginX

Name: BeginX

Applies To: NCategoryRange

Type: Long

Remarks: The Begin X value of the range or in other words which is the first Category item that will participate in the function calculation.

Example:

arg.BeginX = 0


EndX

Name: EndX

Applies To: NCategoryRange

Type: Long

Remarks: The End X value of the range (final Category participating in function calculation). Valid if InfiniteX is set to False.

Example:

arg.EndX = 3


InfiniteX

Name: InfiniteX

Applies To: NCategoryRange

Type: Boolean

Remarks: When set to True the range occupies all Categories from BeginX to the last one.

Example:

arg.InfiniteX = True


LevelIndex

Name: LevelIndex

Applies To: NCategoryRange

Type: Long

Remarks: Identifies the level of the range.

Example:

arg.LevelIndex = 1 'our range covers the second level


Name

Name: Name

Applies To: NCategoryRange

Type: String

Remarks: The range's name must be unique inside the argument collection. Names can contain alphabetic characters, digits and underscores, but cannot start with a digit.

Example:

arg.Name = "Arg_1"


SerieIndex

Name: SerieIndex

Applies To: NCategoryRange

Type: Long

Remarks: Identifies the serie of the range.

Example:

arg.SerieIndex = 0 'our range covers the first serie


ValueType

Name: ValueType

Applies To: NCategoryRange

Type: DataValueType

Remarks: Identifies the value type of the range. This can be any value type from dvtValue1 to dvtValue6. Only the values of the selected value type participate in function calcuation. This is useful for example if you want to apply a function to the close values of an OHLC chart (The "close" values are stored as dvtValue4).

Example:

arg.ValueType = dvtValue4 'select the "close" values


AboutBox

Name: AboutBox

Applies To: NChart

Parameters: None

Return Value: None

Remarks: Shows the chart about dialog


AnnotationCollection

Name: AnnotationCollection

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAnnotatioCollection object. With it you can control the annotations displayed in the chart.


AspManager

Name: AspManager

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAspManager object controlling the ASP component integration


Axes

Name: Axes

Applies To: NChart

Parameters:

AxisType Type

Return Value: Object

Remarks: Gives you access to the six axes of the component. The Type argument specifies the axis you want to access. Possible values are:

  • atLeftAxis
  • atBackAxis
  • atRightAxis
  • atFrontAxis
  • atCategoriesAxis
  • atSeriesAxis
    See the Axes topic for more information.

    Example:

    NChart1.Axes(atCategoriesAxis).Visibile = False ' hide the categories axis

            •


Background

Name: Background

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NBackground object controlling the background appearance.

Example:

NChart1.Background.FillEffect.SetSolidColor vbRed 'set red background


BottomMargin

Name: BottomMargin

Applies To: NChart

Type: Single

Remarks: Controls the bottom margin of the chart area in percents of the control window height. The bottom margin cannot be smaller than the top margin and is internally clamped to the range [0, 100] where 0 means the top edge of the control and 100 represents the bottom one.

Example:

NChart1.BottomMargin = 80 ' move the bottom margin of the active chart towards the top


Categories

Name: Categories

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAxisParameterCollection of the categories. See the Categories, Series and Levels topic for more information.

Example:

Dim param As NAxisParamter
Set param = NChart1.PresentGroups.Categories.Add("Hello", True) ' add a new categorie


ChartCollection

Name: ChartCollection

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NChartCollection object representing the charts in the control. With the help of this collection you can add new charts, delete existing ones, enumerate charts and change the active chart of the control. The active chart is the chart whose properties are exposed via the main object of the control NChart. You can have an arbitrary number of chart in the chart collection but only of them is active at a time.

Example:

NChart1.ChartCollection.Add 'add a new chart
NChart1.ChartCollection.GetAt(1).Visible = False ' make the second chart invisible


ChartDepth

Name: ChartDepth

Applies To: NChart

Type: Single

Remarks: Controls the chart area depth in OpenGL units.

Example:

NChart1.ChartDepth = 2 ' make more space for the series


ChartHeight

Name: ChartHeight

Applies To: NChart

Type: Single

Remarks: Controls the chart area height in OpenGL units.

Example:

NChart1.ChartHeight = 3


ChartVisible

Name: ChartVisible

Applies To: NChart

Type: Long

Remarks: Controls the visibility of the chart. The default value of this property is TRUE.

Example:

NChart1.ChartVisible = FALSE ' do not display the chart at this time


ChartWidth

Name: ChartWidth

Applies To: NChart

Type: Single

Remarks: Controls the chart area width in OpenGL units.

Example:

NChart1.ChartWidth = 3 ' make more space for the categories


Clear

Name: Clear

Applies To: NChart

Parameters: None

Return Value: None

Remarks: Resets the chart to the beggining state. This will clear all custom corrections including presentation groups, categories, series, lighting, projection, labels, legend and other.

Example:

NChart1.Clear


DataAt

Name: DataAt

Applies To: NChart

Parameters:

Long nX

Long nY

Long nZ

Return Value: Object

Remarks: Gives you access to the NData object at the specified index. nX is the category, nY is the serie and nZ is the level of the data point you want to gain access to.

Example:

NChart1.DataAt(0, 0, 0).Value1 = 10 'set Value1 to 10 for data point at first categorie, first serie and first level.


Database

Name: Database

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NDatabase object controlling the ADO database integration. See the ADO Database Integration topic for more information.

Example:

NChart1.Database.Enable = True ' enable database integration


DataStorage

Name: DataStorage

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NDataStorage object, which controls some properties of the Data Storage. See the Data Storage topic for more information.

Example:

NChart1.DataStorage.DataType = dtDataType65 ' change the data type to dtDataType65


DisplayOnLegend

Name: DisplayOnLegend

Applies To: NChart

Type: None

Remarks: The index of the legend in the NLegendCollection which will display data about this chart. Every chart in the control can have only one target legend. If you assign -1 to this property the chart is disconnected from all legends. Note that once you assign a chart to a particular legend you cannot delete this legend from the NLegendCollection. Before you do so you must first break the pair chart-legend by connecting the chart to a different legend or by disconnecting it from all legends (-1).

Example:

NChart1.DisplayOnLegend = 0 ' display on the first legend of the legend collection


EventManager

Name: EventManager

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NEventMangager object. It is used to configure the component response to various user actions.


Get3DView

Name: Get3DView

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the N3DView object of the componet. The N3DView object controls the 3D view projection of the scene.

Example:

NChart1.Get3DView.SetPredefinedProjection pp3D 'set 3D projection


ImportExport

Name: ImportExport

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NImportExport object trough which you can perform some import - export operations including export to image files and save and load of the component state


LabelCollection

Name: LabelCollection

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLabelCollection object. With it you can controls the labels displayed on top of all chart elements.


LeftMargin

Name: LeftMargin

Applies To: NChart

Type: Single

Remarks: Controls the left margin of the chart area in percents of the control window width. The left margin cannot be greater than the right margin and is internally clamped to the range [0, 100] where 0 means the left edge of the control and 100 represents the right one.

Example:

NChart1.LeftMargin = 20 ' move the left margin of the active chart to the right


Legend

Name: Legend

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLegend object controlling the appearance of the chart integrated legend


LegendCollection

Name: LegendCollection

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the LegendCollection object representing the legends in the control. With the help of this collection you can add new legends, delete existing ones, enumerate legends and change the active legend of the control. The active legend is the legend whose properties are exposed from the Legend method of the NChart object. You can have an arbitrary number of legend in the legend collection but only of them is active at a time.

Example:

NChart1.LegendCollection.Add 'add a new legend
NChart1.LegendCollection.GetAt(1).Backplane.Visible = False ' make the backplane of the second legend invisible


Levels

Name: Levels

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAxisParameterCollection of the levels. See the Categories, Series and Levels topic for more information.

Example:

Dim param As NAxisParamter
Set param = NChart1.PresentGroups.Levels.Add("Hello", True) ' add a new level


LightModel

Name: LightModel

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLightModel object controlling some global lighting parameters.


MarginBackplane

Name: MarginBackplane

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Returns the NBackplane object controlling the backplane of the chart area.

Example:

NChart1.MarginBackplane.Visible = True NChart1.MarginBackplane.FillEffect.SetSolidColor vbRed ' change the color of the backplane


MarginStrategy

Name: MarginStrategy

Applies To: NChart

Type: MarginStrategy

Remarks: Defines the strategy used to fit the chart into the chart area. The possible values for this property are: msNoMargins, msStretch and msFit.

  • msNoMargins - the chart will not try to align to the chart area.
  • msStretch - the chart will stretch along X, Y and Z dimensions in order to fill as much of the chart area as possible without breaking outside. This margin strategy does not preserve the chart proportions.
  • msFit - the chart will again stretch along X, Y and Z dimensions, but will preserve the chart proportions.
    The default value is msFit.

    Example:

    NChart1.MarginStrategy = msStretch

            •


Picture

Name: Picture

Applies To: NChart

Parameters:

Boolean UseWindowDimensions

Long Width

Long Height

None BitsPerPixel

Return Value: ByRef IPictureDisp

Remarks: Helps you use the currently rendered image of the component in operations requiring the Picture property type. A typical example is the PaintPicture method in Visual Basic. See the Printing topic for more information.


PresentGroups

Name: PresentGroups

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the presentation groups of the component. See the Presentation Groups topic for more information.

Example:

Dim bar As NBarPresentGroup
Set bar = NChart1.PresentGroups.Add(pgtBar) 'create a bar present group


PrintManager

Name: PrintManager

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPrintManager object controlling the component build in printing functionality. See the Printing topic for more information.


Redraw

Name: Redraw

Applies To: NChart

Type: Long

Remarks: When turned off, subsequent changes do not repaint the control. If you intend to apply multiple changes, turn this flag off and when finished turn it back on. This will greatly improve performance.

Example:

NChart1.Redraw = False
' do not repaint the control
'some code here
NChart1.Redraw = True 'repaint the control when finished


RightMargin

Name: RightMargin

Applies To: NChart

Type: Single

Remarks: Controls the right margin of the chart area in percents of the control window width. The right margin cannot be smaller than the left margin and is internally clamped to the range [0, 100] where 0 means the left edge of the control and 100 represents the right one.

Example:

NChart1.RightMargin = 80 ' move the right margin of the active chart to the left


Series

Name: Series

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAxisParameterCollection of the series. See the Categories, Series and Levels topic for more information.

Example:

Dim param As NAxisParamter
Set param = NChart1.PresentGroups.Series.Add("Hello", True) ' add a new serie


Settings

Name: Settings

Applies To: NChart

Parameters: None

Return Value: Object

Remarks: Gives you access to the NSettings object. With the help of this object you can control the special visual effects applied on the scene, locales and printing settins.


ShowPropertyPage

Name: ShowPropertyPage

Applies To: NChart

Parameters:

ChartPropertyPage page

Return Value: None

Remarks: Shows the specified property page of the component at runtime. Posssible values for this property are:


ShowPropertySheet

Name: ShowPropertySheet

Applies To: NChart

Parameters: None

Return Value: None

Remarks: Shows the property pages of the component at runtime.

Example:

NChart1.ShowPropertySheet ' show the property pages


TopMargin

Name: TopMargin

Applies To: NChart

Type: Single

Remarks: Controls the top margin of the chart area in percents of the control window height. The top margin cannot be greater than the bottom margin and is internally clamped to the range [0, 100] where 0 means the top edge of the control and 100 represents the bottom one.

Example:

NChart1.TopMargin = 20 ' move the top margin of the active chart towards the bottom


Walls

Name: Walls

Applies To: NChart

Parameters:

ChartWallType Type

Return Value: Object

Remarks: Gives you access to the five chart walls of the component. The Type argument specifies the chart wall you want to access. Possible values are:

  • cwtLeft
  • cwtBack
  • cwtRight
  • cwtFront
  • cwtFloor
    See the Chart Walls topic for more information.

    Example:

    NChart1.Walls(cwtFloor).Visibile = False ' hide the chart floor

            •


ActiveChart

Name: ActiveChart

Applies To: NChartCollection

Type: Long

Remarks: Sets the current active chart. You can have an arbitrary number of charts, but only one chart can be active at a time. The active chart properties are exposed directly from the main automation object of the control - NChart. The following example adds a new chart to the chart collection and makes it the active one.

Example:

NChart1.ChartCollection.Add NChart1.ChartCollection.ActiveChart = 1 ' make the second chart the active one


Add

Name: Add

Applies To: NChartCollection

Parameters: None

Return Value: Object

Remarks: Adds a new Chart to the NChartCollection.

Example:

Dim Chart As NChartManager
            Set Chart = NChart1.ChartCollection.Add
            Chart.MarginBackplane.Visible = True' now we can edit the properties of the new chart


GetAt

Name: GetAt

Applies To: NChartCollection

Parameters:

Long Index

Return Value: Object

Remarks: Returns the NChartManager object at Index position in the NChartCollection. The index is zero based.

Example:

Dim Chart As NChartManager
Set Chart = NChart1.ChartCollection.GetAt(1) 'retrieve the second Chart


GetCount

Name: GetCount

Applies To: NChartCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of the Charts in the NChartCollection.

Example:

for i = 0 to NChart1.ChartCollection.GetCount
' do something
next i


RemoveAll

Name: RemoveAll

Applies To: NChartCollection

Parameters: None

Return Value: None

Remarks: Removes all charts from the NChartCollection collection.

Example:

NChart1.ChartCollection.RemoveAll 'clear the collection


RemoveAt

Name: RemoveAt

Applies To: NChartCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the chart at Index position in the NChartCollection. The index is zero based.

Example:

NChart1.ChartCollection.RemoveAt 0 ' remove the first one


AnnotationMouseEvent

Name: AnnotationMouseEvent

Applies To: NChartEvents

Parameters:

None nItemIndex

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on a chart annotation


AxisMouseEvent

Name: AxisMouseEvent

Applies To: NChartEvents

Parameters:

None nChartIndex

AxisType ChartAxis

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on the chart axes. The ChartAxis parameter contains the chart axis on which the user has clicked.


BackgroundMouseEvent

Name: BackgroundMouseEvent

Applies To: NChartEvents

Parameters:

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on the component background


ChartWallMouseEvent

Name: ChartWallMouseEvent

Applies To: NChartEvents

Parameters:

None nChartIndex

ChartWallType ChartWall

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on a chart wall. The ChartWall parameter gives you the index of the chart wall.


DataMouseEvent

Name: DataMouseEvent

Applies To: NChartEvents

Parameters:

None nChartIndex

None nX

None nY

None nZ

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on a chart data item. The nX, nY and nZ parameters contain the index of the data item in the data storage.


FunctionEvent

Name: FunctionEvent

Applies To: NChartEvents

Parameters:

None nChartIndex

None nPresentGroupIndex

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on a function line in case that the function present group's appearance range is not used.


KeyboardEvent

Name: KeyboardEvent

Applies To: NChartEvents

Parameters:

Long nChar

Long nRepCnt

Long nFlags

KeyboardState nKeyState

Return Value: None

Remarks: This event is generated when the user clicks on the grouped pie slice


LabelMouseEvent

Name: LabelMouseEvent

Applies To: NChartEvents

Parameters:

None nItemIndex

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on a chart label


LegendDataMouseEvent

Name: LegendDataMouseEvent

Applies To: NChartEvents

Parameters:

None nLegendIndex

None nRow

None nCol

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on a legend data item


LegendMouseEvent

Name: LegendMouseEvent

Applies To: NChartEvents

Parameters:

None nLegendIndex

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on the legend


MapShapeMouseEvent

Name: MapShapeMouseEvent

Applies To: NChartEvents

Parameters:

None nChartIndex

None nPresentGroupIndex

None nShapeIndex

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on a map shape. The nPresentGroupIndex and the nShapeIndex parameters contain the index of the presentation group of the map and the shape index within that presentation group on which the user has clicked.


OnDownloadDataAvailable

Name: OnDownloadDataAvailable

Applies To: NChartEvents

Parameters: None

Return Value: None

Remarks: This event is generated when the control has downloaded the data from the specified URL.


OnDownloadDataFailed

Name: OnDownloadDataFailed

Applies To: NChartEvents

Parameters: None

Return Value: None

Remarks: This event is generated from the control to notify the container that the download of the native data has failed.


OnDownloadDataProgress

Name: OnDownloadDataProgress

Applies To: NChartEvents

Parameters:

Long nPercent

Return Value: None

Remarks: This event is generated from the control to notify the container that the download progress has changed.


OnDragOver

Name: OnDragOver

Applies To: NChartEvents

Parameters:

Long HWND

Long pDataObject

Long dwKeyState

Long nX

Long nY

ByRef DropEffect pRes

Return Value: None

Remarks: This event is generated when the user drags a data source over the chart.

  • hWnd - points to the window that the cursor is over.
  • pDataObject - points to the data object that contains the data to be dropped. The object supports the IDataSource interface.
  • dwKeyState - Contains the state of the modifier keys. This is a combination of any number of the following: MK_CONTROL, MK_SHIFT, MK_ALT, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON defined in the Windows API.
  • nX - Contains the current x coordinate of the cursor in client coordinates.
  • nY - Contains the current y coordinate of the cursor in client coordinates.
  • pRes - indicates the action to be performed shoud a drop occurs. See the DropEffect enumeration for more information.

            •


OnDrop

Name: OnDrop

Applies To: NChartEvents

Parameters:

Long HWND

Long pDataObject

Long nDropEffect

Long nX

Long nY

ByRef Boolean pbRet

Return Value: None

Remarks: This event is generated when the user clicks on the grouped pie slice


PieOtherSliceMouseEvent

Name: PieOtherSliceMouseEvent

Applies To: NChartEvents

Parameters:

None nChartIndex

Object MouseState

Return Value: None

Remarks: This event is generated when the user clicks on the grouped pie slice


AnnotationCollection

Name: AnnotationCollection

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAnnotatioCollection object. With it you can control the annotations displayed in the chart.


Axes

Name: Axes

Applies To: NChartManager

Parameters:

AxisType Type

Return Value: Object

Remarks: Gives you access to the six axes of the component. The Type argument specifies the axis you want to access. Possible values are:

  • atLeftAxis
  • atBackAxis
  • atRightAxis
  • atFrontAxis
  • atCategoriesAxis
  • atSeriesAxis
    See the Axes topic for more information.

    Example:

    NChartManager.Axes(atCategoriesAxis).Visibile = False ' hide the categories axis

            •


BottomMargin

Name: BottomMargin

Applies To: NChartManager

Type: Single

Remarks: Controls the bottom margin of the chart area in percents of the control window height. The bottom margin cannot be smaller than the top margin and is internally clamped to the range [0, 100] where 0 means the top edge of the control and 100 represents the bottom one. NChartManager.BottomMargin = 80 ' move the bottom margin of the active chart towards the top


Categories

Name: Categories

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAxisParameterCollection of the categories. See the Categories, Series and Levels topic for more information.

Example:

Dim param As NAxisParamter
Set param = NChartManager.PresentGroups.Categories.Add("Hello", True) ' add a new categorie


ChartDepth

Name: ChartDepth

Applies To: NChartManager

Type: Single

Remarks: Controls the chart area depth in OpenGL units.

Example:

NChartManager.ChartDepth = 2 ' make more space for the series


ChartHeight

Name: ChartHeight

Applies To: NChartManager

Type: Single

Remarks: Controls the chart area height in OpenGL units.

Example:

NChartManager.ChartHeight = 3


ChartWidth

Name: ChartWidth

Applies To: NChartManager

Type: Single

Remarks: Controls the chart area width in OpenGL units.

Example:

NChartManager.ChartWidth = 3 ' make more space for the categories


DataAt

Name: DataAt

Applies To: NChartManager

Parameters:

Long nX

Long nY

Long nZ

Return Value: Object

Remarks: Gives you access to the NData object at the specified index. nX is the category, nY is the serie and nZ is the level of the data point you want to gain access to.

Example:

NChartManager.DataAt(0, 0, 0).Value1 = 10 'set Value1 to 10 for data point at first categorie, first serie and first level.


Database

Name: Database

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the NDatabase object controlling the ADO database integration. See the ADO Database Integration topic for more information.

Example:

NChartManager.Database.Enable = True ' enable database integration


DataStorage

Name: DataStorage

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the NDataStorage object, which controls some properties of the Data Storage. See the Data Storage topic for more information.

Example:

NChartManager.DataStorage.DataType = dtDataType65 ' change the data type to dtDataType65


DisplayOnLegend

Name: DisplayOnLegend

Applies To: NChartManager

Type: None

Remarks: The index of the legend in the NLegendCollection which will display data about this chart. Every chart in the control can have only one target legend. If you assign -1 to this property the chart is disconnected from all legends. Note that once you assign a chart to a particular legend you cannot delete this legend from the NLegendCollection. Before you do so you must first break the pair chart-legend by connecting the chart to a different legend or by disconnecting it from all legends (-1).

Example:

NChartManager.DisplayOnLegend = 0 ' display on the first legend of the legend collection


Get3DView

Name: Get3DView

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the N3DView object of the componet. The N3DView object controls the 3D view projection of the scene.

Example:

NChartManager.Get3DView.SetPredefinedProjection pp3D 'set 3D projection


LeftMargin

Name: LeftMargin

Applies To: NChartManager

Type: Single

Remarks: Controls the left margin of the chart area in percents of the control window width. The left margin cannot be greater than the right margin and is internally clamped to the range [0, 100] where 0 means the left edge of the control and 100 represents the right one. NChartManager.LeftMargin = 20 ' move the left margin of the active chart to the right


Levels

Name: Levels

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAxisParameterCollection of the levels. See the Categories, Series and Levels topic for more information.

Example:

Dim param As NAxisParamter
Set param = NChartManager.PresentGroups.Levels.Add("Hello", True) ' add a new level


LightModel

Name: LightModel

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLightModel object controlling some global lighting parameters.


MarginBackplane

Name: MarginBackplane

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks:


MarginStrategy

Name: MarginStrategy

Applies To: NChartManager

Type: MarginStrategy

Remarks: Defines the strategy used to fit the chart into the chart area. The possible values for this property are: msNoMargins, msStretch and msFit.

  • msNoMargins - the chart will not try to align to the chart area.
  • msStretch - the chart will stretch along X, Y and Z dimensions in order to fill as much of the chart area as possible without breaking outside. This margin strategy does not preserve the chart proportions.
  • msFit - the chart will again stretch along X, Y and Z dimensions, but will preserve the chart proportions.

            •


PresentGroups

Name: PresentGroups

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the presentation groups of the component. See the Presentation Groups topic for more information.

Example:

Dim bar As NBarPresentGroup
Set bar = NChartManager.PresentGroups.Add(pgtBar) 'create a bar present group


RightMargin

Name: RightMargin

Applies To: NChartManager

Type: Single

Remarks: Controls the right margin of the chart area in percents of the control window width. The right margin cannot be smaller than the left margin and is internally clamped to the range [0, 100] where 0 means the left edge of the control and 100 represents the right one. NChartManager.RightMargin = 80 ' move the right margin of the active chart to the left


Series

Name: Series

Applies To: NChartManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAxisParameterCollection of the series. See the Categories, Series and Levels topic for more information.

Example:

Dim param As NAxisParamter
Set param = NChartManager.PresentGroups.Series.Add("Hello", True) ' add a new serie


TopMargin

Name: TopMargin

Applies To: NChartManager

Type: Single

Remarks: Controls the top margin of the chart area in percents of the control window height. The top margin cannot be greater than the bottom margin and is internally clamped to the range [0, 100] where 0 means the top edge of the control and 100 represents the bottom one. NChartManager.TopMargin = 20 ' move the top margin of the active chart towards the bottom


Visible

Name: Visible

Applies To: NChartManager

Type: Long

Remarks: Controls the visibility of the chart. The default value of this property is TRUE.

Example:

NChartManager.ChartVisible = FALSE ' do not display the chart at this time


Walls

Name: Walls

Applies To: NChartManager

Parameters:

ChartWallType Type

Return Value: Object

Remarks: Gives you access to the five chart walls of the component. The Type argument specifies the chart wall you want to access. Possible values are:

  • cwtLeft
  • cwtBack
  • cwtRight
  • cwtFront
  • cwtFloor
    See the Chart Walls topic for more information.

    Example:

    NChartManager.Walls(cwtFloor).Visibile = False ' hide the chart floor

            •


Border

Name: Border

Applies To: NChartWall

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLineProperties object controlling the properties applied on the chart wall border.

Example:

NChart1.Walls(cwtFloor).Border.Width = 2 'chart wall border width


EdgePercent

Name: EdgePercent

Applies To: NChartWall

Type: Long

Remarks: Controls the edge size of the smooth edge or cut edge bar (the WallStyle property must be set to wsSmoothEdgeBar or wsCutEdgeBar) in percents of the wall width.

Example:

NChart1.Walls(cwtBack).EdgePercent = 35


FillEffect

Name: FillEffect

Applies To: NChartWall

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFillEffect object controlling the fill effect applied on the chart wall.

Example:

NChart1.Walls(cwtFloor).FillEffect.SetSolidColor vbRed ' make the floor red


HasBottomEdge

Name: HasBottomEdge

Applies To: NChartWall

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a bottom edge. By default False.

Example:

NChart1.Walls(cwtBack).HasBottomEdge = True


HasTopEdge

Name: HasTopEdge

Applies To: NChartWall

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a top edge. By default True.

Example:

NChart1.Walls(cwtBack).HasTopEdge = True


Material

Name: Material

Applies To: NChartWall

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMaterial object controlling the material applied on the chart wall.

Example:

NChart1.Walls(cwtFloor).Material.SetAmbientDiffuseColor vbBlue 'chart floor is now blue when you set some lighting on the scene


MouseResponse

Name: MouseResponse

Applies To: NChartWall

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMouseResponse object of the chart wall.

Example:

NChart1.Walls(cwtFloor).MouseResponse.URL = "www.nevron.com" ' the client browser will jump to www.nevron.com when the client clicks on the floor wall


Style

Name: Style

Applies To: NChartWall

Type: WallStyle

Remarks: Defines the style of the wall

Example:

NChart1.Walls(cwtBack).Style = wsSmoothEdgeBar 'make back wall smoothed


Visible

Name: Visible

Applies To: NChartWall

Type: Boolean

Remarks: Controls the visibility of the chart wall,

Example:

NChart1.Walls(cwtRight).Visible = False 'hide the chart wall


Width

Name: Width

Applies To: NChartWall

Type: Single

Remarks: Specifies the width of the chart wall,

Example:

NChart1.Walls(cwtBack).Width = 0.10 'make back wall thicker


Annotation

Name: Annotation

Applies To: NData

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAnnotation object of the data point.

Example:

NChart1.DataAt(0, 0, 0).Annotation.Text = "Take a look at this data point"


Border

Name: Border

Applies To: NData

Parameters: None

Return Value: Object

Remarks: Gives you access to the Border of the data point. The border is applied on the data point if the uniform appearances of the presentation group are turned off

Example:

NChart1.DataAt(0, 0, 0).Border.Color vbYellow


Color

Name: Color

Applies To: NData

Type: OLE_COLOR

Remarks: The data point color. This property can be used as a substitute for the FillEffect of the data point, since it requires less memory and is far more effective if you intend to create charts whose data points are only filled with solid colors. This property is enabled only for minor data types 2 and 3. See the Data Storage Topic for more information.

Example:

NChart1.DataAt(0, 0, 0).Color = vbRed


FillEffect

Name: FillEffect

Applies To: NData

Parameters: None

Return Value: Object

Remarks: Gives you access to the Fill Effect of the data point. The fill effect is applied on the data point if the uniform appearances of the presentation group are turned off

Example:

NChart1.DataAt(0, 0, 0).FillEffect.SetSolidColor vbBlue


GetValueDateTime

Name: GetValueDateTime

Applies To: NData

Parameters:

DataValueType Value

ByRef Long pYear

ByRef Long pMonth

ByRef Long pDay

ByRef Long pHour

ByRef Long pMin

ByRef Long pSec

ByRef Long pMilisecond

Return Value: None

Remarks: Retrieves the date time components of the date stored in the specified data point value.

Example:

Dim nYear As Long, nMonth As Long, nDays As Long, nHours As Long, nMinutes As Long, nSeconds As Long\ data.GetValueDateTime dvtValue1, nYear, nMonth, nDay, nHour, nMin, nSec, nMilisecond


Label

Name: Label

Applies To: NData

Type: String

Remarks: The label string of the data point. Data point labels are displayed on each data point, when the HasTexts property of the NPresentGroupCommon object has been set to True and the FormatString property of the same object includes the %L formatting command.

Example:

NChart1.PresentGroups.GetAt(0).Common.HasTexts = True
NChart1.PresentGroups.GetAt(0).Common.FormatString = "%L"
NChart1.DataAt(0, 0, 0).Label = "Hello World"


Material

Name: Material

Applies To: NData

Parameters: None

Return Value: Object

Remarks: Gives you access to the Material of the data point. The material is applied on the data point if the uniform appearances of the presentation group are turned off

Example:

NChart1.DataAt(0, 0, 0).Material.SetAmbientDiffuseColor vbRed


MouseResponse

Name: MouseResponse

Applies To: NData

Parameters: None

Return Value: Object

Remarks: Gives you access to the MouseResponse of the data point. The mouse response defines behaviour of the data point to various mouse actions and takes a significant part in the creation of Internet interactive charts. It also has properties which help you specify a default tooltip.

Example:

NChart1.DataAt(0, 0, 0).MouseResponse.URL = "www.nevron.com"


SetValueDateTime

Name: SetValueDateTime

Applies To: NData

Parameters:

DataValueType Value

Long nYear

Long nMonth

Long nDay

Long nHour

Long nMin

Long nSec

Long nMilisecond

Return Value: None

Remarks: Sets the specified value of the data point with the double equivalent of the specified date - time.

Example:

NChart1.DataAt(0, 0, 0).SetValueDateTime dvtValue1, 2002, 2, 13, 14, 19, 9, 89 ' store 2002/2/13 14/19/9 89ms in Value1


ShowEditDateTimeDlg

Name: ShowEditDateTimeDlg

Applies To: NData

Parameters:

DataValueType Value

Return Value: Boolean

Remarks: Shows the edit date time dialog for the specified data point value. The return value indicates wheather the user clicked on the OK button. data.ShowEditDateTimeDlg(dvtValue1)


TextEx

Name: TextEx

Applies To: NData

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx of the data point.

Example:

NChart1.DataAt(0, 0, 0).TextEx.Font.Size = 12


Value1

Name: Value1

Applies To: NData

Type: Double

Remarks: Value 1 of the data point. This is the only property that is supported by all data types and is the most widely used one by the presentation groups.

Example:

NChart1.DataAt(0, 0, 0).Value1 = 3


Value2

Name: Value2

Applies To: NData

Type: Double

Remarks: Value 2 of the data point

Example:

NChart1.DataAt(0, 0, 0).Value2 = 4


Value3

Name: Value3

Applies To: NData

Type: Double

Remarks: Value 3 of the data point

Example:

NChart1.DataAt(0, 0, 0).Value3 = 1


Value4

Name: Value4

Applies To: NData

Type: Double

Remarks: Value 4 of the data point

Example:

NChart1.DataAt(0, 0, 0).Value4 = 3


Value5

Name: Value5

Applies To: NData

Type: Double

Remarks: Value 5 of the data point

Example:

NChart1.DataAt(0, 0, 0).Value5 = 8


Value6

Name: Value6

Applies To: NData

Type: Double

Remarks: Value 6 of the data point

Example:

NChart1.DataAt(0, 0, 0).Value6 = 9


CurrentDataSource

Name: CurrentDataSource

Applies To: NDatabase

Type: Long

Remarks: Specifies the current data source. Although you can create several data sources in the DataSources collection only one of them can be the active one.

Example:

database.CurrentDataSource = 0 ' activate the first data source


DataSources

Name: DataSources

Applies To: NDatabase

Parameters: None

Return Value: Object

Remarks: Gives you access to the collection of NDataSource objects


DataType

Name: DataType

Applies To: NDatabase

Type: DataType

Remarks: Specifies the data storage data type. When the database is imported the data storage is created with this data type.

Example:

database.DataType = dtDataType35


Enable

Name: Enable

Applies To: NDatabase

Type: Boolean

Remarks: When set to True the data storage of the component is extracted from the current data source.


Requery

Name: Requery

Applies To: NDatabase

Parameters: None

Return Value: Boolean

Remarks: Imports the database in the data storage of the component.


CategoryField

Name: CategoryField

Applies To: NDataSource

Type: String

Remarks: Specifies the field from which the category labels will be extracted

Example:

datasource.CategoryField = "Field1"


ConnectString

Name: ConnectString

Applies To: NDataSource

Type: String

Remarks: Specifies the connection string of the data source.

Example:

datasource.ConnectString = "DSN=SomeDatabase"


LastErrorStr

Name: LastErrorStr

Applies To: NDataSource

Parameters: None

Return Value: String

Remarks: Holds the last encountered error from the TestSQL and TestConnection routines

Example:

sError = datasource.LastErrorStr()


Name

Name: Name

Applies To: NDataSource

Type: String

Remarks: The user friendly name of the data source.

Example:

datasource.Name = "My datasource"


Password

Name: Password

Applies To: NDataSource

Type: String

Remarks: Password used when 3DChart opens the ADO connection.

Example:

datasource.Password = "PWD"


SerieMappings

Name: SerieMappings

Applies To: NDataSource

Parameters: None

Return Value: Object

Remarks: Gives you access to the NSerieMappingCollection object holding NSerieMapping objects.


ShowCategoryLabels

Name: ShowCategoryLabels

Applies To: NDataSource

Type: Boolean

Remarks: Controls the visibility of the category labels

Example:

datasource.ShowCategoryLabels = False 'category labels are not displayed


SQL

Name: SQL

Applies To: NDataSource

Type: String

Remarks: The SQL statement which will be executed.

Example:

datasource.SQL = "SELECT * FROM Table1"


TestConnection

Name: TestConnection

Applies To: NDataSource

Parameters: None

Return Value: Long

Remarks: Returns True if a valid connection string is specified.

Example:

bOK = datasource.TestConnection()


TestSQL

Name: TestSQL

Applies To: NDataSource

Parameters: None

Return Value: Long

Remarks: Returns True if a valid SQL string is specified.

Example:

bOK = datasource.TestSQL()


UserName

Name: UserName

Applies To: NDataSource

Type: String

Remarks: User name used when 3DChart opens the ADO connection.

Example:

datasource.UserName = "Admin"


Add

Name: Add

Applies To: NDataSourceCollection

Parameters:

String Name

Return Value: Object

Remarks: Adds a new data source and returns the newly created object.

Example:

Dim datasource As NDataSource
Set datasource = Database.DataSources.Add("DataSource1")


GetAt

Name: GetAt

Applies To: NDataSourceCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Returns the object at the specified index.

Example:

Dim datasource As NDataSource
Set datasource = Database.DataSources.GetAt(0)


GetCount

Name: GetCount

Applies To: NDataSourceCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of object in the data source collection.

Example:

objcount = Database.DataSources.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NDataSourceCollection

Parameters: None

Return Value: None

Remarks: Removes all data sources in the collection.

Example:

Database.DataSources.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NDataSourceCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the serie mapping at the given index.

Example:

Database.DataSources.RemoveAt 0


CategoryPageSize

Name: CategoryPageSize

Applies To: NDataStorage

Type: Long

Remarks: Controls the page size of the categories. The page size reflects the granilarity of the reserved memory for the categories. By default 20

Example:

NChart1.DataStorage.CategoryPageSize = 10


DataPointPrecision

Name: DataPointPrecision

Applies To: NDataStorage

Type: Long

Remarks: Specifies the decimal point precision that should be used for formatting the data point values.

Example:

NChart1.DataStorage.DataPointPrecision = 2
© 1998 - 2002 NEVRON LLC. All rights reserved.


DataType

Name: DataType

Applies To: NDataStorage

Type: DataType

Remarks: Specifies the data type of the data storage. The data type determines the data values each data point has. Available values are:

  • dtDataType11
  • dtDataType12
  • dtDataType13
  • dtDataType14
  • dtDataType15
  • dtDataType16
  • dtDataType21
  • dtDataType22
  • dtDataType23
  • dtDataType24
  • dtDataType25
  • dtDataType26
  • dtDataType31
  • dtDataType32
  • dtDataType33
  • dtDataType34
  • dtDataType35
  • dtDataType36
  • dtDataType45
  • dtDataType46
  • dtDataType55
  • dtDataType56
  • dtDataType65
  • dtDataType66
    See the Data Storage topic for more information.

    Example:

    NChart1.DataStorage.DataType = dtDataType65 'change the data type to dtDataType65

            •


DecimalPointPrecision

Name: DecimalPointPrecision

Applies To: NDataStorage

Type: Long

Remarks: Specifies the decimal point precision that should be used for formatting the data point values.

Example:

NChart1.DataStorage.DataPointPrecision = 2


IsValueSupportedByDataType

Name: IsValueSupportedByDataType

Applies To: NDataStorage

Parameters:

DataValueType Value

DataType Type

Return Value: Boolean

Remarks: Determines whether the specified data value is supporder by the current data type.

Example:

Dim bSupported As Boolean
bSupported = NChart1.DataStorage.IsValueSupportedByDataType(dvtFillEffect, dtDataType35)


LevelPageSize

Name: LevelPageSize

Applies To: NDataStorage

Type: Long

Remarks: Controls the page size of the levels. The page size reflects the granilarity of the reserved memory for the series. By default 1

Example:

NChart1.DataStorage.SeriePageSize = 10


SeriePageSize

Name: SeriePageSize

Applies To: NDataStorage

Type: Long

Remarks: Controls the page size of the series. The page size reflects the granilarity of the reserved memory for the series. By default 1

Example:

NChart1.DataStorage.SeriePageSize = 10


ShowConfigurationDialog

Name: ShowConfigurationDialog

Applies To: NDataStorage

Parameters: None

Return Value: Boolean

Remarks: Shows the data storage configuration dialog. The return value indicates whether the user clicked the OK button.

Example:

Dim bOk As Boolean
Set bOk = NChart1.DataStorage.ShowConfigurationDialog


BeginRadius

Name: BeginRadius

Applies To: NDoughnutPresentGroup

Type: Single

Remarks: Specifies the begin radius of the doughnut segments

Example:

douhgnut.BeginRadius = 0.5


Common

Name: Common

Applies To: NDoughnutPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = doughnut.Common()


DefaultRingBeginAngle

Name: DefaultRingBeginAngle

Applies To: NDoughnutPresentGroup

Type: Single

Remarks: Specifies the default ring begin angle. By default 0.

Example:

douhgnut.BeginAngle = 30


DefaultRingDetachment

Name: DefaultRingDetachment

Applies To: NDoughnutPresentGroup

Type: Single

Remarks: Specifies the default distance between adjacent rings. By default 0.

Example:

douhgnut.RingDetachment = 0.3 ' 0.3 OpenGL units between rings


DefaultRingRadius

Name: DefaultRingRadius

Applies To: NDoughnutPresentGroup

Type: Single

Remarks: Specifies the default ring radius.

Example:

douhgnut.RingRadius = 0.6


DoughnutStyle

Name: DoughnutStyle

Applies To: NDoughnutPresentGroup

Type: DoughnutStyle

Remarks: Specifies the style of the doughnut segments

Example:

douhgnut.DoughnutStyle = 2DDoughnut


GetRingBeginAngle

Name: GetRingBeginAngle

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Single fAngle

Return Value: Single

Remarks: Sets the begginning angle of the specified ring.

Example:

Dim Angle
Angle = douhgnut.GetRingBeginAngle 6, 0.5


GetRingDetachment

Name: GetRingDetachment

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Return Value: Single

Remarks: Gets the detachment of the specified ring.

Example:

Dim detachment
detachment = douhgnut.GetRingDetachment 5


GetRingRadius

Name: GetRingRadius

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Return Value: Single

Remarks: Gets the radius of the specified ring.

Example:

Dim fRadius
fRadius = douhgnut.GetRingRadius 6


SetRingBeginAngle

Name: SetRingBeginAngle

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Single fAngle

Return Value: None

Remarks: Sets the begginning angle of the specified ring.

Example:

douhgnut.SetRingBeginAngle 6, 0.5


SetRingDefaultBeginAngle

Name: SetRingDefaultBeginAngle

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Return Value: None

Remarks: Sets the beginning angle of the specified ring to the default value.

Example:

douhgnut.SetRingDefaultBeginAngle 6


SetRingDefaultDetachment

Name: SetRingDefaultDetachment

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Return Value: None

Remarks: Sets the detachment of the specified ring to the default value.

Example:

douhgnut.SetRingDefaultDetachment 6


SetRingDefaultRadius

Name: SetRingDefaultRadius

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Return Value: None

Remarks: Sets the default radius of the ring.

Example:

douhgnut.SetRingDefaultRadius 6


SetRingDetachment

Name: SetRingDetachment

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Single fAngle

Return Value: None

Remarks: Sets the detachment of the specified ring.

Example:

douhgnut.SetRingDetachment 6, 0.5


SetRingRadius

Name: SetRingRadius

Applies To: NDoughnutPresentGroup

Parameters:

Long nRing

Single fRadius

Return Value: None

Remarks: Sets the radius of the specified ring.

Example:

douhgnut.SetRingRadius 5, 0.6


BarEdgePercent

Name: BarEdgePercent

Applies To: NErrorBarPresentGroup

Type: Long

Remarks: Controls the edge size of the smooth edge bar and cut edge bar (the BarStyle property must be set to bsSmoothEdgeBar or bsCutEdgeBar) in percents of the smaller bar dimension (width or depth).

Example:

errorbar.BarEdgePercent = 35


BarStyle

Name: BarStyle

Applies To: NErrorBarPresentGroup

Type: BarStyle

Remarks: Controls the style of the bars. Valid values are:

  • bsBar
  • bsCylinder
  • bsCone
  • bsInvertedCone
  • bsPyramid
  • bsInvertedPyramid
  • bsSmoothEdgeBar
  • bsCutEdgeBar
    By default it is set to bsBar.

    Example:

    errorbar.BarStyle = bsPyramid 'bars are now displayed as pyramids

            •


Common

Name: Common

Applies To: NErrorBarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = errorbar.Common()


DepthPercent

Name: DepthPercent

Applies To: NErrorBarPresentGroup

Type: Long

Remarks: Controls the depth of error bars in percents of the floor grid cell depth.

Example:

errorbar.DepthPercent = 50 'half the cell depth


ErrorsInPercents

Name: ErrorsInPercents

Applies To: NErrorBarPresentGroup

Type: Boolean

Remarks: If this property is set to True, the error values ( Value2 ) are considered to be percents of the base values ( Value1 ). If the property is set to False, then the error values are absolute.

Example:

errorbar.ErrorsInPercents = True


HasBottomEdge

Name: HasBottomEdge

Applies To: NErrorBarPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a bottom edge. By default False.

Example:

errorbar.HasBottomEdge = True


HasTopEdge

Name: HasTopEdge

Applies To: NErrorBarPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a top edge. By default True.

Example:

errorbar.HasTopEdge = True


LineStyle

Name: LineStyle

Applies To: NErrorBarPresentGroup

Type: LinePresentStyle

Remarks: Defines the style of the error lines. Valid values are:

  • lpsTube
  • lpsTape
  • lpsLine
    The default value is lpsLine.

    Example:

    errorbar.LineStyle = lpsTube 'now the error is composed of tubes

            •


LineWidth

Name: LineWidth

Applies To: NErrorBarPresentGroup

Type: Single

Remarks: Determines the width of the error lines (in OpenGL units). The default value is 0.1

Example:

errorbar.LineWidth = 0.05 'Make the lines thinner


UseXValue

Name: UseXValue

Applies To: NErrorBarPresentGroup

Type: Boolean

Remarks: If this property is set to True then Value3 is used as X coordinate of the error bar. You must manually switch the categories axis in value, datetime or logarithm scale mode.

Example:

errorbar.UseXValue = True
NChart1.Axes(atCategoriesAxis).ScaleMode = asmDateTime


WidthPercent

Name: WidthPercent

Applies To: NErrorBarPresentGroup

Type: Long

Remarks: Controls the width of the error bars in percents of the floor grid cell width.

Example:

errorbar.WidthPercent = 50 'half the cell width


Common

Name: Common

Applies To: NErrorPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = err.Common()


ErrorsInPercents

Name: ErrorsInPercents

Applies To: NErrorPresentGroup

Type: Boolean

Remarks: If this property is set to True, the error values ( Value2 ) are considered to be percents of the base values ( Value1 ). If the property is set to False, then the error values are absolute.

Example:

errorbar.ErrorsInPercents = True


ErrorStyle

Name: ErrorStyle

Applies To: NErrorPresentGroup

Type: ErrorPresentStyle

Remarks: Defines the style of the error shape. Possible values are:

  • epsTop
  • epsBottom
  • epsTopBottom
  • epsLeft
  • epsRight
  • epsLeftRight
    By default the error style is Top-Bottom.

    Example:

    error.ErrorStyle = epsLeftRight

            •


ErrorWidthPercent

Name: ErrorWidthPercent

Applies To: NErrorPresentGroup

Type: None

Remarks: Controls the width of the errors in percents of the floor grid cell width.

Example:

error.ErrorWidthPercent = 50 'half the cell width


LineStyle

Name: LineStyle

Applies To: NErrorPresentGroup

Type: LinePresentStyle

Remarks: Defines the style of the error lines. Valid values are:

  • lpsTube
  • lpsTape
  • lpsLine
    The default value is lpsLine.

    Example:

    error.LineStyle = lpsTube 'now the error is composed of tubes

            •


LineWidth

Name: LineWidth

Applies To: NErrorPresentGroup

Type: Single

Remarks: Determines the width of the error lines (in OpenGL units). The default value is 0.1

Example:

error.LineWidth = 0.05 'Make the lines thinner


AcceptDropInNativeFormat

Name: AcceptDropInNativeFormat

Applies To: NEventManager

Type: Boolean

Remarks: This property instructs to control whether to accept drop sources that contain native control state. For example suppose that you have a VB form with two chart controls and would like to be able to copy the state of the first one to the second one by performing a simple drag and drop operation. To do this you must enable the AcceptDropInNativeFormat property of the second control and modify the Drag and Drop relevant properties of the first control. The following code snippet shows how you can accomplish this.

Example:

NevronControl1.EventManager.LMouseButtonClick = mmBeginDrag ' pressing the left mouse button initiates a drag and drop
NevronControl1.EventManager.DragDataType = dtNative
NevronControl2.EventManager.AcceptDropInNativeFormat = True


DisplayTooltips

Name: DisplayTooltips

Applies To: NEventManager

Type: Boolean

Remarks: This property controls whether tooltips should be displayed by default. The NMouseResponse object has a property called ShowTooltips. When this property is set to stSynchronizeWithControl the value of the DisplayTooltips property controls weather or not tooltips will be displayed by the object. The default value of this property is TRUE. Note that you must also enable the mmTooltip flag in the MouseMove property of the NEventManager in order to display tooltips. The following example enables the tooltips for the NevronControl component.

Example:

NevronControl.EventManager.MouseMove = mmTooltip
NevronControl.EventManager.DisplayTooltips = True ' I want to show tooltips by default


DragDataType

Name: DragDataType

Applies To: NEventManager

Type: DragDataType

Remarks: Possible values for this property are dtBitmap and dtNative. In dtBitmap the control makes a bitmap data source for drag and drop. In dtNative mode the control will drag and drop its own state.

Example:

NevronControl.EventManager.LMouseButtonClick = mmBeginDrag ' pressing the left mouse button initiates a drag and drop
NevronControl.EventManager.DragDataType = dtBitmap ' drop as bitmap.


DragDrawFilled

Name: DragDrawFilled

Applies To: NEventManager

Type: Boolean

Remarks: When you set the MouseDragMode to one of the dragging modes - Zoom, Offset or Trackball you can also instruct the control to draw only the frames of the objects in the scene while the user is dragging the mouse. This may be very useful when you want to achieve better performance when dragging complex scenes. This property is TRUE by default.

Example:

NevronControl.EventManager.DragDrawFilled = False ' draw frames only while dragging


DragDrawTexts

Name: DragDrawTexts

Applies To: NEventManager

Type: Boolean

Remarks: When you set the MouseDragMode to one of the dragging modes - Zoom, Offset or Trackball you can also instruct the control not to draw the texts while the user is dragging the mouse. For example consider a complex scene with hundreds of texts. While it is acceptable for the user to wait 5 seconds until the scene is rendered it can be really very annoying and frustrating to him if he has to wait that much for each rendering that occurs while he rotates the 3d scene. This is where this property may come handy - you can just turn off the DragDrawTexts and improve rendering performance. This property is TRUE by default.

Example:

NevronControl.EventManager.DragDrawTexts = False ' do not drag texts while dragging


EnableKeyboardDragging

Name: EnableKeyboardDragging

Applies To: NEventManager

Type: Boolean

Remarks: When the mouse drag mode of the control is set to mdZoom, mdOffset or mdTrackball you can also use the arrow keys to change the scene offset, zoom, rotation and elevation. The arrow keys have a different meaning depending on the mouse drag mode.

  • mdZoom - press the up arrow key to zoom in and down arrow key to zoom out.
  • mdOffset - offset the scene according to the direction of the arrow key e.g. the up arrow key offsets the scene to the top, the down arrow key to the bottom and so on.
  • mdTrackball - use the left and right arrow keys to rotates the scene to the left and right respectively. The up and down arrow keys change the elevation.
    By default this property is set to True.

    Example:

    NevronControl.EventManager.EnableKeyboardDragging = False ' turn off keyboard dragging

            •


FireDragAndDropEvents

Name: FireDragAndDropEvents

Applies To: NEventManager

Type: Boolean

Remarks: All Nevron controls have build in support for Drag and Drop operations and usually there is no need for an additional programming efford. However there are cases when the programmer want to have a manual control over the process of Drag and Drop. This may happen for example if he or she tries to implement a drag and drop operation with a data source not supported by the control. In such cases you must enable the FireDragAndDropEvents and the control will start to trigger the OnDragOver and OnDrop events to its container.

Example:

NevronControl.EventManager.FireDragAndDropEvents = True 'enable OnDrop and OnDragOver events


FireKeyboardEvent

Name: FireKeyboardEvent

Applies To: NEventManager

Type: Boolean

Remarks: Sometimes you may want to intercept the keyboard messages send to the control when it has the input focus. To do this you must turn on the FireKeyboardEvent and then intercept the KeyboardEvent fired by the control.

Example:

NevronContro.EventManager.FireKeyboardEvent = True ' I want to intercept keyboard events


LMouseButtonClick

Name: LMouseButtonClick

Applies To: NEventManager

Type: MouseActionMode

Remarks: Specifies how the control responds when the user presses the left mouse button. Possible values are mmDisabled, mmSelection, mmEvent, mmTooltip, mmContextMenu, mmBeginDrag and mmChangeMouseCursor.

  • mmDisabled - indicates that the control should not respond in any way
  • mmSelection - the control can highlight the object pointed by the mouse by drawing a special border (selection border) around it. To enable this feature use the mmSelection mode.
  • mmEvent - instructs the control to fire an automation event.
  • mmContextMenu - when the user clicks on the object the control will display a context sensitive menu.
  • mmBeginDrag - indicates that this mouse action will trigger a Drag & Drop operation. For more information read the discussion on Drag and Drop in the Users Guide.

    Example:

    NevronControl.EventManager.LMouseButtonClick = mmContextMenu ' invoke a context menu when user presses the left mouse key

            •


LMouseButtonDoubleClick

Name: LMouseButtonDoubleClick

Applies To: NEventManager

Type: MouseActionMode

Remarks: Specifies how the control responds when the user double clicks the left mouse button. Possible values are mmDisabled, mmSelection, mmEvent and mmContextMenu.

  • mmDisabled - indicates that the control should not respond in any way
  • mmSelection - the control can highlight the object pointed by the mouse by drawing a special border (selection border) around it. To enable this feature use the mmSelection mode.
  • mmEvent - instructs the control to fire an automation event.
  • mmContextMenu - when the user double clicks on the object the control will display a context sensitive menu.

    Example:

    NevronControl.EventManager.LMouseButtonDoubleClick = mmEvent ' trigger an automation event

            •


MouseDragMode

Name: MouseDragMode

Applies To: NEventManager

Type: MouseDragMode

Remarks: Defines the mouse drag mode. Possible values are mdDisabled, mdZoom, mdOffset and mdTrackball

  • mdDisabled - no dragging
  • mdZoom - when the user moves the mouse towards the upper corner of the control window the scene will be control in. If the user moves the mouse towards the bottom edge the control will zoom out.
  • mdOffset - moves the origin of the 3d scene
  • mdTrackball - this mode enables you to control the rotation and elevation of the current 3d view.

    Example:

    NevronControl.EventManager.MouseDragMode = mdTrackball ' use the trackball

            •


MouseMove

Name: MouseMove

Applies To: NEventManager

Type: MouseActionMode

Remarks: Specifies how the control responds when the user moves the mouse over the control window. Possible values are mmDisabled, mmSelection, mmEvent, mmTooltip and mmChangeMouseCursor.

  • mmDisabled - indicates that the control should not respond in any way
  • mmSelection - the control can highlight the object pointed by the mouse by drawing a special border (selection border) around it. To enable this feature use the mmSelection mode.
  • mmEvent - instructs the control to fire an automation event.
  • mmTooltip - instructs the control that it must display tooltips in response to this mouse event.
  • mmChangeMouseCursor - the control will change the mouse cursor according to the MousePointer property of the object currently pointed by the mouse.

    Example:

    NevronControl.EventManager.MouseMove = mmChangeMouseCursor ' change the mouse cursor

            •


RMouseButtonClick

Name: RMouseButtonClick

Applies To: NEventManager

Type: MouseActionMode

Remarks: Specifies how the control responds when the user clicks the right mouse button. Possible values are mmDisabled, mmSelection, mmEvent and mmContextMenu.

  • mmDisabled - indicates that the control should not respond in any way
  • mmSelection - the control can highlight the object pointed by the mouse by drawing a special border (selection border) around it. To enable this feature use the mmSelection mode.
  • mmEvent - instructs the control to fire an automation event.
  • mmContextMenu - when the user clicks on the object the control will display a context sensitive menu.

    Example:

    NevronControl.EventManager.RMouseButtonClick = mmSelection ' show me the current object

            •


RMouseButtonDoubleClick

Name: RMouseButtonDoubleClick

Applies To: NEventManager

Type: MouseActionMode

Remarks: Specifies how the control responds when the user double clicks the right mouse button. Possible values are mmDisabled, mmSelection, mmEvent and mmContextMenu.

  • mmDisabled - indicates that the control should not respond in any way
  • mmSelection - the control can highlight the object pointed by the mouse by drawing a special border (selection border) around it. To enable this feature use the mmSelection mode.
  • mmEvent - instructs the control to fire an automation event.
  • mmContextMenu - when the user double clicks on the object the control will display a context sensitive menu.

    Example:

    NevronControl.EventManager.RMouseButtonDoubleClick = mmSelection ' show me the current object

            •


SelectionBorder

Name: SelectionBorder

Applies To: NEventManager

Parameters: None

Return Value: Object

Remarks: Gives you access to the selection border object that controls the border properties of the selected objects.

Example:

NevronControl.EventManager.SelectionBorder.Color = vbBlue ' change the selection border color to Blue


ShowDialog

Name: ShowDialog

Applies To: NEventManager

Parameters: None

Return Value: None

Remarks: Shows the visual interface of the NEventManager object.

Example:

NevronControl.EventManager.ShowDialog


New Topic

Type topic text here.


AdvancedGradient

Name: AdvancedGradient

Applies To: NFillEffect

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAdvancedGradient object controlling the advanced gradient associated with this fill effect.

Example:

FillEffect.SetPredefinedAdvancedGradient gsMahagony2, 11 ' load a predefined advanced gradient
FillEffect.AdvancedGradient.BackgroundColor = vbRed 'change the background color of the advanced gradient to red


AdvancedGradientGallery

Name: AdvancedGradientGallery

Applies To: NFillEffect

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAdvancedGradientCollection object controlling the advanced gradients created by the user and stored in the registry. The following example adds the current advanced gradient applied on the control background to the collection:

Example:

Dim FillEffect As NFillEffect
Dim AdvGradient As NAdvancedGradient
Dim AdvGradientTemp As NAdvancedGradient
Set FillEffect = NevronControl.Background.FillEffect
Set AdvGradient = FillEffect.AdvancedGradientGallery.Add
Set AdvGradientTemp = FillEffect.AdvancedGradient
AdvGradient.InitFromAdvancedGradient AdvGradientTemp


AdvancedGradientPercent

Name: AdvancedGradientPercent

Applies To: NFillEffect

Type: Integer

Remarks: Retrieves the weight coefficient of the advanced gradient RGB layer if the fill effect is in merge mode. This property is read only. To modify it you must use the SetMergePercents function.


AnimationFileName

Name: AnimationFileName

Applies To: NFillEffect

Type: String

Remarks: Specifies the location of the AVI file that will be used for the animated texture. This property is empty by default.

Example:

FillEffect.Type = fetAnimation
FillEffect.AnimationFileName = "c:\Windows\Clock.avi"


AnimationGallery

Name: AnimationGallery

Applies To: NFillEffect

Parameters: None

Return Value: Object

Remarks: Gives you access to the NGalleryCollection object controlling the animation gallery.


AnimationPercent

Name: AnimationPercent

Applies To: NFillEffect

Type: Integer

Remarks: Retrieves the weight coefficient of the animation RGB layer if the fill effect is in merge mode. This property is read only. To modify it you must use the SetMergePercents function.


AnimationSpeed

Name: AnimationSpeed

Applies To: NFillEffect

Type: Long

Remarks: Controls the speed in milliseconds used to render the animated texture. The default value is 50 (which is the fastest speed supported by the component). Note that the actual speed of the rendering may be slower than the one you specified, because the control simply can not produce the new frame faster.

Example:

FillEffect.Type = fetAnimation
FillEffect.AnimationFileName = "c:\Windows\Clock.avi"
FillEffect.AnimationSpeed = 100 ' render two times slower than usual


AntialiasingType

Name: AntialiasingType

Applies To: NFillEffect

Type: AntialiasingType

Remarks: Instructs the fill effect how to synchronize with the general antialiasing settings of the control. Possible values are - atSynchronizeWithControl, atUseAntialiasing and atDoNotUseAntialiasing.

  • atSynchronizeWithControl - the antialiasing applied on the fill effect is synchronized with the general control settings.
  • atUseAntialiasing - the fill effect will always use antialiasing regardless of the general control settings
  • atDoNotUseAntialiasing - the fill effect will always render without antialiasing regardless of the general control settings

    Example:

    FillEffect.AntialiasingType = atDoNotUseAntialiasing ' I do not want to use antialiasing for this fill effect

            •


BlackTextureBackground

Name: BlackTextureBackground

Applies To: NFillEffect

Type: Boolean

Remarks: Sometimes when you use a layout that does not fill the object entirely and some areas of the object are not filled. These areas by default are filled with black, but you can specify a different color by using the color properties (EnableWindowsColor, WindowsColor and Color). To enable this feature you must turn off the BlackTextureBackground property. The default value is TRUE.

Example:

The following example fills the unfilled areas of the bubble texture with red.
FillEffect.Type = fetImage
FillEffect.ImageFileName = "c:\Windows\Bubbles.bmp"
FillEffect.Rotation = 45
FillEffect.BlackTextureBackground = FALSE
FillEffect.EnableWindowsColor = FALSE
FillEffect.Color = vbRed


Color

Name: Color

Applies To: NFillEffect

Type: OLE_COLOR

Remarks: The RGB color of the NFillEffect.

Example:

FillEffect.SetType = fetSolidColor
FillEffect.Color = RGB(255, 255, 255) 'set the color to white


EnableWindowsColor

Name: EnableWindowsColor

Applies To: NFillEffect

Type: Boolean

Remarks: Enables the synchronization of the fill effect with the Windows appearance settings.

Example:

FillEffect.SetType = fetSolidColor
FillEffect.EnableWindowsColor = TRUE 'enable synchronization
FillEffect.WindowColor = wcBtnFace 'synchronize with the button face color


GradientColor1

Name: GradientColor1

Applies To: NFillEffect

Type: OLE_COLOR

Remarks: The starting color of the gradient. The default value is white.

Example:

FillEffect.GradientStyle = gsHorizontal
FillEffect.GradientVariant = gvVariant1 'apply top to bottom gradient
FillEffect.GradientColor1 = vbWhite
FillEffect.GradientColor2 = vbBlack


GradientColor2

Name: GradientColor2

Applies To: NFillEffect

Type: OLE_COLOR

Remarks: The ending color of the gradient. The default value is black.

Example:

FillEffect.GradientStyle = gsHorizontal
FillEffect.GradientVariant = gvVariant1 'apply top to bottom gradient
FillEffect.GradientColor1 = vbWhite
FillEffect.GradientColor2 = vbBlack


GradientPercent

Name: GradientPercent

Applies To: NFillEffect

Type: Integer

Remarks: Retrieves the weight coefficient of the gradient RGB layer if the fill effect is in merge mode. This property is read only. To modify it you must use the SetMergePercents function.


GradientStyle

Name: GradientStyle

Applies To: NFillEffect

Type: FEGradientStyle

Remarks: Controls the gradient style of the NFilLEffect. The possible values are gsHorizontal, gsVertical, gsDiagonalUp, gsDiagonalDown, gsFromCorner and gsFromCenter. The default value is gsHorizontal.

Example:

The following example applies a horizontal gradient.
FillEffect.GradientStyle = gsHorizontal
FillEffect.GradientVariant = gvVariant1
FillEffect.GradientColor1 = vbWhite
FillEffect.GradientColor2 = vbBlack


GradientVariant

Name: GradientVariant

Applies To: NFillEffect

Type: FEGradientVariant

Remarks: The gradient variant of the NFillEffect. Each gradient style has different sub variants. For example the horizontal gradient style has four variants that indicate how the GradientColor1 will transfer to GradientColor2. The possible vaalues are gvVariant1, gvVariant2, gvVariant3, gvVariant4, The default value for this property is gvVariant1.

Example:

FillEffect.GradientStyle = gsHorizontal
FillEffect.GradientVariant = gvVariant1 'apply top to bottom gradient
FillEffect.GradientColor1 = vbWhite
FillEffect.GradientColor2 = vbBlack


GrayScaleType

Name: GrayScaleType

Applies To: NFillEffect

Type: GrayScaleType

Remarks: Instructs the fill effect how to synchronize with the general grayscale settings of the control. Possible values are - gsSynchronizeWithControl, gsGrayScale and gsColor.

  • gsSynchronizeWithControl - the grayscale applied on the fill effect is synchronized with the general control settings.
  • gsGrayScale - the fill effect will always render as grayscale regardless of the general control settings
  • gsColor - the fill effect will always render in color regardless of the general control settings

    Example:

    FillEffect.GrayScaleType = gsGrayScale 'render as grayscale always

            •


ImageFileName

Name: ImageFileName

Applies To: NFillEffect

Type: String

Remarks: The image file that will be used as a texture. The image file must have a format that is supported by Nevron. Currently the supported file formats for reading are: Bitmap (.bmp), JPEG (.jpg), TIFF (.tif), Targa (.tga), Windows metafile (.wmf), GIF (.gif) or PNG (.png). Note that the component determines the image format by the extension of the file. This property is empty by default.

Example:

FillEffect.Type = fetImage
FillEffect.ImageFileName = "c:\Windows\Bubbles.bmp"


ImageGallery

Name: ImageGallery

Applies To: NFillEffect

Parameters: None

Return Value: Object

Remarks: Gives you access to the NGalleryCollection object controlling the image gallery.


InitFromFillEffect

Name: InitFromFillEffect

Applies To: NFillEffect

Parameters:

Object pFEDisp

Return Value: None

Remarks: This method initializes the object from another fill effect object.

Example:

FillEffect.InitFromFillEffect pFillEffectDisp


Layout

Name: Layout

Applies To: NFillEffect

Type: FELayout

Remarks: Controls the layout when the fill effect is a gradient, texture (image), animation, pattern or advanced gradient and the mapping is relative to the object (object linear). Possible values for this property are lStretched, lFitted, lCentered, lTiled, lStretchedToWidth, lStretchedToHeight and lCropFitted. To use this property you must first disable the default mapping by setting the UseDefaultMapping property to False.

Example:

FillEffect.UseDefaultMapping = False
FillEffect.Layout = lTiled


MapType

Name: MapType

Applies To: NFillEffect

Type: FEMapType

Remarks: Controls the mapping type when the fill effect is a gradient, texture (image), animation, pattern or advanced gradient. The default value is object linear (mapping is relative to the object). To use this property you must first disable the default mapping by setting the UseDefaultMapping property to False.

Example:

FillEffect.UseDefaultMapping = False
FillEffect.MapType = mtEyeLinear ' change the mapping to eye linear (relative to the viewer)


MergeFillEffects

Name: MergeFillEffects

Applies To: NFillEffect

Type: Boolean

Remarks: Enables or disables merging between fill effects. The NFillEffect can be instructed to produce a fill effect based on a mixture between a solid color, gradient, texture, animation, pattern and advanced gradient. Each of the fill effect types is represented by a RGB layer and then these layers are added together by using weight coefficients.

Example:

FillEffect.MergeFillEffects = TRUE ' merge a gradient and a pattern
FillEffect.SetMergePercents 0, 50, 0, 0, 50, 0;


PatternBackgroundColor

Name: PatternBackgroundColor

Applies To: NFillEffect

Type: OLE_COLOR

Remarks: The RGB value of the pattern background color. The default value is black.

Example:

FillEffect.PatternType = ptDashedHorizontal
FillEffect.PatternBackgroundColor = vbBlack
FillEffect.PatternForegroundColor = vbWhite


PatternForegroundColor

Name: PatternForegroundColor

Applies To: NFillEffect

Type: OLE_COLOR

Remarks: The RGB value of the pattern foreground color. The default value is white.

Example:

FillEffect.PatternType = ptDashedHorizontal
FillEffect.PatternBackgroundColor = vbBlack
FillEffect.PatternForegroundColor = vbWhite


PatternPercent

Name: PatternPercent

Applies To: NFillEffect

Type: Integer

Remarks: Retrieves the weight coefficient of the pattern RGB layer if the fill effect is in merge mode. This property is read only. To modify it you must use the SetMergePercents function.


PatternType

Name: PatternType

Applies To: NFillEffect

Type: FEPatternType

Remarks: The pattern type of the fill effect.

Example:

FillEffect.PatternType = ptDashedHorizontal
FillEffect.PatternBackgroundColor = vbBlack
FillEffect.PatternForegroundColor = vbWhite


Rotation

Name: Rotation

Applies To: NFillEffect

Type: Single

Remarks: Use this property if you want to rotate the gradient, texture, animation, pattern or advanced gradient around the center of the 3D object. Note that the effect of this property can be different depending on the Layout and MapType properties. The rotation is specified in degrees. The default value is 0 resulting in no rotation. To use this property you must first disable the default mapping by setting the UseDefaultMapping property to False.

Example:

FillEffect.UseDefaultMapping = False
FillEffect.Rotation = 45 'rotate at 45 degrees


SetAnimation

Name: SetAnimation

Applies To: NFillEffect

Parameters:

String FileName

Long Speed

Return Value: None

Remarks: Use this function if you want to apply an animated texture on the object attached to this fill effect. The FileName specifies the animation location and the Speed parameter specifies the rendering speed in miliseconds. Note that this function will also reset the MapType, Layout, XScale and YScale properties to their defaults.

Example:

FillEffect.SetAnimation "c:\windows\clock.avi", 100


SetAnimationByAlias

Name: SetAnimationByAlias

Applies To: NFillEffect

Parameters:

String Alias

Long Speed

Return Value: None

Remarks: Searches the NGalleryCollection object controlling the animation gallery by using the supplied alias. If a match is found the corresponding animation file is loaded.

Example:

NFillEffect.AnimationGallery.Add "d:\winnt\clock.avi", "BackgroundAnimation"
NFillEffect.SetAnimationByAlias "BackgroundAnimation", 50


SetGradient

Name: SetGradient

Applies To: NFillEffect

Parameters:

FEGradientStyle nGradientStyle

FEGradientVariant nGradientVariant

OLE_COLOR Color1

OLE_COLOR Color2

Return Value: None

Remarks: Use this function if you want to apply a gradient fill effect. Note that this function will also reset the MapType, Layout, XScale and YScale properties to their defaults.

Example:

FillEffect.SetGradient gsFromCenter, gvVariant1, vbBlack, vbWhite


SetImage

Name: SetImage

Applies To: NFillEffect

Parameters:

String FileName

Return Value: None

Remarks: Use this function if you want to apply an image on the object attached to this fill effect. The FileName parameter specifies the image location. For more information see the ImageFileName property. Note that this function will also reset the MapType, Layout, XScale and YScale properties to their defaults.

Example:

FillEffect.SetImage "c:\windows\bubbles.bmp"


SetImageByAlias

Name: SetImageByAlias

Applies To: NFillEffect

Parameters:

String Alias

Return Value: None

Remarks: Searches the NGalleryCollection object controlling the image gallery by using the supplied alias. If a match is found the corresponding image file is loaded as a texture.

Example:

NFillEffect.ImageGallery.Add "d:\winnt\zapotec.bmp", "BackgroundImage"
NFillEffect.SetImageByAlias "BackgroundImage" 'set the "zapotec,bmp"


SetMergePercents

Name: SetMergePercents

Applies To: NFillEffect

Parameters:

Integer nSolidColorPercent

Integer nGradientPercent

Integer nTexturePercent

Integer nAnimationPercent

Integer nPatternPercent

Integer nAdvancedGradientPercent

Return Value: Boolean

Remarks: Use this methods to set the weight coefficients used when the fill effect is merging the different fill effect layers. The methods will fail if the sum if the arguments is not 100.

Example:

FillEffect.MergeFillEffects = TRUE
FillEffect.SetMergePercents 0, 50, 0, 0, 50, 0 ' merge gradient and pattern


SetPattern

Name: SetPattern

Applies To: NFillEffect

Parameters:

FEPatternType PatternType

OLE_COLOR ForeColor

OLE_COLOR BackColor

Return Value: None

Remarks: Use this function if you want to apply a pattern on the object attached to this fill effect. Note that this function will also reset the MapType, Layout, XScale and YScale properties to their defaults.

Example:

FillEffect.SetPattern ptDarkHorizontal, vbWhite, vbBlack


SetPredefinedAdvancedGradient

Name: SetPredefinedAdvancedGradient

Applies To: NFillEffect

Parameters:

PAGradientScheme nGradientScheme

Integer nVariant

Return Value: None

Remarks: Loads a predefined gradient in the fill effects. Possible values for the nGradientScheme parameter are gsCustom, gsWhiteOnBlack, gsWhiteOnRed, gsWhiteOnGreen, gsWhiteOnBlue, gsRed, gsGreen, gsBlue, gsSunset, gsNightFall1, gsNightFall2, gsOcean1, gsOcean2, gsOcean3, gsOcean4, gsCalmWater1, gsCalmWater2, gsDesert1, gsDesert2, gsFire1, gsFire2, gsFog1, gsFog2, gsMahagony1 and gsMahagony2. Each of the predefined advanced gradients has 15 variants (except the gsCustom scheme). You select a variant with the help of the nVariant parameter.

Example:

FillEffect.SetPredefinedAdvancedGradient gsMahagony2, 11 ' load 11th variant of gsMahagony2


SetSolidColor

Name: SetSolidColor

Applies To: NFillEffect

Parameters:

OLE_COLOR Color

Return Value: None

Remarks: Use this function if you want to apply a solid colid.

Example:

FillEffect.SetSolidColor RGB(125, 125, 125)
is equivalent to:
FillEffect.Type = fetSolidColor
FillEffect.Color = RGB(125, 125, 125)


SetWindowsColor

Name: SetWindowsColor

Applies To: NFillEffect

Parameters:

WinColor nWindowsColor

Return Value: None

Remarks: Use this function if you want to synchronize the fill effect with some of the windows colors.

Example:

FillEffect.SetWindowsColor btnFace
is equivalent to:
FillEffect.Type = fetSolidColor
FillEffect.EnableWindowsColor = TRUE
FillEffect.WindowsColor = wcbtnFace


ShowDialog

Name: ShowDialog

Applies To: NFillEffect

Parameters: None

Return Value: Long

Remarks: Shows the fill effect properties dialog at runtime. The returned value indicates whether the user pressed the Ok button.

Example:

FillEffect.ShowDialog


SolidColorPercent

Name: SolidColorPercent

Applies To: NFillEffect

Type: Integer

Remarks: Retrieves the weight coefficient of the color RGB layer if the fill effect is in merge mode. This property is read only. To modify it you must use the SetMergePercents function.


TexturePercent

Name: TexturePercent

Applies To: NFillEffect

Type: Integer

Remarks: Retrieves the weight coefficient of the texture RGB layer if the fill effect is in merge mode. This property is read only. To modify it you must use the SetMergePercents function.


Transparency

Name: Transparency

Applies To: NFillEffect

Type: Long

Remarks: Controls the transparency of the fill effect in percents. A value of 0 means complete opacity whereas a value of 100 means complete transparency. You must have in mind that enabling transparency will impact the rendering speed. Also note that the Transparency property does not have any effects for the NFillEffect object applied on the background. For more information see the NBackground description.

Example:

FillEffect.Transparency = 50 'make the object 50% transparent


Type

Name: Type

Applies To: NFillEffect

Type: FEType

Remarks: This property controls the type of the fill effect. The possible values are fetSolidColor, fetGradient, fetImage, fetAnimation or fetPattern.

Example:

FillEffect.Type = fetGradient 'the fill effect is gradient


UseDefaultMapping

Name: UseDefaultMapping

Applies To: NFillEffect

Type: Boolean

Remarks: By default the fill effect assings predefined mapping, layout, x and y scale depending on the type of the fill effect. If you want to alter these settings use must turn off default mapping by setting the UseDefaultMapping property to False.

Example:

FillEffect.UseDefaultMapping = False
FillEffect.Layout = lTiled ' by default gradient layout is lStretched
FillEffect.SetGradient gsDiagonalUp, gvVariant1, vbWhite, vbBlack


WindowsColor

Name: WindowsColor

Applies To: NFillEffect

Type: WinColor

Remarks: Use this property to synchronize with the Windows appearance settings. The possible values are:

  • wc3dDkShadow
  • wc3dFace
  • wcBtnFace
  • wc3dHiLight
  • wc3dHighLight
  • wcBtnHiLight
  • wcBtnHighLight
  • wc3dLight
  • wc3dShadow
  • wcBtnShadow
  • wcActiveBorder
  • wcActiveCaption
  • wcAppWorkspace
  • wcBackground
  • wcDesktop
  • wcBtnText
  • wcCaptionText
  • wcGrayText
  • wcHighLight
  • wcHighLightText
  • wcInactiveBorder
  • wcInacitveCaption
  • wcInacitveCaptionText
  • wcInfoBk
  • wcInfoText
  • wcMenu
  • wcMenuText
  • wcScrollBar
  • wcWindow
  • wcWindowFrame
  • wcWindowText

    Example:

    FillEffect.SetType = fetSolidColor
    FillEffect.EnableWindowsColor = TRUE 'enable synchronization
    FillEffect.WindowColor = wcBtnFace 'synchronize with the button face color

            •


XScale

Name: XScale

Applies To: NFillEffect

Type: Single

Remarks: Use this property if you want to scale the gradient, texture, animation, pattern or advanced gradient along the X axis. Note that the effect of this property can be different depending on the Layout and MapType properties. The default value is 1 (no additional scaling). To use this property you must first disable the default mapping by setting the UseDefaultMapping property to False.

Example:

FillEffect.UseDefaultMapping = False
FillEffect.XScale = 2 'scale twice along the X axis


YScale

Name: YScale

Applies To: NFillEffect

Type: Single

Remarks: Use this property if you want to scale the gradient, texture (image), animation, pattern or advanced gradient along the Y axis. Note that the effect of this property can be different depending on the Layout and MapType properties. The default value is 1 (no additional scaling). To use this property you must first disable the default mapping by setting the UseDefaultMapping property to False.

Example:

FillEffect.UseDefaultMapping = False
FillEffect.YScale = 2 'scale twice along the X axis


BarEdgePercent

Name: BarEdgePercent

Applies To: NFloatBarPresentGroup

Type: Long

Remarks: Controls the edge size of the smooth edge bar in percents of the smaller bar dimension (width or depth).

Example:

floatbar.BarEdgePercent = 35


BarStyle

Name: BarStyle

Applies To: NFloatBarPresentGroup

Type: BarStyle

Remarks: Controls the style of the bars. Valid values are:

  • bsBar
  • bsCylinder
  • bsCone
  • bsInvertedCone
  • bsPyramid
  • bsInvertedPyramid
  • bsSmoothEdgeBar

    Example:

    floatbar.BarStyle = bsCone 'bars are now displayed as cones

            •


Common

Name: Common

Applies To: NFloatBarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = bar.Common()


DepthPercent

Name: DepthPercent

Applies To: NFloatBarPresentGroup

Type: Long

Remarks: Controls the depth of bars in percents of the floor grid cell depth.

Example:

floatbar.DepthPercent = 50 'half the cell depth


HasBottomEdge

Name: HasBottomEdge

Applies To: NFloatBarPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a bottom edge. By default False.

Example:

bar.HasBottomEdge = True


HasTopEdge

Name: HasTopEdge

Applies To: NFloatBarPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars have a top edge. By default True.

Example:

bar.HasTopEdge = True


WidthPercent

Name: WidthPercent

Applies To: NFloatBarPresentGroup

Type: Long

Remarks: Controls the width of bars in percents of the floor grid cell width.

Example:

floatbar.WidthPercent = 50 'half the cell width


BevelDistance

Name: BevelDistance

Applies To: NFrameProperties

Type: Long

Remarks: Controls the distance between the inner and the outer bevel. This property accepts values in the range [0, 10]. The default value is 0.

Example:

FrameProperties.BevelDistance = 2 ' increase the bevel distance


BevelWidth

Name: BevelWidth

Applies To: NFrameProperties

Type: Long

Remarks: Controls the width of the inner and the outer bevels. This property accepts values in the range [0, 10]. The default value is 1.

Example:

FrameProperties.BevelWidth = 2 ' increase the bevel width


Color

Name: Color

Applies To: NFrameProperties

Type: OLE_COLOR

Remarks: Controls the color of the border. The default value is black.

Example:

FrameProperties.HasBorder = TRUE ' enable border properties
FrameProperties.Color = RGB(255, 0, 0) 'red line color
FrameProperties.LineWidth = 3 'increase the width a little bit


GrayScaleType

Name: GrayScaleType

Applies To: NFrameProperties

Type: GrayScaleType

Remarks: Instructs the NFrameProperties object how to synchronize with the general grayscale settings of the control. Possible values are - gsSynchronizeWithControl, gsGrayScale and gsColor.

  • gsSynchronizeWithControl - the grayscale applied on the NFrameProperties is synchronized with the general control settings.
  • gsGrayScale - the NFrameProperties will always render as grayscale regardless of the general control settings
  • gsColor - the NFrameProperties will always render in color regardless of the general control settings

    Example:

    FrameProperties.GrayScaleType = gsGrayScale 'render as grayscale always

            •


HasBorder

Name: HasBorder

Applies To: NFrameProperties

Type: Boolean

Remarks: Enables or disables the border. When set to FALSE the Color, LineStyle and LineWidth properties are discarded.

Example:

FrameProperties.HasBorder = TRUE ' enable border properties
FrameProperties.Color = RGB(255, 0, 0) 'red line color
FrameProperties.LineWidth = 3 'increase the width a little bit


InitFromFrameProperties

Name: InitFromFrameProperties

Applies To: NFrameProperties

Parameters:

Object pFrameDisp

Return Value: None

Remarks: This method initializes the object from another NFrameProperties object.

Example:

Frame.InitFromFrameProperties pFrame


InnerStyle

Name: InnerStyle

Applies To: NFrameProperties

Type: FrameStyle

Remarks: Controls the inner style of the frame. Can be fsNone, fsRaised or fsSunken.

Example:

FrameProperties.OuterStyle = fsNone


LineFactor

Name: LineFactor

Applies To: NFrameProperties

Type: Integer

Remarks: When the LineStyle property is lsCustom the Factor and the Pattern properties define the line. These two properties together define whether a certain pixel from the line should be drawn or not. The following formula defines this relationship: DrawPixel = ((2 ^ (DistanceFromLineStart / Factor)) % 16) & Pattern

Example:

FrameProperties.LineFactor = 4 ' increase the line factor


LinePattern

Name: LinePattern

Applies To: NFrameProperties

Type: Integer

Remarks: When the LineStyle property is lsCustom the Factor and the Pattern properties define the line. These two properties together define whether a certain pixel from the line should be drawn or not. The following formula defines this relationship: DrawPixel = ((2 ^ (DistanceFromLineStart / Factor)) % 16) & Pattern

Example:

FrameProperties.Pattern = 0x22


LineStyle

Name: LineStyle

Applies To: NFrameProperties

Type: LineStyle

Remarks: Controls the line style of the border. Can be lsSolid, lsDash, lsDot, lsDashDot, lsDashDotDot. The default value is lsSolid.

Example:

FrameProperties.HasBorder = TRUE ' enable border properties
FrameProperties.Color = RGB(255, 0, 0) 'red line color
FrameProperties.LineStyle = lsDash 'change the line style to dash
            FrameProperties.LineWidth = 3 'increase the width a little bit


LineWidth

Name: LineWidth

Applies To: NFrameProperties

Type: Long

Remarks: Controls the line width of the border. This property accepts values in the range [0, 10]. The default value is 1.

Example:

FrameProperties.HasBorder = TRUE ' enable border properties
FrameProperties.Color = RGB(255, 0, 0) 'red line color
FrameProperties.LineStyle = lsDash 'change the line style to dash
            FrameProperties.LineWidth = 3 'increase the width a little bit


OuterStyle

Name: OuterStyle

Applies To: NFrameProperties

Type: FrameStyle

Remarks: Controls the outer style of the frame. Can be fsNone, fsRaised or fsSunken.

Example:

FrameProperties.OuterStyle = fsNone


ShowDialog

Name: ShowDialog

Applies To: NFrameProperties

Parameters: None

Return Value: Long

Remarks: Shows the NFrameProperties dialog at runtime. The return value indicates whether the user clicked the Ok button.

Example:

NFrameProperties.ShowDialog


AppearanceRange

Name: AppearanceRange

Applies To: NFunctionPresentGroup

Type: String

Remarks: The AppearanceRange property specifies one of the ranges from the argument collection (by name). The chosen range is used as a source for the line segment appearances (when uniform appearances are turned off) and for the data point labels.

Example:

func.AppearanceRange = "Arg2" 'select the range called "Arg2" as an appearance range


Arguments

Name: Arguments

Applies To: NFunctionPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives access to the NArgumentCollection object of the function presentation group.

Example:

Dim arguments As NArgumentCollection
Set arguments = func.Arguments()


Common

Name: Common

Applies To: NFunctionPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = func.Common()


Expression

Name: Expression

Applies To: NFunctionPresentGroup

Type: String

Remarks: The Expression property defines the function expression or in other words the formula of the function. The expression can be constructed to represent various functions but it must abide by several grammar rules. For more information on the expression grammar see the Function Charts topic.

Example:

func.Expression = "ADD(s1, 4.72)"


HasValuePoints

Name: HasValuePoints

Applies To: NFunctionPresentGroup

Type: Boolean

Remarks: Controls the visibility of the value points.

Example:

func.HasValuePoints = True 'show the value points


LineStyle

Name: LineStyle

Applies To: NFunctionPresentGroup

Type: LinePresentStyle

Remarks: Controls the style of the lines. Valid values are

  • lpsTube - the line segments are displayed as cylinders
  • lpsTape - the line segments are displayed as rectangles
  • lpsLine - the line segments are displayed as simple lines

    Example:

    func.LineStyle = lpsTube 'the line is displayed as tube

            •


LineWidth

Name: LineWidth

Applies To: NFunctionPresentGroup

Type: Single

Remarks: Controls the width of the line in OpenGL units when LineStyle is lpsTube or lpsTape.

Example:

func.LineWidth = 0.10 'the line width is 0.10 OpenGL units


LoadFunction

Name: LoadFunction

Applies To: NFunctionPresentGroup

Parameters:

PredefinedFunction Type

Return Value: None

Remarks: Setups the function present group to display one of the predefined functions. Valid values are:

  • pfAdd
  • pfSub
  • pfMul
  • pfDiv
  • pfPow
  • pfCount
  • pfAverage
  • pfSum
  • pfMin
  • pfMax
  • pfCumSum
  • pfStdDev
  • pfExpAvg
  • pfSMA
  • pfWMA
  • pfEMA
  • pfMomentum
  • pfMomentumDiv
  • pfStochastic
  • pfRSI
  • pfBollingerUpper
  • pfBollingerLower
  • pfRMS
  • pfMACD

            •


PointSize

Name: PointSize

Applies To: NFunctionPresentGroup

Type: Single

Remarks: Controls the size of the value points in OpenGL units.

Example:

func.PointSize = 0.20


PointStyle

Name: PointStyle

Applies To: NFunctionPresentGroup

Type: PointStyle

Remarks: Controls the style of the value points. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond
  • psCross
  • psDiagonalCross
  • psStar

    Example:

    func.PointStyle = psCone 'change the point style to cone

            •


UseXValue

Name: UseXValue

Applies To: NFunctionPresentGroup

Type: Boolean

Remarks: If this property is set to True you will be able to assign a custom x-value to each point of the function line. The x-values are taken from one of the ranges in the argument collection. The XPositionRange property determines which is that x-source range. The XValueType property defines which value type of that range is treated as x-value.

Example:

func.UseXValue = True 'enable x-positioning


XPositionRange

Name: XPositionRange

Applies To: NFunctionPresentGroup

Type: String

Remarks: The XPositionRange property specifies one of the ranges from the argument collection (by name). The chosen range will determine the x-position of the function line. When UseXValue is set to False the line position is synchronized with the BeginX and EndX of the range. When UseXValue is set to True then the custom x-values are taken from the x-position range. The XValueType property defines which value type of that range is treated as x-value. X-position range must be specified when the function result is an array. The size of the range must be greater or equal to the size of the function result.

Example:

func.XPositionRange = "Arg1" 'select the range called "Arg1" as a x-position range


XValueType

Name: XValueType

Applies To: NFunctionPresentGroup

Type: DataValueType

Remarks: The XValueType property defines which value type of the x-position range is treated as x-value.

Example:

func.XValueType = dvtValue6 ' Value 6 is the x-value


YAlignmentMode

Name: YAlignmentMode

Applies To: NFunctionPresentGroup

Type: AlignmentMode

Remarks: Defines the alignment of the function line towards the Y position value. Valid values are:

  • amBack
  • amCenter
  • amFront

    Example:

    func.YAlignmentMode = amBack

            •


YPositionValue

Name: YPositionValue

Applies To: NFunctionPresentGroup

Type: Double

Remarks: Defines the position of the function line on the series axis.

Example:

func.YPositionValue = 0.5


Add

Name: Add

Applies To: NGalleryCollection

Parameters:

String strFileName

String strAlias

Return Value: Boolean

Remarks: Adds a new association to the gallery. The function will return False if the file specified does not exist or if there is already an association with this alias.

Example:

NFillEffect.ImageGallery.Add "d:\winnt\zapotec.bmp", "BackgroundImage"


Clear

Name: Clear

Applies To: NGalleryCollection

Parameters: None

Return Value: None

Remarks: Removes all associations from the collection.

Example:

NFillEffect.ImageGallery.Clear 'remove all associations


DeleteByAlias

Name: DeleteByAlias

Applies To: NGalleryCollection

Parameters:

String strAlias

Return Value: Boolean

Remarks: Delete the association from the collection that has an alias matchings the strAlias parameter. If the function fails to find such an association the function will return FALSE.

Example:

NFillEffect.ImageGallery.DeleteByAlias "d:\winnt\zapotec.bmp", "BackgroundImage"


DeleteByFile

Name: DeleteByFile

Applies To: NGalleryCollection

Parameters:

String strFileName

Return Value: Boolean

Remarks: Delete the first association from the collection that has a file matchings the strFileName parameter. If the function fails to find such an association the function will return FALSE.

Example:

NFillEffect.ImageGallery.DeleteByFile "d:\winnt\zapotec.bmp", "BackgroundImage"


GetAt

Name: GetAt

Applies To: NGalleryCollection

Parameters:

None nIndex

ByRef String pstrFileName

ByRef String pstrAlias

Return Value: None

Remarks: Retrieves the association positioned at nIndex position in the gallery collection. The pstrFileName and pstrAlias will receive the association file name and alias respectively. The function will generate an automation exception if you pass an invalid index.


GetSize

Name: GetSize

Applies To: NGalleryCollection

Parameters: None

Return Value: None

Remarks: Returns the number of associations in the collection.

Example:

NFillEffect.ImageGallery.Clear 'remove all associations
MsgBox CStr(NFillEffect.ImageGallery.GetSize) 'this must display zero


Common

Name: Common

Applies To: NHighLowPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = highlow.Common()


DepthPercent

Name: DepthPercent

Applies To: NHighLowPresentGroup

Type: Long

Remarks: Controls the depth of high low area in percents of the floor grid cell depth.

Example:

highlow.DepthPercent = 50 'half the cell depth


DropLineProps

Name: DropLineProps

Applies To: NHighLowPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLineProperties object applied on the drop lines.

Example:

highlow.DropLineProps.Color = vbBlue ' make the drop lines blue


DropLines

Name: DropLines

Applies To: NHighLowPresentGroup

Type: Boolean

Remarks: Controls the visibility of the high low area segments.

Example:

highlow.DropLines = True


UseXValue

Name: UseXValue

Applies To: NHighLowPresentGroup

Type: Boolean

Remarks: Specifies whether Value3 should be used as X position of the data points.

Example:

highlow.UseXValue = True


GenerateCode

Name: GenerateCode

Applies To: NImportExport

Parameters:

CodeMediaType media

Return Value: String

Remarks: Generates the code necessary to produce the chart in the specified media.

Example:

strCode = NevronControl.ImportExport.GenerateCode(cmdVisualBasic)


GetAdvancedExport

Name: GetAdvancedExport

Applies To: NImportExport

Parameters: None

Return Value: Object

Remarks: Gets the advanced export object of the component.

Example:

Dim AdvExport As NAdvancedExport Set AdvExport = NevronControl.ImportExport.GetAdvancedExport()


Load

Name: Load

Applies To: NImportExport

Parameters:

ByRef Variant vFile

Return Value: Boolean

Remarks: Loads the control state from a file, memory handle, storage or the clipboard.

  • If the variant type is String (VT_BSTR in C++) the vFile contains the name of a file. If the variant type is String, but the string parameter is empty then the control will export the state to the clipboard in custom Nevron clipboard format.
  • In the case when the variant type is Long (VT_I4) the long parameter specifies a memory handle.
  • If the variant type is Object (VT_UNKNOWN) the pUnk parameter is a pointer to an IStream interface where the control will save its state

    Example:

    Dim vFile As Variant
    vFile = ""
    NevronControl.ImportExport.Load vFile 'load the state fromt the clipboard (paste)

            •


LoadControlDimensions

Name: LoadControlDimensions

Applies To: NImportExport

Type: Boolean

Remarks: When the control loads its state from a native state file (.nsv) by default it also resizes the control in the container with the size written in the file. There are cases when this behaviour is undesirable. If you want to preserve the control dimensions you must set the LoadControlDimensions to FALSE. The following code instructs the control not to load the control dimensions from the .nsv file.

Example:

NevronControl.ImportExport.LoadControlDimensions = FALSE
NevronControl.ImportExport.Load "c:\temp\test.nsv"


LoadFromURL

Name: LoadFromURL

Applies To: NImportExport

Parameters:

String bstrURL

Boolean bShowDownloadProgress

Return Value: Boolean

Remarks: Load the control state from an URL location. This feature can be very useful if you have a server control that generates Nevron save files (.nsv) on some server and a client control that uses these save files to load and display these files. The bShowDownloadProgress parameter specifies whether or not the control should display the download progress. Note that the control will fire the OnDownloadDataAvailable, OnDownloadDataProgress and OnDownloadDataFailed events depending on the outcome of the donwload operation. For more information on these properties check out the Import/Export topics in the Users Guide.

Example:

NevronControl.ImportExport.LoadFromURL "http://www.myserver.com/chart.nsv", TRUE 'keep me updated about the download progress


Save

Name: Save

Applies To: NImportExport

Parameters:

ByRef Variant vFile

Return Value: Boolean

Remarks: Saves the control state to a file, memory handle, storage or the clipboard.

  • If the variant type is String (VT_BSTR in C++) the vFile contains the name of a file. If the variant type is String, but the string parameter is empty then the control will export the state to the clipboard in custom Nevron clipboard format.
  • In the case when the variant type is Long (VT_I4) the long parameter specifies a memory handle.
  • If the variant type is Object (VT_UNKNOWN) the pUnk parameter is a pointer to an IStream interface where the control will save its state

    Example:

    Dim vFile As Variant
    vFile = ""
    NevronControl.ImportExport.Save vFile 'export the state to the clipboard (copy)

            •


SaveBitmapImage

Name: SaveBitmapImage

Applies To: NImportExport

Parameters:

ByRef Variant vFile

Boolean UseWindowDimensions

None Width

None Height

None BitsPerPixel

Return Value: Boolean

Remarks: Export a bitmap image to a file, memory handle, storage or clipboard. The target media is specified by the vFile parameter.

  • If the variant type is String (VT_BSTR in C++) the vFile contains the name of a file. If the variant type is String, but the string parameter is empty then the control will export the bitmap to the clipboard.
  • In the case when the variant type is Long (VT_I4) the long parameter specifies a memory handle.
  • If the variant type is Object (VT_UNKNOWN) the pUnk parameter is a pointer to an IStream interface where the control will save the generated bitmap.
  • If the UseWindowDimensions is set to TRUE the bitmap will have the dimensions of the control in the container. Otherwise the bitmap will have the dimensions specified by the Width and Height parameters. Do not set the UseWindowDimensions to TRUE if you're using the control in ASP because the window dimensions are invalid.
  • The BitsPerPixel parameter specifies the bits used to encode each pixel. Nevron controls generate images independently from the current video setting or video adapter capabilities. Thus you may render a 24bpp on a system that supports only 8bpp. Best quality however is achieved if you synchronize the BitsPerPixel with the current video settings.

    Example:

    NevronControl.ImportExport.SaveBitmapImage(sFileName, FALSE, 200, 200, 24) 'generate a 24bpp, 200x200 bimtap image

            •


SaveImageMap

Name: SaveImageMap

Applies To: NImportExport

Parameters:

ByRef Variant vImageFile

ByRef Variant vImageMapFile

String sImageMapName

ByRef String pImageMap

ImageMapType nImageMapType

Boolean UseWindowDimensions

None Width

None Height

None GridCellSize

Boolean UseAverageColor

ImageMapFormat nImageFormat

Boolean Quantize

Long Quality

Long Smoothing

Boolean Transparent

Long BitsPerPixel

Boolean Unicode

ClientSideScript ClientSideScript

Return Value: Boolean

Remarks: Export an HTML image map to file, memory handle or storage.

  • vFile - is of type VARIANT and specifies the location where the image generated along with the image map will be stored.
  • vImageMapFile - is of type VARIANT and specifies the location where the image map will be stored.
  • sImageMapName - of type BSTR and specifies the image map name.
  • pImageMap - receives the generated image map in the form of a string.
  • nImageMapType - defines the type of the image map - HTML or SVG and accepts a constant of type ImageMapType. Possible values are: imtHTML and imtSVG.
  • UseWindowDimensions, Width and Height parameters define the dimensions of the image in the image map and have the same meaning as in the ordinary image export functions.
  • GridCellSize - To simplify computations and to reduce the size of the image map internally the component builds a grid which approximates the actual image. You can control the grid cell size by using this properties. Higher values result in a faster image map generation and less precise image map.
  • UseAverageColor - instructs the image map generation algorithm how to approximate the grid cells to the different objects in the scene. Each grid cell can be associated with only one object. However since several objects can overlap in one cell the control uses two strategies to resolve this - the first one is to picks the object in the center of the cell (faster) and the second one is to compute the coverage percent of each object in the grid. When UseAverageColor is TRUE the control will use the second strategy which is slower but more accurate.
  • nImageFormat defines the image file format. Possible values are: imfJPEG, imfPNG and imfBitmap. As the constant's names suggest they identify the JPEG, PNG and Bitmap image file format
  • Quantize - if the image format is imfJPEG this parameter turns on or off the quantize flag for JPEG export
  • Smoothing - if the image format is imfJPEG this parameter defines the smoothing of the JPEG image
  • Transparent - if the image format is imfPNG this parameter turns on or off the transparency feature for PNG images
  • BitsPerPixel - the color depth of the generated image
  • ClientSideScript - the client side script used to encode the image map. Possible values are cssVBScript and cssJScript which stand for VB script and Java script.
  • Unicode - When set to True the returned image map may contain Unicode characters depending whether the user has used Unicode strings in tooltip texts for example. Otherwise all Unicode strings will be internally converted to ANSI strings.

    Example:

    Dim HTMLImageMap As String
    NControl.ImportExport.SaveImageMap "c:\temp\myimagemap.png", "c:\temp\myimagemap.htm", "SimpleImageMap", ImageMapString, imtHTML, False, 300, 300, 2, False, imfPNG, False, 100, 100, False, 24, cssVBScript, False
    MsgBox HTMLImageMap

            •


SaveJPEGImage

Name: SaveJPEGImage

Applies To: NImportExport

Parameters:

ByRef Variant vFile

Boolean UseWindowDimensions

Long Width

Long Height

Boolean Quantize

None Quality

None Smoothing

None BitsPerPixel

Return Value: Boolean

Remarks: Export a JPEG image to a file, memory handle or storage. The target media is specified by the vFile parameter.

  • If the variant type is String (VT_BSTR in C++) the vFile contains the name of a file.
  • If the variant type is Long (VT_I4 in C++) the long parameter specifies a memory handle.
  • If the variant type is variant type is Object (VT_UNKNOWN in C++) the pUnk parameter is a pointer to an IStream interface where the control will save the generated JPEG.
  • If the UseWindowDimensions is set to TRUE the JPEG image will have the dimensions of the control in the container. Otherwise the bitmap will have the dimensions specified by the Width and Height parameters. Do not set the UseWindowDimensions to TRUE if you're using the control in ASP, because the window dimensions are invalid.
  • The BitsPerPixel parameter specifies the bits used to encode each pixel. Nevron controls generate images independently from the current video setting or video adapter capabilities. Thus you may render a 24bpp on a system that supports only 8bpp. Best quality however is achieved if you synchronize the BitsPerPixel with the current video settings.

    Example:

    NevronControl.ImportExport.SaveJPEGImage(sFileName, FALSE, 200, 300, TRUE, 100, 0, 24) 'generate 24bpp, 200x300, quantized, not smoothed JPEG image

            •


SavePNGImage

Name: SavePNGImage

Applies To: NImportExport

Parameters:

ByRef Variant vFile

Boolean UseWindowDimensions

None Width

None Height

Boolean Transparent

None BitsPerPixel

Return Value: Boolean

Remarks: Export a PNG image to a file, memory handle or storage. The target media is specified by the vFile parameter.

  • If the variant type is String (VT_BSTR in C++) the vFile contains the name of a file.
  • If the variant type is Long (VT_I4) the long parameter specifies a memory handle.
  • In the case when the variant type is VT_UNKNOWN the pUnk parameter is a pointer to an IStream interface where the control will save the generated PNG.
  • If the UseWindowDimensions is set to TRUE the PNG image will have the dimensions of the control in the container. Otherwise the PNG image will have the dimensions specified by the Width and Height parameters. Do not set the UseWindowDimensions to TRUE if you're using the control in ASP because the window dimensions are invalid. When the Transparent parameter is TRUE the control will render a PNG image with a transparent background. Note that the current versions of IE and Netscape do not support true color transparent PNGs (16bpp and 24bpp). However both Microsoft and Netscape have announced that they will support them in the future releases. IE has support for 8bpp tranparent PNGs.
  • The BitsPerPixel parameter specifies the bits used to encode each pixel. Nevron controls generate images independently from the current video settings or video adapter capabilities. Thus you may render a 24bpp on a system that supports only 8bpp. Best quality however is achieved if you synchronize the BitsPerPixel with the current video settings.

    Example:

    NevronControl.ImportExport.SavePNGImage sFileName, FALSE, 500, 400, FALSE, 24 'generate a 24bpp, 500x500, not transparent PNG image

            •


SaveTargaImage

Name: SaveTargaImage

Applies To: NImportExport

Parameters:

ByRef Variant vFile

Boolean UseWindowDimensions

None Width

None Height

Boolean Transparent

None BitsPerPixel

Return Value: Boolean

Remarks: Export a Targa image to a file, memory handle or storage. The target media is specified by the vFile parameter.

  • If the variant type is String (VT_BSTR) the vFile contains the name of a file.
  • In the case when the variant type is Long (VT_I4) the long parameter specifies a memory handle.
  • If the variant type is (VT_UNKNOWN the pUnk parameter is a pointer to an IStream interface where the control will save the generated Targa image.
  • If the UseWindowDimensions is set to TRUE the Targa image will have the dimensions of the control in the container. Otherwise the JPEG image will have the dimensions specified by the Width and Height parameters. Do not set the UseWindowDimensions to TRUE if you're using the control in ASP because the window dimensions are invalid.
  • If the BitsPerPixel parameter is 24 then the Transparent flag indicates whether the Targa image has an alpha channel
  • The BitsPerPixel parameter specifies the bits used to encode each pixel. Nevron controls generate images independently from the current video setting or video adapter capabilities. Thus you may render a 24bpp on a system that supports only 8bpp. Best quality however is achieved if you synchronize the BitsPerPixel with the current video settings.

    Example:

    NevronControl.ImportExport.SaveTargaImage sFileName, FALSE, 300, 300, False, 24 'generate a 24bpp, opaque, 300x300 Targa image

            •


SaveTiffImage

Name: SaveTiffImage

Applies To: NImportExport

Parameters:

ByRef Variant vFile

Boolean UseWindowDimensions

None Width

None Height

Boolean Transparent

None BitsPerPixel

Return Value: Boolean

Remarks: Export a TIFF image to a file. Memory and storage export is not supported for the TIFF file format, because it requires special file settings.

  • The vFile parameter must be of type String (VT_BSTR in C++) and contain a valid file name.
  • If the UseWindowDimensions is set to TRUE the TIFF image will have the dimensions of the control in the container. Otherwise the TIFF will have the dimensions specified by the Width and Height parameters. Do not set the UseWindowDimensions to TRUE if you're using the control in ASP because the window dimensions are invalid.
  • If the BitsPerPixel parameter is 24 then the Transparent flag indicates whether the TIFF image has an alpha channel
  • The BitsPerPixel parameter specifies the bits used to encode each pixel. Nevron controls generate images independently from the current video setting or video adapter capabilities. Thus you may render a 24bpp on a system that supports only 8bpp. Best quality however is achieved if you synchronize the BitsPerPixel with the current video settings.

    Example:

    NevronControl.ImportExport.SaveTiffImage sFileName, FALSE, 400, 400, 24 'generate a 24bpp, opaque, 400x400 TIFF image

            •


SetCodeExportOptions

Name: SetCodeExportOptions

Applies To: NImportExport

Parameters:

Boolean bExportFillEffects

Boolean bExportMaterials

Boolean bExportBorders

Boolean bExportTexts

Boolean bExportAnnotaions

Boolean bExportMouseResponse

Boolean bExportFrames

Boolean bExportLabels

Boolean bExportConstantsAsIntegers

Return Value: None

Remarks: The first eight flags control which objects state should be exported to code. The ExportConstantsAsIntegers flag controls whether custom type constants should be exported as integers.

Example:

NevronControl.ImportExport.SetCodeExportOptions True, True, True, False, False, False, False, True, False


ShowDialog

Name: ShowDialog

Applies To: NImportExport

Parameters: None

Return Value: Boolean

Remarks: Show the Import/Export dialog at runtime. The return value indicates whether the user pressed the Ok button.

Example:

NevronControl.ImportExport.ShowDialog


TerminateDownload

Name: TerminateDownload

Applies To: NImportExport

Parameters: None

Return Value: None

Remarks: Terminates the download operation started with LoadFromURL.


MouseResponse

Name: MouseResponse

Applies To: NLabel

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMouseResponse object applied on the label.

Example:

Label.MouseResponse.SetTooltip "This label has a custom tooltip"


OriginHorzAlign

Name: OriginHorzAlign

Applies To: NLabel

Type: HorizontalAlign

Remarks: Specifies how the OriginOffsetX is to be treated - as an offset from the control's left side (haLeft), the control's right side (haRigth) or the control's center (haCenter).

Example:

Label.OriginHorzAlign = haLeft


OriginOffsetX

Name: OriginOffsetX

Applies To: NLabel

Type: Single

Remarks: The horizontal offset of the label from the left side, the right side or the control's center.

Example:

position the label at 15% from the control left top corner.
Label.OriginHorzAlign = haLeft
Label.OriginVertAlign = vaTop
Label.OriginOffsetX = 15
Label.OriginOffsetY = 15


OriginOffsetY

Name: OriginOffsetY

Applies To: NLabel

Type: Single

Remarks: The vertical offset of the label from the top side, the bottom side or the control's center.

Example:

position the label at 15% from the control left top corner.
Label.OriginHorzAlign = haLeft
Label.OriginVertAlign = vaTop
Label.OriginOffsetX = 15
Label.OriginOffsetY = 15


OriginVertAlign

Name: OriginVertAlign

Applies To: NLabel

Type: VerticalAlign

Remarks: Specifies how the OriginOffsetY is to be treated - as an offset from the control's top side (vaTop), the control's right side (vaRight) or the control's center (vaCenter).

Example:

Label.OriginVertAlign = vaTop


Text

Name: Text

Applies To: NLabel

Type: String

Remarks: The text displayed by the label.

Example:

Label.Text = "This is a label"


TextEx

Name: TextEx

Applies To: NLabel

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx applied on the label's text.

Example:

Label.TextEx.FillEffect.SetSolidColor vbWhite


Add

Name: Add

Applies To: NLabelCollection

Parameters: None

Return Value: Object

Remarks: Adds a new label to the NLabelCollection.

Example:

Dim Label As NLabel
Set Label = NevronControl.LabelCollection.Add
Label.Text = "Label"


AddFooter

Name: AddFooter

Applies To: NLabelCollection

Parameters:

String Label

Return Value: Object

Remarks: Adds a footer to the label collection. The footer position is vertically offseted at 10% from the control bottom and horizontally centered.

Example:

Dim Label As NLabel
Set Label = NevronControl.LabelCollection.AddFooter("Footer")


AddHeader

Name: AddHeader

Applies To: NLabelCollection

Parameters:

String Label

Return Value: Object

Remarks: Adds a header to the label collection. The header position is vertically offseted at 10% from the control top and horizontally centered.

Example:

Dim Label As NLabel
Set Label = NevronControl.LabelCollection.AddHeader("Header")


GetAt

Name: GetAt

Applies To: NLabelCollection

Parameters:

Long Index

Return Value: Object

Remarks: Returns the NLabel object at Index position in the NLabelCollection. The index is zero based.

Example:

Dim Label As NLabel
Set Label = NevronControl.LabelCollection.GetAt(1) 'retrieve the second label


GetCount

Name: GetCount

Applies To: NLabelCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of the labels in the NLabelCollection.

Example:

for i = 0 to NevronControl.LabelCollection.GetCount
' do something
next i


RemoveAll

Name: RemoveAll

Applies To: NLabelCollection

Parameters: None

Return Value: None

Remarks: Removes all the labels from the NLabelCollection collection.

Example:

NevronControl.LabelCollection.RemoveAll 'clear the collection


RemoveAt

Name: RemoveAt

Applies To: NLabelCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes all the label at Index position in the NLabelCollection. The Index is zero based.

Example:

NevronControl.LabelCollection.RemoveAt 0 ' remove the first one


ShowDialog

Name: ShowDialog

Applies To: NLabelCollection

Parameters: None

Return Value: None

Remarks: Shows the visual interface of the labels collection


Backplane

Name: Backplane

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Returns the NBackpane object associated with the legend base. With the help of this object you can modify the appearance of the legend base by changing its style, fill effect and border.

Example:

NChart1.Legend.Backplane.Style = bpsSmoothEdgeRectangle
NChart1.Legend.Backplane.FillEffect.SetGradient gsHorizontal, gvVariant1, vbWhite, vbBlack


ColCount

Name: ColCount

Applies To: NLegend

Type: Long

Remarks: This property indicates the maximum number of columns that the legend contains when operating in leColsFixed mode. The default value is 10. For more information see the LegendExpand property.


Footer

Name: Footer

Applies To: NLegend

Type: String

Remarks: The footer of the legend. This property is empty by default.


FooterSeparatorLineProps

Name: FooterSeparatorLineProps

Applies To: NLegend

Parameters:

ByRef ByRef IDualLineProperties ppLine

Return Value: None

Remarks: Gives you access to the NLineProperties object applied on the footer separator line.


FooterTextEx

Name: FooterTextEx

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx object controlling the text properties of the legend footer.


Header

Name: Header

Applies To: NLegend

Type: String

Remarks: The header of the legend. This property is empty by default.


HeaderSeparatorLineProps

Name: HeaderSeparatorLineProps

Applies To: NLegend

Parameters:

ByRef ByRef IDualLineProperties ppLine

Return Value: None

Remarks: Gives you access to the NLineProperties object applied on the header separator line.


HeaderTextEx

Name: HeaderTextEx

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx object controlling the text properties of the legend header.


HeightPercent

Name: HeightPercent

Applies To: NLegend

Type: Single

Remarks: When the StretchHeight property is set to TRUE this property defines the height of the legend in percents of the control window height.


HorizontalAlign

Name: HorizontalAlign

Applies To: NLegend

Type: HorizontalAlign

Remarks: The legend position in the control window is controlled with the help of four parameters - they are MarginX, MarginY, HorizontalAlign and VerticalAlign. MarginX and MarginY identify a point in the control window. The HorizontalAlign property defines how the legend is horizontally aligned to this point. Possible values for this property are: haCenter, haLeft and haRight.

  • haCenter - the legend is centered around this x position of the point.
  • haLeft - the position of the left corner of the legend is equal to the point x position
  • haRight - the position of the right corner of the legend is equal to the point x position

            •


HorizontalLinesProps

Name: HorizontalLinesProps

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Returns the NLineProperties object controlling the horizontal grid lines of the legend. The following example enables the horizontal grid lines and changes their color to green.

Example:

NChart1.Legend.HorizontalLinesProps.EnableLines = True NChart1.Legend.HorizontalLinesProps.Color = vbGreen


InflateCellHeight

Name: InflateCellHeight

Applies To: NLegend

Type: Long

Remarks: Modify this property if you want to increase the height of the legend item cells. The default value is 10 pixels.


InflateCellWidth

Name: InflateCellWidth

Applies To: NLegend

Type: Long

Remarks: Modify this property if you want to increase the width of the legend item cells. The default value is 15 pixels.


InflateFooterHeight

Name: InflateFooterHeight

Applies To: NLegend

Type: Long

Remarks: Modify this property if you want to increase the height of the legend footer. The default value is 10 pixels.


InflateFooterWidth

Name: InflateFooterWidth

Applies To: NLegend

Type: Long

Remarks: Modify this property if you want to increase the width of the legend footer. The default value is 15 pixels.


InflateHeaderHeight

Name: InflateHeaderHeight

Applies To: NLegend

Type: Long

Remarks: Modify this property if you want to increase the height of the legend header. The default value is 10 pixels.


InflateHeaderWidth

Name: InflateHeaderWidth

Applies To: NLegend

Type: Long

Remarks: Modify this property if you want to increase the width of the legend header. The default value is 15 pixels.


LegendDataCollection

Name: LegendDataCollection

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLegendDataCollection object which stores legend data when the legend is operating in lmManual mode.


LegendExpand

Name: LegendExpand

Applies To: NLegend

Type: LegendExpand

Remarks: Specifies the expand strategy that the legend uses when new data is added. Possible values are

  • leRowsOnly
  • leColsOnly
  • leRowsFixed
  • leColsFixed
    The initial value for this property is leRowsOnly, which indicates that the legend expands only by adding new rows and there is only one column. The reverse case is leColsOnly when there is only one row and the legend expands by adding new columns. In leRowsFixed the legend expands by adding new rows until it reaches the value RowCount (which is initially 10) and then adds a new column. The leColsFixed mode operates in a similar way except that the legend expands by adding new cols. The expand strategy does not change when you change the legend mode.

            •


LegendMode

Name: LegendMode

Applies To: NLegend

Type: LegendMode

Remarks: Configures the mode in which the legend operates. Possible values are:

  • lmDisabled
  • lmAutomatic
  • lmManual
    The default value is lmAutomatic. In this mode the legend displays data that is supplied by the presentation groups. If you want to manually pass data to the legend you should switch the mode to lmManual and use the NLegendDataCollection object.

            •


MarginX

Name: MarginX

Applies To: NLegend

Type: Single

Remarks: The legend position in the control window is controlled with the help of four parameters - they are MarginX, MarginY, HorizontalAlign and VerticalAlign. MarginX and MarginY identify a point in the control window. The point position is specified in percents. The default value of this property is 95%.
NChart1.Legend.MarginX = 85 ' move the legend to the left


MarginY

Name: MarginY

Applies To: NLegend

Type: Single

Remarks: The legend position in the control window is controlled with the help of four parameters - they are MarginX, MarginY, HorizontalAlign and VerticalAlign. MarginX and MarginY identify a point in the control window. The point position is specified in percents. The default value of this property is 5%.
NChart1.Legend.MarginY = 10 ' move the legend closer to the bottom of the control window


MarkSize

Name: MarkSize

Applies To: NLegend

Type: Long

Remarks: The size of the legend item marks in pixels. The initial value is 10.

Example:

NChart1.Legend.MarkSize = 20 ' increase the legend mark size of the active legend


OutlineHorizontalLinesProps

Name: OutlineHorizontalLinesProps

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Returns the NLineProperties object controlling the horizontal lines outer grid lines of the legend. The following example enables the horizontal outer grid lines and changes their color to red.

Example:

NChart1.Legend.OutlineHorizontalLinesProps.EnableLines = True NChart1.Legend.OutlineHorizontalLinesProps.Color = vbRed


OutlineVerticalLinesProps

Name: OutlineVerticalLinesProps

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Returns the NLineProperties object controlling the vertical outer grid lines of the legend. The following example enables the vertical outer grid lines and changes their color to red.

Example:

NChart1.Legend.VerticalLinesProps.EnableLines = True NChart1.Legend.VerticalLinesProps.Color = vbRed


RowCount

Name: RowCount

Applies To: NLegend

Type: Long

Remarks: This property indicates the maximum number of rows that the legend contains when operating in leRowsFixed mode. The default value is 10. For more information see the LegendExpand property


ShadowBackplane

Name: ShadowBackplane

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Returns the NBackpane object associated with the legend shadow. With the help of this object you can modify the appearance of the legend shadow by changing its style, fill effect and border.

Example:

NChart1.Legend.ShadowBackplane.Style = bpsSmoothEdgeRectangle
NChart1.Legend.ShadowBackplane.FillEffect.SetGradient gsHorizontal, gvVariant1, vbWhite, vbBlack


ShadowOffsetX

Name: ShadowOffsetX

Applies To: NLegend

Type: Long

Remarks: The X offset of the legend shadow from the legend base in pixels. The default value is 5.


ShadowOffsetY

Name: ShadowOffsetY

Applies To: NLegend

Type: Long

Remarks: The Y offset of the legend shadow from the legend base in pixels. The default value is 5.


ShowDialog

Name: ShowDialog

Applies To: NLegend

Parameters: None

Return Value: Long

Remarks: Shows the legend properties dialog at runtime. The returned value indicates whether the user pressed the Ok button.

Example:

FillEffect.ShowDialog


StretchHeight

Name: StretchHeight

Applies To: NLegend

Type: Boolean

Remarks: Instructs the legend to stretch its height when the control resizes. In this case the legend height is defined by the HeightPercent property. It specifies the height in percents of the control window height.

Example:

NChart1.Legend.StretchHeight = TRUE
NChart1.Legend.HeightPercent = 20 ' make the legend 20% of the control window


StretchWidth

Name: StretchWidth

Applies To: NLegend

Type: Boolean

Remarks: Instructs the legend to stretch its width when the control resizes. In this case the legend width is defined by the WidthPercent property. It specifies the width in percents of the control window width.

Example:

NChart1.Legend.StretchWidth = TRUE
NChart1.Legend.WidthPercent = 20 ' make the legend 20% of the control window


TextEx

Name: TextEx

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx object controlling the text properties of the legend items texts.


TextOffset

Name: TextOffset

Applies To: NLegend

Type: Long

Remarks: The offset of the texts from the legend mark in pixels. The default value is 5.


VerticalAlign

Name: VerticalAlign

Applies To: NLegend

Type: VerticalAlign

Remarks: The legend position in the control window is controlled with the help of four parameters - they are MarginX, MarginY, HorizontalAlign and VerticalAlign. MarginX and MarginY identify a point in the control window. The VerticalAlign property defines how the legend is vertically aligned to this point. Possible values for this property are: vaCenter, vaTop and vaBottom.

  • vaCenter - the legend is centered around this y position of the point.
  • vaTop - the position of the top corner of the legend is equal to the point y position
  • vaRight - the position of the bottom corner of the legend is equal to the point y position

            •


VerticalLinesProps

Name: VerticalLinesProps

Applies To: NLegend

Parameters: None

Return Value: Object

Remarks: Returns the NLineProperties object controlling the vertical grid lines of the legend. The following example enables the vertical grid lines and changes their color to green.

Example:

NChart1.Legend.VerticalLinesProps.EnableLines = True NChart1.Legend.VerticalLinesProps.Color = vbGreen


WidthPercent

Name: WidthPercent

Applies To: NLegend

Type: Single

Remarks: When the StretchWidth property is set to TRUE this property defines the width of the legend in percents of the control window width.

Example:

NChart1.Legend.StretchWidth = TRUE
NChart1.Legend.WidthPercent = 20 ' make the legend 20% of the control window


ActiveLegend

Name: ActiveLegend

Applies To: NLegendCollection

Type: Long

Remarks: Sets the current active legend. You can have an arbitrary number of legend, but only one legend can be active at a time. The active legend properties are exposed from the main automation object of the control - NChart.Legend. The following example adds a new legend to the legend collection and makes it the active one.

Example:

NChart1.NLegendCollection.Add NChart1.NLegendCollection.ActiveLegend = 1 ' make the second legend the active one


Add

Name: Add

Applies To: NLegendCollection

Parameters: None

Return Value: Object

Remarks: Adds a new legend to the NLegendCollection.

Example:

Dim Legend As NLegend Set Legend = NChart1.LegendCollection.Add Legend.Backplane.FillEffect.SetGradient gsHorizontal, gvVariant1, vbWhite, vbBlack 'set a gradient to the legend base


GetAt

Name: GetAt

Applies To: NLegendCollection

Parameters:

Long Index

Return Value: Object

Remarks: Returns the NLegend object at Index position in the NLegendCollection. The index is zero based.

Example:

Dim Legend As NLegend
Set Legend = NevronControl.LegendCollection.GetAt(1) 'retrieve the second Legend


GetCount

Name: GetCount

Applies To: NLegendCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of the Legends in the NLegendCollection.

Example:

for i = 0 to NevronControl.LegendCollection.GetCount
' do something
next i


RemoveAll

Name: RemoveAll

Applies To: NLegendCollection

Parameters: None

Return Value: None

Remarks: Removes all the Legends from the NLegendCollection collection.

Example:

NevronControl.LegendCollection.RemoveAll 'clear the collection


RemoveAt

Name: RemoveAt

Applies To: NLegendCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes all the Legend at Index position in the NLegendCollection. The Index is zero based.

Example:

NevronControl.LegendCollection.RemoveAt 0 ' remove the first one


LineProperties

Name: LineProperties

Applies To: NLegendData

Parameters: None

Return Value: Object

Remarks: The NLineProperties applied on the line that is drawn across the legend mark. Initially this property is disabled and no line is displayed, but you may consider adding a line for example if you a displaying information related with a line present group. In such cases you may even turn off the mark (by setting the MarkShape property to lmsNone) and use only the LineProperties.


MarkFillEffect

Name: MarkFillEffect

Applies To: NLegendData

Parameters: None

Return Value: Object

Remarks: Gives you access to the fill effect applied on the legend data item.

Example:

data.MarkFillEffect.SetSolidColor vbYellow


MarkLineProperties

Name: MarkLineProperties

Applies To: NLegendData

Parameters: None

Return Value: Object

Remarks: Gives you access to the line properties applied on the legend data item border.

Example:

data.MarkLineProperties.Width = 2


MarkShape

Name: MarkShape

Applies To: NLegendData

Type: LegendMarkShape

Remarks: Controls the shape of the legend data item marks. Valid values are:

  • lmsNone
  • lmsRectangle
  • lmsCircle
  • lmsDiamond
  • lmsTriangle
  • lmsInvertedTriangle

    Example:

    data.MarkShape = lmsRectangle

            •


MouseResponse

Name: MouseResponse

Applies To: NLegendData

Parameters: None

Return Value: Object

Remarks: The MouseResponse object connected with this legend item. The MouseResponse object is used to describe interactive client side information connected with this legend item.


Text

Name: Text

Applies To: NLegendData

Type: String

Remarks: Specifies the text displayed by the legend data item.

Example:

data.Text = "Item 1"


Add

Name: Add

Applies To: NLegendDataCollection

Parameters: None

Return Value: Object

Remarks: Adds a new legend data item and returns the newly created object.

Example:

Dim data As NLegendData
Set data = NChart1.Legend.LegendDataCollection.Add()


GetAt

Name: GetAt

Applies To: NLegendDataCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Returns the object at the specified index.

Example:

Dim data As NLegendData
Set data = NChart1.Legend.LegendDataCollection.GetAt(0)


GetCount

Name: GetCount

Applies To: NLegendDataCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of object in the collection.

Example:

objcount = NChart1.Legend.LegendDataCollection.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NLegendDataCollection

Parameters: None

Return Value: None

Remarks: Removes all legend data items in the collection.

Example:

NChart1.Legend.LegendDataCollection.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NLegendDataCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the legend data item at the given index.

Example:

NChart1.Legend.LegendDataCollection.RemoveAt 0


EnableLighting

Name: EnableLighting

Applies To: NLightModel

Type: Boolean

Remarks: Turns on and off the lightning. When turned off all lighting properties (lights sources and materials) are discarded and have no effect on the rendered scene. The default value is FALSE.

Example:

NevronControl.LightModel.EnableLighting = TRUE 'enable lighting


GlobalAmbientLight

Name: GlobalAmbientLight

Applies To: NLightModel

Type: OLE_COLOR

Remarks: Specifies the ambient color that is global for the whole scene. This property takes effect only when lighting is enabled.

Example:

NevronControl.LightModel.EnableLighting = TRUE
NevronControl.LightModel.GlobalAmbientLight = RGB(50, 50, 50)


GrayScaleType

Name: GrayScaleType

Applies To: NLightModel

Type: GrayScaleType

Remarks: Instructs the light model how to apply lightning depending on the global control settings for grayscale. Possible values are: gsSynchronizeWithControl, gsGrayScale and gsColor.

  • gsSynchronizeWithControl - the grayscale applied on the global ambient light is synchronized with the general control settings.
  • gsGrayScale - the global ambient light will always render as grayscale regardless of the general control settings
  • gsColor - the global ambient light will always render in color regardless of the general control settings

    Example:

    NevronControl.LightModel.GrayScaleType = gsGrayScale ' always convert the GlobalAmbientLight color to grayscale.

            •


LightSourceCollection

Name: LightSourceCollection

Applies To: NLightModel

Parameters: None

Return Value: Object

Remarks: Gives you access to NLightSourceCollection object representing the light sources applied on the scene.

Example:

Dim LightSource As NLightSource
Set LightSource = NevronControl.LightModel.LightSourceCollection.Add("Light1")


LocalViewpointLighting

Name: LocalViewpointLighting

Applies To: NLightModel

Type: Boolean

Remarks: Controls the way OpenGL calculates specular reflection angles. You can turn this property to TRUE if you want to achieve a more realistic lighting. Note that turning on this property will decrease the control's performance. The default value is FALSE.

Example:

NevronControl.LightModel.LocalViewpointLighting = TRUE


SetLightScheme

Name: SetLightScheme

Applies To: NLightModel

Parameters:

LightScheme nLightScheme

Return Value: None

Remarks: Configures the object to use a predefined light scheme. The possible values are:

  • lsStandardWhite
  • lsStandardRed
  • lsStandardGreen
  • lsStandardBlue
  • lsSpotWhite
  • lsSpotRed
  • lsSpotGreen
  • lsSpotBlue
  • lsArena
    After loading the predefined schene you can modify the light's parameters to customize the lighting effect. For a basic impression of the lighting schemes you can press the Load Predefined button in the lights property page. It will show the Predefined light schemes dialog which displays a preview of each of the light schemes along with its description.

    Example:

    NevronControl.LightModel.SetLightScheme lsStandardWhite 'load standard white light

            •


ShowDialog

Name: ShowDialog

Applies To: NLightModel

Parameters: None

Return Value: None

Remarks: Shows the lighting visual interface

Example:

NevronControl.LightModel.ShowDialog


AmbientColor

Name: AmbientColor

Applies To: NLightSource

Type: OLE_COLOR

Remarks: The RGB value of the ambient color emitted by this light source. The ambient color of the individual light sources is added to the global ambient color in the scene. In general adding ambient light makes the scene brighter.

Example:

LightSource.AmbientColor = RGB(25, 25, 25) ' add some ambient light to the 3D scene


ConstantAttenuation

Name: ConstantAttenuation

Applies To: NLightSource

Type: Single

Remarks: Specifies the constant attenuation factor for this light. For more information see the "OpenGL lighting model" topic in the User's Guide.


DiffuseColor

Name: DiffuseColor

Applies To: NLightSource

Type: OLE_COLOR

Remarks: The RGB value of the diffuse color emitted by this light source. Diffuse light comes from a particular direction so it is brighter if it comes squarely down on a surface than if it barely glances off the surface, but once it hits the surface however it is scattered equally in all directions.

Example:

LightSource.DiffuseColor = RGB(255, 255, 255) ' set the diffuse color to white


DirectionX

Name: DirectionX

Applies To: NLightSource

Type: Single

Remarks: Specifies the X value of the light direction vector. Note that property will take effect only if you are using a directed light source. To switch from a undirected to a directed light source you must specify a spot cutoff angle.

Example:

The following example configures a directed light source.
            LightSource.SpotCutoff = 45
LightSource.PositionX = 0
LightSource.PositionY = 0
LightSource.PositionZ = 3
LightSource.DirectionX = 0
LightSource.DirectionY = 0
LightSource.DirectionZ = -1


DirectionY

Name: DirectionY

Applies To: NLightSource

Type: Single

Remarks: Specifies the Y value of the light direction vector. Note that property will take effect only if you are using a directed light source. To switch from a undirected to a directed light source you must specify a spot cutoff angle.

Example:

The following example configures a directed light source.
            LightSource.SpotCutoff = 45
LightSource.PositionX = 0
LightSource.PositionY = 0
LightSource.PositionZ = 3
LightSource.DirectionX = 0
LightSource.DirectionY = 0
LightSource.DirectionZ = -1


DirectionZ

Name: DirectionZ

Applies To: NLightSource

Type: Single

Remarks: Specifies the Z value of the light direction vector. Note that property will take effect only if you are using a directed light source. To switch from a undirected to a directed light source you must specify a spot cutoff angle.

Example:

The following example configures a directed light source.
            LightSource.SpotCutoff = 45
LightSource.PositionX = 0
LightSource.PositionY = 0
LightSource.PositionZ = 3
LightSource.DirectionX = 0
LightSource.DirectionY = 0
LightSource.DirectionZ = -1


GrayScaleType

Name: GrayScaleType

Applies To: NLightSource

Type: GrayScaleType

Remarks: Instructs the light how to render depending on the global control settings for grayscale. Possible values are: gsSynchronizeWithControl, gsGrayScale and gsColor.

  • gsSynchronizeWithControl - the grayscale applied on the AmbientColor, SpecularColor and DiffuseColor is synchronized with the general control settings.
  • gsGrayScale - the AmbientColor, SpecularColor and DiffuseColor will always be converted to grayscale regardless of the general control settings.
  • gsColor - the AmbientColor, SpecularColor and DiffuseColor will not be converted to grayscale regardless of the general control settings

    Example:

    LightSource.GrayScaleType = gsGrayScale ' always render as grayscale.

            •


LinearAttenuation

Name: LinearAttenuation

Applies To: NLightSource

Type: Single

Remarks: Specifies the linear attenuation factor for this light. For more information see the "OpenGL lighting model" topic in the User's Guide.


Name

Name: Name

Applies To: NLightSource

Type: String

Remarks: The name of this light source. This name is supplied only for your convenience should you decide to give human readable name to your NLightSource object. It does not impact the light source parameters in any way.

Example:

LightSource.Name = "The SUN" 'set some Name


PositionX

Name: PositionX

Applies To: NLightSource

Type: Single

Remarks: Specifies the X value of the light position vector.

Example:

LightSource.PositionX = LightSource.PositionX + 2 ' move the light along the X axis


PositionY

Name: PositionY

Applies To: NLightSource

Type: Single

Remarks: Specifies the Y value of the light position vector.

Example:

LightSource.PositionY = LightSource.PositionY + 2 ' move the light along the Y axis


PositionZ

Name: PositionZ

Applies To: NLightSource

Type: Single

Remarks: Specifies the Z value of the light position vector.

Example:

LightSource.PositionZ = LightSource.PositionZ + 2 ' move the light along the Z axis


QuadraticAttenuation

Name: QuadraticAttenuation

Applies To: NLightSource

Type: Single

Remarks: Specifies the quadratic attenuation factor for this light. For more information see the "OpenGL lighting model" topic in the User's Guide.


SpecularColor

Name: SpecularColor

Applies To: NLightSource

Type: OLE_COLOR

Remarks: The RGB value of the specular color emitted by this light source. Unlike ambient light, specular light comes from a particular direction and bounces off the surfaces in the 3D scene in a preferred direction.

Example:

LightSource.SpecularColor = RGB(255, 255, 255) ' set the specular color to white


SpotCutoff

Name: SpotCutoff

Applies To: NLightSource

Type: Single

Remarks: The spot cutoff angle is the maximum value of the angle between the vector defined from the light position and the light direction and the vector defined from the light position and the object. If the value of this angle is bigger than the SpotCutoff the light becomes completely masked. With the help of this property you can achieve directed lights. For example a regular torch has a SpotCuttoff angle of around 45 degrees. When this property is set to 180.0 the light source is considered non-directional and emitting in all directions. If you set the SpotCutoff angle in the range of [0, 90] you specify that it is emitting light in the direction specified by the direction properties. All values not equal to 180 and not in the range of [0, 90] are automatically clamped to the range [0, 90].

Example:

LightSource.SpotCutoff = 80 'make the light directed.


SpotExponent

Name: SpotExponent

Applies To: NLightSource

Type: Single

Remarks: Specifies the intensity distribution of the light.. All values are automatically clamped in the range [0,128]. Effective light intensity is attenuated by the cosine of the angle between the direction of the light and the direction from the light to the vertex being lighted, raised to the power of the spot exponent. Thus, higher spot exponents result in a more focused light source. The default spot exponent is 0, resulting in uniform light distribution.


Add

Name: Add

Applies To: NLightSourceCollection

Parameters:

String Label

Return Value: Object

Remarks: Add a light to the NLightSourceCollection. Have in mind that the light will influence the 3D scene only if lighting is enabled - see the NLightModel object for more information on how to enable lighting.

Example:

This example demonstrates how you can use the NLightSourceCollection and NLightSource objects to add a light to the 3D scene:
Dim LightSource As NLightSource

NChart1.LightModel.EnableLighting = True
Set LightSource = NevronControl.LightSourceCollection.Add("Test light")
LightSource.PositionX = 0
LightSource.PositionY = 0
LightSource.PositionZ = 2

LightSource.AmbientColor = RGB(55, 55, 55)
LightSource.DiffuseColor = RGB(255, 255, 255)
LightSource.SpecularColor = RGB(255, 255, 255)


GetAt

Name: GetAt

Applies To: NLightSourceCollection

Parameters:

Long Index

Return Value: Object

Remarks: Gives you access to the light source at the specified index. Note that the collection index in zero based.

Example:

Dim LightSource As NLightSource
Set LightSource = NevronControl.LightSourceCollection.GetAt(0)
LightSource.SpecularColor = vbYellow
'modify some of the light's parameters


GetCount

Name: GetCount

Applies To: NLightSourceCollection

Parameters: None

Return Value: Long

Remarks: Returns the count the light sources in the collection. The maximum count of the light sources is limited to eight.

Example:

MsgBox "There are " + CStr(NevronControl.LightSourceCollection.GetCount) + " light sources in the scene" 'show the number of light sources


RemoveAll

Name: RemoveAll

Applies To: NLightSourceCollection

Parameters: None

Return Value: None

Remarks: Removes all light sources in the collection.

Example:

NevronControl.LightSourceCollection.RemoveAll 'clear the collection


RemoveAt

Name: RemoveAt

Applies To: NLightSourceCollection

Parameters:

Long Index

Return Value: None

Remarks: Removes the light source at the specified index.

Example:

NevronControl.LightSourceCollection.RemoveAt 0 'remove the first light source


Common

Name: Common

Applies To: NLinePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = line.Common()


HasValuePoints

Name: HasValuePoints

Applies To: NLinePresentGroup

Type: Boolean

Remarks: Controls the visibility of the value points.

Example:

function.HasValuePoints = True 'show the value points


LineStyle

Name: LineStyle

Applies To: NLinePresentGroup

Type: LinePresentStyle

Remarks: Controls the style of the lines. Valid values are:

  • lpsTube - the line segments are displayed as cylinders
  • lpsTape - the line segments are displayed as rectangles
  • lpsLine - the line segments are displayed as simple lines

    Example:

    line.LineStyle = lpsTube ' the line is displayed as a tube

            •


LineWidth

Name: LineWidth

Applies To: NLinePresentGroup

Type: Single

Remarks: Controls the width of the line in OpenGL units when LineStyle is lpsTube or lpsTape.

Example:

line.LineWidth = 0.10 'the line width is 0.10 OpenGL units


PointSize

Name: PointSize

Applies To: NLinePresentGroup

Type: Single

Remarks: Controls the size of the value points in OpenGL units.

Example:

function.PointSize = 0.20


PointStyle

Name: PointStyle

Applies To: NLinePresentGroup

Type: PointStyle

Remarks: Controls the style of the value points. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond
  • psCross
  • psDiagonalCross
  • psStar

    Example:

    function.PointStyle = psCone 'change the point style to cone

            •


Stairs

Name: Stairs

Applies To: NLinePresentGroup

Type: Boolean

Remarks: When set to True the area is drawn in stairs mode.

Example:

line.Stairs = True


UseXValue

Name: UseXValue

Applies To: NLinePresentGroup

Type: Boolean

Remarks: Use Value2 as X coordinate of the data point. This property helps you create date time trends. You need to manually switch the categories axis in value, date time or logarithmic scale mode.

Example:

line.UseXValue = True


UseYValue

Name: UseYValue

Applies To: NLinePresentGroup

Type: Boolean

Remarks: Use Value3 as Y coordinate of the data point. You need to manually switch the series axis in value, date time or logarithmic scale mode.

Example:

line.UseYValue = True


AntialiasingType

Name: AntialiasingType

Applies To: NLineProperties

Type: AntialiasingType

Remarks: Instructs the fill effect how to synchronize with the general antialiasing settings of the control. Possible values are - atSynchronizeWithControl, atUseAntialiasing and atDoNotUseAntialiasing.

  • atSynchronizeWithControl - the antialiasing applied on the line is synchronized with the general control settings.
  • atUseAntialiasing - the line will always use antialiasing regardless of the general control settings
  • atDoNotUseAntialiasing - the line will always render without antialiasing regardless of the general control settings

    Example:

    LineProperties.AntialiasingType = atDoNotUseAntialiasing ' I do not want to use antialiasing for this line

            •


Color

Name: Color

Applies To: NLineProperties

Type: OLE_COLOR

Remarks: Controls the line color.

Example:

LineProperties.Color = vbWhite 'set the line's color to white


EnableLines

Name: EnableLines

Applies To: NLineProperties

Type: Boolean

Remarks: Enables the line (also called border) properties for the object.

Example:

LineProperties.EnableLines = TRUE


Factor

Name: Factor

Applies To: NLineProperties

Type: Integer

Remarks: When the Style property is lsCustom the Factor and the Pattern properties describe the line. These two properties together define whether a certain pixel from the line should be drawn or not. The following formula defines this relationship: DrawPixel = ((2 ^ (DistanceFromLineStart / Factor)) % 16) & Pattern

Example:

LineProperties.Factor = 4 ' increase the line factor


GrayScaleType

Name: GrayScaleType

Applies To: NLineProperties

Type: GrayScaleType

Remarks: Instructs the LineProperties object how to synchronize with the general grayscale settings of the control. Possible values are - gsSynchronizeWithControl, gsGrayScale and gsColor.

  • gsSynchronizeWithControl - the grayscale applied on the NLineProperties is synchronized with the general control settings.
  • gsGrayScale - the NLineProperties will always render as grayscale regardless of the general control settings
  • gsColor - the NLineProperties will always render in color regardless of the general control settings

    Example:

    LineProperties.GrayScaleType = gsGrayScale 'render as grayscale always

            •


InitFromLineProperties

Name: InitFromLineProperties

Applies To: NLineProperties

Parameters:

Object pDisp

Return Value: None

Remarks: Initialize the NLineProperties object from another line NLineProperties object

Example:

NLineProperties.InitFromLineProperties lineProps


Pattern

Name: Pattern

Applies To: NLineProperties

Type: Integer

Remarks: When the Style property is lsCustom the Factor and the Pattern properties define the line. These two properties together define whether a certain pixel from the line should be drawn or not. The following formula defines this relationship: DrawPixel = ((2 ^ (DistanceFromLineStart / Factor)) % 16) & Pattern

Example:

LineProperties.Pattern = 0x22


ShowDialog

Name: ShowDialog

Applies To: NLineProperties

Parameters: None

Return Value: Long

Remarks: Shows the Line properties dialog at runtime. The function returns TRUE if the user pressed the Ok button.

Example:

NLineProperties.ShowDialog 'show the dialog properties


Style

Name: Style

Applies To: NLineProperties

Type: LineStyle

Remarks: Controls the Style of the line properties. It can be lsSolid, lsDash, lsDot, lsDashDot or lsDashDotDot. The default value is lsSolid.

Example:

LineProperties.Style = lsDash ' change the style to dash


Width

Name: Width

Applies To: NLineProperties

Type: Long

Remarks: Controls the width of the lines in pixels. The default value is 1.

Example:

LineProperties.Width = 2 ' increase the width of the lines


AutomaticPalette

Name: AutomaticPalette

Applies To: NMapPresentGroup

Type: Boolean

Remarks: Turns on and off the automatic palette

Example:

Map.AutomaticPalette = True


BorderProperties

Name: BorderProperties

Applies To: NMapPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLineProperies object applied on the map shapes when the UsePalette property is set to True.

Example:

Dim line As NLineProperties
Set line = Map.BorderProperties()


Common

Name: Common

Applies To: NMapPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = Map.Common()


Palette

Name: Palette

Applies To: NMapPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPalette object of the map.

Example:

Dim palette As NPalette
Set palette = Map.Palette()


PaletteSteps

Name: PaletteSteps

Applies To: NMapPresentGroup

Type: Long

Remarks: Controls the number of palette entries when the AutomaticPalette is set to True

Example:

Map.PaletteSteps = 30


PaletteTransparency

Name: PaletteTransparency

Applies To: NMapPresentGroup

Type: Long

Remarks: This property controls the transparency of the palette applied on the shapes.

Example:

Map.PaletteTransparency = 50


ShapeDepthMode

Name: ShapeDepthMode

Applies To: NMapPresentGroup

Type: ShapeDepthMode

Remarks: Controls the depth mode of the map shapes. The possible values are:

  • sdmNone
  • sdmByValue
  • sdmByOrder

    Example:

    Map.ShapeDepthMode = sdmByValue

            •


Shapes

Name: Shapes

Applies To: NMapPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMapShapeCollection object.

Example:

Dim shapes As NMapShapeCollection
Set shapes = Map.Shapes()


SmoothPalette

Name: SmoothPalette

Applies To: NMapPresentGroup

Type: Boolean

Remarks: Controls the palette smoothing. When set to True the component gradients the palette on map shapes.

Example:

Map.SmoothPalette = True


UsePalette

Name: UsePalette

Applies To: NMapPresentGroup

Type: Boolean

Remarks: Controls the usage of the map palette.

Example:

Map.UsePalette = True


AddPoint

Name: AddPoint

Applies To: NMapShape

Parameters:

Double dX

Double dY

Return Value: None

Remarks: Adds a point to the collection

Example:

mapshape.AddPoint 12, 14


Annotation

Name: Annotation

Applies To: NMapShape

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAnnotation object of the data point.

Example:

mapshape.Annotation.Text = "Take a look at this data shape"


Border

Name: Border

Applies To: NMapShape

Parameters: None

Return Value: Object

Remarks: Border of the polygon.

Example:

mapshape.Border.Color vbYellow


FillEffect

Name: FillEffect

Applies To: NMapShape

Parameters: None

Return Value: Object

Remarks: Fill effect of the polygon.

Example:

mapshape.FillEffect.SetSolidColor vbRed


GetPointAt

Name: GetPointAt

Applies To: NMapShape

Parameters:

None nIndex

ByRef Double pX

ByRef Double pY

Return Value: None

Remarks: Gets the shape point at the specified index

Example:

Dim x As Double
Dim y As Double
mapshape.GetPointAt 2, x, y


GetPointCount

Name: GetPointCount

Applies To: NMapShape

Parameters: None

Return Value: Long

Remarks: Returns the number of points in the shape

Example:

count = mapshape.GetPointCount()


Material

Name: Material

Applies To: NMapShape

Parameters: None

Return Value: Object

Remarks: Material of the polygon.

Example:

mapshape.Material.SetAmbientDiffuseColor vbBlue


MouseResponse

Name: MouseResponse

Applies To: NMapShape

Parameters: None

Return Value: Object

Remarks: Gives you access to the MouseResponse of the data point. The mouse response defines behaviour of the data point to various mouse actions and takes a significant part in the creation of Internet interactive charts. It also has properties, which help you specify a default tooltip.

Example:

mapshape.MouseResponse.URL = "www.nevron.com"


RemoveAllPoints

Name: RemoveAllPoints

Applies To: NMapShape

Parameters: None

Return Value: None

Remarks: Removes all points in the collection

Example:

mapshape.RemoveAllPoints


RemovePointAt

Name: RemovePointAt

Applies To: NMapShape

Parameters:

None nIndex

Return Value: None

Remarks: Removes a point at the given index

Example:

mapshape.RemovePointAt 2


Text

Name: Text

Applies To: NMapShape

Type: String

Remarks: Text of the map shape.

Example:

shape.Text = "hello"


TextEx

Name: TextEx

Applies To: NMapShape

Parameters: None

Return Value: Object

Remarks: Text properties of the polygon mark.

Example:

mapshape.TextEx.Font.Size = 12


Value

Name: Value

Applies To: NMapShape

Type: Double

Remarks: Value of the map shape.

Example:

shape.Value = 14


Add

Name: Add

Applies To: NMapShapeCollection

Parameters: None

Return Value: Object

Remarks: Adds a shape to the collection and returns the newly created NMapShape object.

Example:

Dim shape as NMapShape
Set shape = map.Shapes.Add()


GetAt

Name: GetAt

Applies To: NMapShapeCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Retrieves the NMapShape object at the specified index .

Example:

Dim shape as NMapShape
Set shape = map.Shapes.GetAt(0)


GetCount

Name: GetCount

Applies To: NMapShapeCollection

Parameters: None

Return Value: Long

Remarks: Returns the number of objects contained in the collection.

Example:

count = map.Shapes.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NMapShapeCollection

Parameters: None

Return Value: None

Remarks: Removes all shapes in the map shape collection.

Example:

NChart1.Shapes.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NMapShapeCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the NShapeMap object at the specified index.

Example:

map.Shapes.RemoveAt 0


AmbientColor

Name: AmbientColor

Applies To: NMaterial

Type: OLE_COLOR

Remarks: Specifies the ambient color of the object.

Example:

Material.AmbientColor = vbRed


DiffuseColor

Name: DiffuseColor

Applies To: NMaterial

Type: OLE_COLOR

Remarks: Specifies the diffuse color of the object.

Example:

Material.DiffuseColor = vbRed


EmissiveColor

Name: EmissiveColor

Applies To: NMaterial

Type: OLE_COLOR

Remarks: Specifies the emissive color of the object..

Example:

Material.EmissiveColor = vbRed 'the object will emit red light


GrayScaleType

Name: GrayScaleType

Applies To: NMaterial

Type: GrayScaleType

Remarks: Instructs the NMaterial object how to synchronize with the general grayscale settings of the control. Possible values are - gsSynchronizeWithControl, gsGrayScale and gsColor.

  • gsSynchronizeWithControl - the grayscale applied on the NMaterial's ambient, specular, diffuse and emissive colors is synchronized with the general control settings.
  • gsGrayScale - the NMaterial's ambient, specular, diffuse and emissive colors will always render as grayscale regardless of the general control settings
  • gsColor - the NMaterial's ambient, specular, diffuse and emissive colors will always render in color regardless of the general control settings

    Example:

    Material.GrayScaleType = gsGrayScale 'always render in grayscale

            •


InitFromMaterial

Name: InitFromMaterial

Applies To: NMaterial

Parameters:

Object pMaterial

Return Value: None

Remarks: Init the NMaterial object from another NMaterial object

Example:

Material.InitFromMaterial material '


SetAllColors

Name: SetAllColors

Applies To: NMaterial

Parameters:

OLE_COLOR Color

Return Value: None

Remarks: Modifies all the colors of the material (e.g. the ambient, the diffuse, the specular and the emissive color) simultaneously.

Example:

Material.SetAllColors vbWhite 'set the ambient, diffuse and specular colors to white


SetAmbientDiffuseColor

Name: SetAmbientDiffuseColor

Applies To: NMaterial

Parameters:

OLE_COLOR Color

Return Value: None

Remarks: Modifies the ambient and the diffuse color simultaneously.

Example:

Material.SetAmbientDiffuseColor vbWhite 'set the ambient and diffuse colors to white


Shininess

Name: Shininess

Applies To: NMaterial

Type: Single

Remarks: Controls the shininess of the material.


ShowDialog

Name: ShowDialog

Applies To: NMaterial

Parameters: None

Return Value: Long

Remarks: Shows the Material properties dialog at runtime. The return value indicates whether the user clicked the Ok button.

Example:

Material.ShowDialog 'show the material properties


SpecularColor

Name: SpecularColor

Applies To: NMaterial

Type: OLE_COLOR

Remarks: Specifies the specular color of the object.

Example:

Material.SpecularColor = vbRed


ChangeMouseCursor

Name: ChangeMouseCursor

Applies To: NMouseResponse

Type: Boolean

Remarks: Instructs the control to change the mouse cursor when the mouse passes over the object attached to this NMouseResponse object. The following example shows how you can change the mouse cursor of the background.

Example:

NevronControl.EventManager.MouseMove = mmChangeMouseCursor
NevronControl.Background.MouseResponse.ChangeMouseCursor = True
NevronControl.Background.MouseResponse.MousePointer = mpHelp


Flags

Name: Flags

Applies To: NMouseResponse

Type: Long

Remarks: The Flags property can be any combination of the BrowserNavigate flags. It specifies whether to add the URL to the history list, whether to read to or write from the cache, and whether to display the URL in a new window. For example if you use the bnOpenInNewWindow flag the browser will open the URL in a new window. The value of this property can be any combination of the bnOpenInNewWindow, bnNoHistory, bnNoReadFromCache, bnNoWriteToCache, bnAllowAutosearch or bnBrowserBar values.

Example:

MouseResponse.Flags = bnOpenInNewWindow 'open in new window


Headers

Name: Headers

Applies To: NMouseResponse

Type: String

Remarks: Specifies the HTTP headers to send to the server. These headers are added to the default Internet Explorer headers. The headers can specify things like the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if URL is not an HTTP URL.


InitFromMouseResponse

Name: InitFromMouseResponse

Applies To: NMouseResponse

Parameters:

Object pDisp

Return Value: None

Remarks: Initializes this NMouseResponse object from another NMouseResponse object.

Example:

MouseResponse.InitFromMouseResponse MouseResponse


MousePointer

Name: MousePointer

Applies To: NMouseResponse

Type: MousePointer

Remarks: The mouse pointer used when the mouse passes over the object attached to this NMouseResponse object. Possible values for this property are:

  • mpArrow - Standard arrow
  • mpCross - Crosshair
  • mpBeam - I-beam
  • mpSizeNESW - Double-pointed arrow pointing northeast and southwest
  • mpSizeNS - Double-pointed arrow pointing north and south
  • mpSizeNWSE - Double-pointed arrow pointing northwest and southeast
  • mpSizeWE - Double-pointed arrow pointing west and east
  • mpUpArrow - Vertical arrow
  • mpWait - Hourglass
  • mpNo - Slashed circle
  • mpAppStarting - Standard arrow and small hourglass
  • mpHelp - Arrow and question mark
  • mpSizeAll - Four-pointed arrow pointing north, south, east, and west
  • mpLinkSelect - Link select
  • mpHand - Hand
    The following example demonstrates how to change the mouse pointer applied on the background of the control.

    Example:

    NevronControl.EventManager.MouseMove = mmChangeMouseCursor
    NevronControl.Background.MouseResponse.ChangeMouseCursor = True
    NevronControl.Background.MouseResponse.MousePointer = mpHelp

            •


PostData

Name: PostData

Applies To: NMouseResponse

Type: String

Remarks: A string to be send as HTTP POST transaction with the URL. For example, the POST transaction is used to send data gathered by an HTML form. If this parameter does not specify any post data, the browser will issue an HTTP GET transaction. This parameter is ignored if URL is not an HTTP URL.


SetTooltip

Name: SetTooltip

Applies To: NMouseResponse

Parameters:

String Value

Return Value: None

Remarks: Use this function to assign a custom tooltip to the NMouseResponse. Calling SetTooltip is equivalent to setting the UseCustomTooltip to TRUE and setting the Tooltip property to the value passed as a parameter to the SetTooltip function.

Example:

MouseResponse.UseCustomTooltip = TRUE 'enable custom tooltips
MouseResponse.CustomTooltip = "Some tooltip" 'set the custom tooltip to some value
is equivalent to:
NMouseResponse.SetTooltip "Some tooltip"


ShowDialog

Name: ShowDialog

Applies To: NMouseResponse

Parameters:

ByRef Boolean pbResult

Return Value: None

Remarks: Show the NMouseResponse properties dialog at runtime. The returned value indicates whether the user clicked the Ok button.

Example:

MouseResponse.ShowDialog


ShowTooltips

Name: ShowTooltips

Applies To: NMouseResponse

Type: ShowTooltips

Remarks: Defines how the NMouseResponse object should sybchroznize with the general control settings for tooltips. Possible values are: stSynchronizeWithControl, stShowTooltips and stDoNotShowTooltips.

  • stSynchronizeWithControl - syncncronize with the general control settings.
  • stShowTooltips - always show the tooltip assigned to this NMouseResponse object
  • stDoNotShowTooltips - do not show the tooltip assigned to this NMouseResponse object
    The following example sets a tooltip to the background.

    Example:

    NChart1.EventManager.MouseMove = mmTooltip
    NevronControl.Background.MouseResponse.ShowTooltips = stShowTooltips
    NevronControl.Background.MouseResponse.UseCustomTooltip = True
    NevronControl.Background.MouseResponse.Tooltip = "This is a custom tooltip"

            •


TargetFrameName

Name: TargetFrameName

Applies To: NMouseResponse

Type: String

Remarks: The name of the frame in which to display the URL.


Tooltip

Name: Tooltip

Applies To: NMouseResponse

Type: String

Remarks: Specifies the custom tooltip that will be used instead of the default one if UseCustomTooltip is TRUE.

Example:

MouseResponse.UseCustomTooltip = TRUE 'enable custom tooltips
MouseResponse.CustomTooltip = "My custom tooltip" 'set the custom tooltip to some value


URL

Name: URL

Applies To: NMouseResponse

Type: String

Remarks: The URL that the client control will use to navigate the browser. You can assign both relative and absolute URL paths to this property.

Example:

MouseResponse.URL = "SomeASPPage.asp" 'directs the browser to navigate to a relative URL
MouseResponse.URL = "http://www.microsoft.com" 'jump to Microsoft


UseCustomTooltip

Name: UseCustomTooltip

Applies To: NMouseResponse

Type: Boolean

Remarks: Specifies whether the control must use the custom tooltip or not.

Example:

MouseResponse.UseCustomTooltip = TRUE 'enable custom tooltips
MouseResponse.CustomTooltip = "My custom tooltip" 'set the custom tooltip to some value


Alt

Name: Alt

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the one of the alt keys was pressed.


Control

Name: Control

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the one of the control keys was pressed.


HWND

Name: HWND

Applies To: NMouseState

Type: Long

Remarks: The windows handle of the control’s window.


LeftAlt

Name: LeftAlt

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the left alt key was pressed.


LeftControl

Name: LeftControl

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the left control key was pressed.


LeftShift

Name: LeftShift

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the left shift key was pressed.


MouseAction

Name: MouseAction

Applies To: NMouseState

Type: MouseAction

Remarks: Indicates the mouse event that generated this mouse state. The possible values are maLButtonClick, maLButtonDoubleClick, maRButtonClick, maRButtonDoubleClick, maMouseMove.


MouseX

Name: MouseX

Applies To: NMouseState

Type: Long

Remarks: The x mouse position in the control’s window when the event was generated.


MouseY

Name: MouseY

Applies To: NMouseState

Type: Long

Remarks: The y mouse position in the control’s window when the event was generated.


RightAlt

Name: RightAlt

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the right alt key was pressed.


RightControl

Name: RightControl

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the right control key was pressed.


RightShift

Name: RightShift

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the right shift key was pressed.


Shift

Name: Shift

Applies To: NMouseState

Type: Boolean

Remarks: Indicates that the one of the shift keys was pressed.


Add

Name: Add

Applies To: NPalette

Parameters:

Double fValue

OLE_COLOR Color

Return Value: None

Remarks: Adds an item to the palette. Each entry in the palette specifies the color applied on a specific elevation. Note that internally the component sorts the palette in ascending manner so that you don't have to worry about the sequence in which you insert entries. palette.Add 10, vbRed


GetAt

Name: GetAt

Applies To: NPalette

Parameters:

Long nIndex

ByRef Double pValue

ByRef OLE_COLOR pColor

Return Value: None

Remarks: Retrieves information about the custom palette entry at index nIndex.


GetCount

Name: GetCount

Applies To: NPalette

Parameters: None

Return Value: Long

Remarks: Retrieves the number of items in the palette.

Example:

count = palette.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NPalette

Parameters: None

Return Value: None

Remarks: Removes all palette entries.

Example:

palette.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NPalette

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the palette entry at the specified index.

Example:

palette.RemoveAt 0


AddPalette

Name: AddPalette

Applies To: NPaletteManager

Parameters:

String PaletteName

Return Value: Object

Remarks: Adds a new custom palette with the specified name and returns the newly created object. This method will throw an exception if the name of the custom palette is already used.

Example:

Dim pal As NSystemPalette
Set pal = NevronControl.PaletteManager.AddPalette("NewPalette")


GetCurrentPalette

Name: GetCurrentPalette

Applies To: NPaletteManager

Parameters: None

Return Value: String

Remarks: Gets the current palette used by the component.

Example:

PalName = NevronControl.PaletteManager.GetCurrentPalette()


GetPaletteAtIndex

Name: GetPaletteAtIndex

Applies To: NPaletteManager

Parameters:

Long nIndex

Return Value: Object

Remarks: Gives you access to the palette at the specified index.

Example:

Dim pal As NSystemPalette
Set pal = NevronControl.PaletteManager.GetPaletteAt(5)


GetPaletteByName

Name: GetPaletteByName

Applies To: NPaletteManager

Parameters:

String PaletteName

Return Value: Object

Remarks: Gives you access to the palette with the specified name.

Example:

Dim pal As NSystemPalette
Set pal = NevronControl.PaletteManager.GetPaletteByName("MyPalette")


GetPaletteCount

Name: GetPaletteCount

Applies To: NPaletteManager

Parameters: None

Return Value: Long

Remarks: Returns the number of palettes contained in the palette manager.

Example:

PaletteCount = NevronControl.PaletteManager.GetPaletteCount()


RemovePaletteByIndex

Name: RemovePaletteByIndex

Applies To: NPaletteManager

Parameters:

Long Index

Return Value: Boolean

Remarks: Removes the custom palette at the specified index. The return value indicates wheather the operation succedded. The method will fail if you have tried to remove a predefined palette.

Example:

NevronControl.PaletteManager.RemovePaletteByIndex 6


RemovePaletteByName

Name: RemovePaletteByName

Applies To: NPaletteManager

Parameters:

String PaletteName

Return Value: Boolean

Remarks: Removes the custom palette with the specified name. The return value indicates wheather the operation succedded. The method will fail if you have tried to remove a predefined palette.

Example:

NevronControl.PaletteManager.RemovePaletteByName "Palette"


SetCurrentPalette

Name: SetCurrentPalette

Applies To: NPaletteManager

Parameters:

String PaletteName

Return Value: Boolean

Remarks: Sets the current palette used by the component. The specified name can be the name of either a custom or predefined palette. The method will fail if the name of the palette is not a valid predefined or custom palette name.

Example:

NevronControl.PaletteManager.SetCurrentPalette "MyPalette"


ShowDialog

Name: ShowDialog

Applies To: NPaletteManager

Parameters: None

Return Value: None

Remarks: Shows the visual interface of the palette manager
NevronControl.PaletteManager.ShowDialog


BeginAngle

Name: BeginAngle

Applies To: NPiePresentGroup

Type: Long

Remarks: Controls the begin angle of the pie segments.

Example:

pie.BeginAngle = 40


Common

Name: Common

Applies To: NPiePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = pie.Common()


Depth

Name: Depth

Applies To: NPiePresentGroup

Type: Single

Remarks: Controls the depth of the pie segments.

Example:

pie.Depth = 0.20


GroupAnnotation

Name: GroupAnnotation

Applies To: NPiePresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the annotation properties applied on the grouped pie slice.

Example:

pie.GroupAnnotation.Text = "Take a look at this pie slice"


GroupBorder

Name: GroupBorder

Applies To: NPiePresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the line properties applied on the grouped pie slice

Example:

pie.GroupBorder.Color vbYellow ' grouped slice has yellow color


GroupDetachment

Name: GroupDetachment

Applies To: NPiePresentGroup

Type: Double

Remarks: Specifies the detachment of the grouped pie slices

Example:

pie.GroupDetachment = 0.3 'grouped pie slice is detached with 0.3 OpenGL units


GroupFillEffect

Name: GroupFillEffect

Applies To: NPiePresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the fill effect applied on the grouped pie slice.

Example:

pie.GroupFillEffect.SetSolidColor vbBlue ' the grouped slice has blue color


GroupLabel

Name: GroupLabel

Applies To: NPiePresentGroup

Type: String

Remarks: Specifies the label of the grouped pie slices

Example:

pie.GroupLabel = "Other" 'grouped pie slices have label "Other"


GroupMaterial

Name: GroupMaterial

Applies To: NPiePresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the material applied on the grouped pie slice

Example:

pie.GroupMaterial.SetAmbientDiffuseColor vbRed


GroupMode

Name: GroupMode

Applies To: NPiePresentGroup

Type: PieGroupMode

Remarks: Controls the grouping mode of the pie slices

Example:

pie.PieGroupMode = pgmBelowValue 'pie slices below a certain value are group in one slice


GroupMouseResponse

Name: GroupMouseResponse

Applies To: NPiePresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the mouse properties applied on the grouped pie slice.

Example:

pie.GroupMouseResponse.URL = "www.nevron.com" ' when the user clicks on the grouped pie slice the browser is redirected to the Nevron web site


GroupTextEx

Name: GroupTextEx

Applies To: NPiePresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the text properties applied on the grouped pie slice.

Example:

pie.GroupTextEx.Font.Size = 12


GroupValue

Name: GroupValue

Applies To: NPiePresentGroup

Type: Double

Remarks: Specifies the value below which values are grouped

Example:

pie.GroupValue = 10 'pie slices below 10 (absolute or percent depending on GroupMode) are grouped


OrderMode

Name: OrderMode

Applies To: NPiePresentGroup

Type: PieOrderMode

Remarks: Specifies the order mode of the pie slices

Example:

pie.OrderMode = pomAscending 'pies are ordered in ascending order


PieEdgePercent

Name: PieEdgePercent

Applies To: NPiePresentGroup

Type: Long

Remarks: Controls the edge percent of the pie in percent of the pie depth. Valid when PieStyle is psSmoothEdgePie.

Example:

pie.PieEdgePercent = 40


PieStyle

Name: PieStyle

Applies To: NPiePresentGroup

Type: PieStyle

Remarks: Controls the shape of the pie segments. Valid values are:

  • psPie
  • psTorus
  • psSmoothEdgePie

    Example:

    pie.PieStyle = psSmoothEdgePie

            •


Radius

Name: Radius

Applies To: NPiePresentGroup

Type: Single

Remarks: Controls the radius of the pie segments.

Example:

pie.Radius = 0.50


TotalAngle

Name: TotalAngle

Applies To: NPiePresentGroup

Type: Long

Remarks: Controls the total angle displayed as a pie. By default 360.

Example:

pie.TotalAngle = 180 ' display a semi pie chart


InitFromPoint3D

Name: InitFromPoint3D

Applies To: NPoint3D

Parameters:

Object pDisp

Return Value: None

Remarks: Initialize the 3D point from another 3D point.

Example:

Point3D.InitFromPoint3D OtherPoint3D


PosX

Name: PosX

Applies To: NPoint3D

Type: Single

Remarks: Specifies the X position of the point.

Example:

Point3D.PosX = 3


PosY

Name: PosY

Applies To: NPoint3D

Type: Single

Remarks: Specifies the Y position of the point.

Example:

Point3D.PosY = 2


PosZ

Name: PosZ

Applies To: NPoint3D

Type: Single

Remarks: Specifies the Z position of the point.

Example:

Point3D.PosZ = 1.2


Common

Name: Common

Applies To: NPointPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = PointGroup.Common()


DisplayJoinLine

Name: DisplayJoinLine

Applies To: NPointPresentGroup

Parameters:

ChartWallType wall

Boolean bDisplay

Return Value: None

Remarks: Hides or shows the join line on the specified chart wall.

Example:

points.DisplayJoinLine(cwtLeft, True) ' display a join line to the left wall.
points.DisplayJoinLine(cwtRight, False) ' does not display a join line to the rigth wall.


IsJoinLineDisplayed

Name: IsJoinLineDisplayed

Applies To: NPointPresentGroup

Parameters:

ChartWallType wall

Return Value: Boolean

Remarks: Query whether the join line to the specified wall is displayed.

Example:

Dim b As Boolean b = points.IsJoinLineDisplayed(cwtLeft) 'b is True if a join line is displayed to the left wall. Otherwise it is False.


JoinLineProps

Name: JoinLineProps

Applies To: NPointPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLineProperties applied on the point join lines.

Example:

points.JoinLineProps.Color = RGB(255,0,0) 'make the join lines red.


PointStyle

Name: PointStyle

Applies To: NPointPresentGroup

Type: PointStyle

Remarks: Controls the point style. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond

    Example:

    point.PointStyle = psInvertedCone

            •


Size

Name: Size

Applies To: NPointPresentGroup

Type: Single

Remarks: Controls the size of the value point marks.

Example:

point.Size = 0.20


UseXValue

Name: UseXValue

Applies To: NPointPresentGroup

Type: Boolean

Remarks: Specifies whether to use Value2 as X coordinate of the data point. You must manually switch the categories axis in value, datetime or logarithm scale mode.

Example:

point.UseXValue = True
NChart1.Axes(atCategoriesAxis).ScaleMode = asmValue


UseYValue

Name: UseYValue

Applies To: NPointPresentGroup

Type: Boolean

Remarks: Specifies whether to use Value3 as Y coordinate of the data point. You must manually switch the series axis in value, datetime or logarithm scale mode.

Example:

point.UseXValue = True
NChart1.Axes(atSeriesAxis).ScaleMode = asmValue


AngleStep

Name: AngleStep

Applies To: NPolarPresentGroup

Type: Long

Remarks: Specifies the step of the polar radian lines.

Example:

polar.AngleStep = 15 ' radian line on 15 degrees


BeginAngle

Name: BeginAngle

Applies To: NPolarPresentGroup

Type: Long

Remarks: Specifies the begin angle of the polar radian lines.

Example:

polar.BeginAngle = 30 'radian lines begin from 30 degrees


ClockwiseLabels

Name: ClockwiseLabels

Applies To: NPolarPresentGroup

Type: Boolean

Remarks: Controls the increment direction of the polar angle labels. Valid when the WindRoseLabels is set to False;

Example:

polar.ClockwiseLabels = True 'labels are now increasing in a clockwise direction


CloseContour

Name: CloseContour

Applies To: NPolarPresentGroup

Type: Boolean

Remarks: If set to True the polar contour is closed. By default True.

Example:

polar.CloseContour = False ' does not draw a line connecting the first and the last polar serie points


Common

Name: Common

Applies To: NPolarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = bar.Common()


HasValuePoints

Name: HasValuePoints

Applies To: NPolarPresentGroup

Type: Boolean

Remarks: Controls the visibility of the data point marks.

Example:

polar.HasValuePoints = True 'show data point marks


LabelFormat

Name: LabelFormat

Applies To: NPolarPresentGroup

Type: String

Remarks: Specifies the radian label format. Labels represent the radian line angle and can be formatted in degrees (%D(decimal_precision) format command) or radians (%R(decimal_precision) format command). Valid when the WindRoseLabels is set to False. See the Formatting Commands topic for more information.

Example:

polar.LabelFormat = "%R(2)" labels show radian values with 2 decimal points


LabelOffset

Name: LabelOffset

Applies To: NPolarPresentGroup

Type: Single

Remarks: Detaches the radian labels from the radian lines end.

Example:

polar.LabelOffset = 0.15 ' labels are 0.15 OpenGL units away from radian line end


LabelTextEx

Name: LabelTextEx

Applies To: NPolarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you acces7s to the NTextEx object controlling the appearance of the label texts.

Example:

Dim labeltext As NTextEx
Set labeltext = polar.LabelTextEx()


PointSize

Name: PointSize

Applies To: NPolarPresentGroup

Type: Single

Remarks: Controls the size of the data points in OpenGL units.

Example:

polar.PointSize = 0.20


PointStyle

Name: PointStyle

Applies To: NPolarPresentGroup

Type: PointStyle

Remarks: Controls the style of the data point marks. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond

    Example:

    polar.PointStyle = psSphere ' data points are displayed as spheres

            •


WindRoseAngleStep

Name: WindRoseAngleStep

Applies To: NPolarPresentGroup

Type: Long

Remarks: Controls the angle increment of the windrose labels. Accepted values are 15, 30, 45 and 90. Valid when the WindRoseLabels is set to True;

Example:

polar.WindRoseAngleStep = 15


WindRoseLabels

Name: WindRoseLabels

Applies To: NPolarPresentGroup

Type: Boolean

Remarks: When set to True the polar is showing geographical coordinates around the circle.

Example:

polar.WindRoseLabels = True


XRadius

Name: XRadius

Applies To: NPolarPresentGroup

Type: Single

Remarks: Controls the X radius of the polar in OpenGL units. By default 1.5.

Example:

polar.XRadius = 1


YRadius

Name: YRadius

Applies To: NPolarPresentGroup

Type: Single

Remarks: Controls the Y radius of the polar in OpenGL units. By default 1.5.

Example:

polar.YRadius = 1


Add

Name: Add

Applies To: NPresentGroupCollection

Parameters:

PresentGroupType Type

Return Value: Object

Remarks: Add a new presentation group to the collection and return the newly created presentation group object. Currently the 3DChart component supports the following presentation groups (charting types):

  • pgtBar
  • pgtStackBar
  • pgtLine
  • pgtStackLine
  • pgtArea
  • pgtStackArea
  • pgtSurface
  • pgtPoint
  • pgtBubble
  • pgtStock
  • pgtFloatBar
  • pgtPie
  • pgtDoughnut
  • pgtRadar
  • pgtPolar
  • pgtShmoo
  • pgtHighLow
  • pgtMap
  • pgtArrow
  • pgtError
  • pgtErrorBar In Visual Basic you must explicitly cast the returned object to the type you have created as shown in the example.

    Example:

    Dim bar As NBarPresentGroup
    Set bar = NChart1.PresentGroups.Add(pgtBar)

            •


GetAt

Name: GetAt

Applies To: NPresentGroupCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Returns the presentation group at the specified index. You must explicitly cast the returned object to the proper presentation group type. You can query about the presentation group type at the specified index with the help of the GetTypeAt method of the NPresentGroupCollection.

Example:

Dim bar As NBarPresentGroup
Set bar = NChart1.PresentGroups.GetAt(0)


GetCommonAt

Name: GetCommonAt

Applies To: NPresentGroupCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Returns the NPresentGroupCommon object of the presentation group at index nIndex. This method is helpful you want to gain access to the common presentation group properties and avoid any explicit type casting.

Example:

Dim common As NPresentGroupCommon Set common = NChart1.PresentGroups.GetCommonAt(0)


GetCount

Name: GetCount

Applies To: NPresentGroupCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of presentation groups in the collection.

Example:

PresGroupCount = NChart1.PresentGroups.GetCount()


GetTypeAt

Name: GetTypeAt

Applies To: NPresentGroupCollection

Parameters:

Long nIndex

Return Value: PresentGroupType

Remarks: Query about the type of the group at the given index. This method is used if you don't know the type of the presentation group at the specified index, but you want to cast to the proper type.

Example:

Dim bar As NBarPresentGroup
Dim area As NAreaPresentGroup
If NChart1.PresentGroups.GetTypeAt(0) = pgtBar Then
Set bar = NChart1.PresentGroups.GetAt(0)
ElseIf NChart1.PresentGroups.GetTypeAt(0) = pgtArea Then
Set area = NChart1.PresentGroups.GetAt(0)
End If


RemoveAll

Name: RemoveAll

Applies To: NPresentGroupCollection

Parameters: None

Return Value: None

Remarks: Removes all presentation groups in the collection.

Example:

NChart1.PresentGroups.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NPresentGroupCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the presentation group at the specified index.

Example:

NChart1.PresentGroups.RemoveAt 0


Annotation

Name: Annotation

Applies To: NPresentGroupCommon

Parameters: None

Return Value: Object

Remarks: Gives you access to the NAnnotation object controlling the appearance of the data point annotations.

Example:

group.Common.Annotation.FillEffect.SetSolidColor vbRed 'make data point annotations red


ArrowLength

Name: ArrowLength

Applies To: NPresentGroupCommon

Type: Single

Remarks: Controls the length of the arrow connecting the data point and the text label.

Example:

group.Common.ArrowLength = 0.15 'texts are now 0.15 OpenGL units away from the data point


ArrowLine

Name: ArrowLine

Applies To: NPresentGroupCommon

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLineProperties object controlling the appearance of the texts arrow line.

Example:

group.Common.ArrowLine.Color = vbRed 'arrow line is now red


CanDraw

Name: CanDraw

Applies To: NPresentGroupCommon

Parameters: None

Return Value: Boolean

Remarks: Query whether the group can be displayed. Possible reasons for failure are:

  • the current data type of the data storage is not compatible with the requested data type from the presentation group.
  • the presentation group has not been assigned to any of the six chart walls

    Example:

    bCanDraw = group.Common.CanDraw()

            •


DataPointsBetweenMarks

Name: DataPointsBetweenMarks

Applies To: NPresentGroupCommon

Type: Long

Remarks: Specifies how many data points are drawn between two data marks.

Example:

group.Common.DataPointsBetweenMarks = 2 'mark on every second data point


DisplayOnAxis

Name: DisplayOnAxis

Applies To: NPresentGroupCommon

Parameters:

AxisType Axis

Boolean bDisplay

Return Value: None

Remarks: Instruct the chart to scale or not the presentation group on the specified axis. If the presentation group is not displayed on any of the chart axes it is not displayed at all and the CanDraw method returns False. By default all presentation groups are displayed on the left chart axis.

Example:

group.Common.DisplayOnAxis atRightAxis, True 'scale the group on the right axis


EnableUniformAppearance

Name: EnableUniformAppearance

Applies To: NPresentGroupCommon

Type: Boolean

Remarks: Enables or disables the uniform appearances of the presentation group. See the Uniform Appearances topic for more information.

Example:

group.Common.EnableUniformAppearance = True 'enable uniform appearances for this presentation group


FormatString

Name: FormatString

Applies To: NPresentGroupCommon

Type: String

Remarks: The format string used for the data point texts. See the Formatting Commands for more information.

Example:

group.Common.FormatString = "%1(1,TRUE,1)" 'value1 formatted with 1 decimal and commas on the thousands


InflateMargins

Name: InflateMargins

Applies To: NPresentGroupCommon

Type: Boolean

Remarks: Inflates the margins of the presentation group to fit the chart area. This can be very useful if your presentation group has value data points that go outside the chart area.

Example:

group.Common.InflateMargins = True 'fit in chart area


IsDisplayedOnAxis

Name: IsDisplayedOnAxis

Applies To: NPresentGroupCommon

Parameters:

AxisType Axis

Return Value: Boolean

Remarks: Query whether the group is displayed on the specified axis.

Example:

bDisplayed = group.Common.IsDisplayedOnAxis(atRightAxis)


LegendFormatString

Name: LegendFormatString

Applies To: NPresentGroupCommon

Type: String

Remarks: The format string used for the legend data items when the legend mode is pglmDataItems or pglmPresentationGroupCustom. See the Formatting Commands for more information.

Example:

group.Common.LegendFormatString = "%1(1,TRUE,1) %L" 'value1 formatted with 1 decimal and commas on the thousands followed by data point label


LegendMode

Name: LegendMode

Applies To: NPresentGroupCommon

Type: PresentGroupLegendMode

Remarks: Controls the displayed information in the chart legend about the presentation group. The following modes are supported
- pglmCategories - legend items show the categories (their labels) occupied by the presentation group
- pglmSeries - legend items show the series (their labels) occupied by the presentation group
- pglmDataItems - legend items show the data points with the applied fill effects
- pglmUniformAppearances - legend items show the items in the uniform appearances collection
- pglmPresentationGroup - the legend has one entry for the presentation group with the presentation group name as a label
- pglmPresentationGroupCustom - the legend displays presentation group specific information

Example:

group.Common.LegendMode = pglmDataItems 'shows the data items in the legend


MarkType

Name: MarkType

Applies To: NPresentGroupCommon

Type: MarkType

Remarks: Controls the type of the marks displayed at each data point.

Example:

group.Common.MarkType = mtText


Name

Name: Name

Applies To: NPresentGroupCommon

Type: String

Remarks: The name of the presentation group. The legend of the 3DChart component can be configured to show this name.

Example:

group.Common.Name = "Charting made easy"


Range

Name: Range

Applies To: NPresentGroupCommon

Parameters: None

Return Value: Object

Remarks: Gives you access to the NRange object controlling the range from the data storage shown by the presentation group.

Example:

group.Common.Range.InfiniteX = True 'the presentation group shows all categories


ShowDialog

Name: ShowDialog

Applies To: NPresentGroupCommon

Parameters: None

Return Value: Boolean

Remarks: Shows the property pages of the presentation group at runtime. The return value indicates whether the user clicked the Ok button. bOK = group.Common.ShowDialog()


ShowInLegend

Name: ShowInLegend

Applies To: NPresentGroupCommon

Type: Boolean

Remarks: Shows information about the presentation group in the legend. The displayed information is controlled by the LegendMode property.

Example:

group.Common.ShowInLegend = True 'show the presentation group in the legend


TextEx

Name: TextEx

Applies To: NPresentGroupCommon

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx object controlling the appearance of the data point texts,

Example:

group.Common.TextEx.Font.Size = 15 'make data point texts bigger


UniformAppearances

Name: UniformAppearances

Applies To: NPresentGroupCommon

Parameters: None

Return Value: Object

Remarks: Gives you access to the NUniformAppearancesCollection holding the uniform appearances of the group. Some presentation groups do not allow the user to modify the count of the uniform appearances in this collection. See the Uniform Appearances topic for more information. Set appearances = group.Common.UniformAppearances()


UniformMarks

Name: UniformMarks

Applies To: NPresentGroupCommon

Type: Boolean

Remarks: If set to True the marks are displayed with the same characteristics. Depending on the value of the MarkType property the visual appearance of the data point marks are taken either from the NTextEx object accessible with the help of the TextEx method or from NAnnotation object accessible from the Annotation method of the NPresentGroupCommon object.

Example:

group.Common.UniformMarks = True


Visible

Name: Visible

Applies To: NPresentGroupCommon

Type: Boolean

Remarks: Controls the visibility of the presentation group. If set to False the presentation group is not displayed and does not affect the scaling of the axes.

Example:

group.Common.Visible = False 'hide the presentation group


AutomaticQualityPercent

Name: AutomaticQualityPercent

Applies To: NPrintManager

Type: Boolean

Remarks: The print manager will automatically determine the best quality percent value for this printer, based on resolution (logical pixels per inch) of the printer.

Example:

NPrintManager.AutomaticQualityPercent = TRUE


BeginPrint

Name: BeginPrint

Applies To: NPrintManager

Parameters: None

Return Value: None

Remarks: Starts the process of printing and displays the Print progress dialog box that provides a visual feedback. You can cancel the printing by clicking on the Cancel button.

Example:

NevronControl.PrintManager.BeginPrint 'print the control


BottomMargin

Name: BottomMargin

Applies To: NPrintManager

Type: Single

Remarks: Controls the margin of the printed image from the bottom side of the paper. The value is specified in percents. The clamping is done in the same way as with the LeftMargin property. The default value is 15%.

Example:

PrintManager.BottomMargin = 20 'increase the bottom margin


Copies

Name: Copies

Applies To: NPrintManager

Type: Long

Remarks: Specifies how many copies to be printed. You cannot specify a value smaller than 1 for this property. The default value is 1.

Example:

PrintManager.Copies = 3


CurrentPrinter

Name: CurrentPrinter

Applies To: NPrintManager

Type: Long

Remarks: Specifies the current printer. By default the current printer is the default printer for your computer. If you want to print on another one you should specify the printer index. For more information see the GetPrinterCount and GetPrinterName properties.

Example:

Dim PrinterIndex As Integer
PrinterIndex = NevronControl.PrintManager.CurrentPrinter
MsgBox "The current printer is:" + NevronControl.PrintManager.GetPrinterName(CurrentPrinter)


GetPrinterCount

Name: GetPrinterCount

Applies To: NPrintManager

Parameters: None

Return Value: Long

Remarks: Returns the numbers of the installed local and network printers.


GetPrinterName

Name: GetPrinterName

Applies To: NPrintManager

Parameters:

Long nIndex

Return Value: String

Remarks: Returns the printer name at Index. You can use this function to enumerate the installed local and network printers.


LeftMargin

Name: LeftMargin

Applies To: NPrintManager

Type: Single

Remarks: Controls the margin of the printed image from the left side of the paper. The value is specified in percents. For example if the dimensions of the page being printed is 1200x2400 logical units then 15% for this property would mean that the printed image would start from 180. Note that the value is automatically clamped to a valid one e.g. negative values are clamped to zero and if the sum of the LeftMargin and RightMargin properties exceeds 100 then the value is the maximal valid value for this property. The default value is 15%.

Example:

PrintManager.LeftMargin = 20 'increase the left margin


PaperOrientation

Name: PaperOrientation

Applies To: NPrintManager

Type: PaperOrientation

Remarks: Specifies the paper orientation. Possible values are poLandscape and poPortrait. The default value is poPortrait.

Example:

NevronControl.PrintManager,PaperOrientation = poLandscape 'change the paper orienation to landscape


QualityPercent

Name: QualityPercent

Applies To: NPrintManager

Type: Single

Remarks: Some printer devices have a better resolution than the screen. This is why when you print an image that looks smooth on the monitor it sometimes looks jagged on the printer. To correct this you may wish to increase the quality of the generated image by increasing the size of the internally generated bitmap. This increase is specified in percents and is automatically clamped to the range [100, 300]. When you increase the size of the generated image for the printer device however there are some side effects that may be undesirable for you - the most significant one is the size of the two dimensional fonts. They are always calculated in logical units and thus are dependent from the resolution of the output device.
For example suppose that you have a monitor with resolution 1024x768 which is configured to display a control with dimensions of 300x300. With these resolutions a 2D font with size 10 would be approximately 3.33% of the height of the control image. When you choose to print with quality 200% this means that internally your image would be scaled to 600x600 and thus the font height will now drop to 1.66% of the height of the generated image. This will make the 2D texts to look smaller. Fortunately there is the Scale2DFonts property. When this property is turned on (this is the default) the 2D font's size is automatically scaled and this side effect is avoided.

Example:

NevronControl.PrintManager.QualityPercent = 200 'increase the quality percent
NevronControl.PrintManager.BeginPrint


ResetMargins

Name: ResetMargins

Applies To: NPrintManager

Parameters: None

Return Value: None

Remarks: Resets the margins to their default values of 15%.

Example:

NevronControl.PrintManager.LeftMargin = 20
NevronControl.PrintManager.BeginPrint 'print with a bigger left margin
NevronControl.PrintManager.ResetMargins
NevronControl.PrintManager.BeginPrint 'print with the default margins


RightMargin

Name: RightMargin

Applies To: NPrintManager

Type: Single

Remarks: Controls the margin of the printed image from the right side of the paper. The value is specified in percents. The clamping is done in the same way as with the LeftMargin property. The default value is 15%.

Example:

PrintManager.RightMargin = 20 'increase the right margin


Scale2DFonts

Name: Scale2DFonts

Applies To: NPrintManager

Type: Boolean

Remarks: Turns on and off the automatic scaling of the 2D fonts when printing. For more information see the QualityPercent property. The default value is TRUE.

Example:

NevronControl.PrintManager.Scale2DFonts = FALSE 'disable 2D font scaling


SetProportionalMargins

Name: SetProportionalMargins

Applies To: NPrintManager

Parameters: None

Return Value: None

Remarks: Set the margins proportional to the control dimensions. To get a basic impression how this methods works click the Proportional button in the Print preview dialog box.

Example:

NevronControl.PrintManager.SetProportionalMargins
NevronControl.PrintManager.BeginPrint 'print with proportional margins
NevronControl.PrintManager.ResetMargins
NevronControl.PrintManager.BeginPrint 'print with the default margins


ShowPrintPreview

Name: ShowPrintPreview

Applies To: NPrintManager

Parameters: None

Return Value: None

Remarks: Displays the print preview dialog at runtime.

Example:

NevronControl.PrintManager.ShowPrintPreview


TopMargin

Name: TopMargin

Applies To: NPrintManager

Type: Single

Remarks: Controls the margin of the printed image from the top side of the paper. The value is specified in percents. The clamping is done in the same way as with the LeftMargin property. The default value is 15%.

Example:

PrintManager.LeftMargin = 20 'increase the top margin


CategoryTextEx

Name: CategoryTextEx

Applies To: NRadarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NTextEx object controlling the appearance of the category texts


CategoryTextOffset

Name: CategoryTextOffset

Applies To: NRadarPresentGroup

Type: Single

Remarks: Specifies the distance of the category texts from the end of the radar axes.

Example:

radar.CategoryTextOffset = 0.34


Common

Name: Common

Applies To: NRadarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = radar.Common()


HasValuePoints

Name: HasValuePoints

Applies To: NRadarPresentGroup

Type: Boolean

Remarks: Controls the visibility of the radar value points.

Example:

radar.HasValuePoints = True ' show the data points


PointSize

Name: PointSize

Applies To: NRadarPresentGroup

Type: Single

Remarks: Controls the size of the radar data points.

Example:

radar.PointSize = 0.25


PointStyle

Name: PointStyle

Applies To: NRadarPresentGroup

Type: PointStyle

Remarks: Points shape style. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond

    Example:

    radar.PointStyle = psSphere 'points like spheres

            •


RadarStyle

Name: RadarStyle

Applies To: NRadarPresentGroup

Type: RadarStyle

Remarks: Controls the radar style. Valid values are:

  • rsLines - the radar displays connection lines between the adjacent data points.
  • rsFilledArea - the radar fills the area surrounded by the data points.

    Example:

    radar.RadarStyle = rsFilledArea ' switch to filled area mode

            •


XRadius

Name: XRadius

Applies To: NRadarPresentGroup

Type: Single

Remarks: Controls the radar x radius. By default 2.

Example:

radar.XRadius = 3


YRadius

Name: YRadius

Applies To: NRadarPresentGroup

Type: Single

Remarks: Controls the radar y radius. By default 2.

Example:

radar.YRadius = 1 'controls the Y radius


BeginX

Name: BeginX

Applies To: NRange

Type: Long

Remarks: The Begin X value of the range or in other words which is the first Category item shown by the presentation group.

Example:

Range.BeginX = 0


BeginY

Name: BeginY

Applies To: NRange

Type: Long

Remarks: The Begin Y value of the range or in other words which is the first Serie item shown by the presentation group.

Example:

Range.BeginY = 0


BeginZ

Name: BeginZ

Applies To: NRange

Type: Long

Remarks: The Begin Z value of the range or in other words which is the first Level item shown by the presentation group.

Example:

Range.BeginZ = 0


EndX

Name: EndX

Applies To: NRange

Type: Long

Remarks: The End X value of the range (final Category shown by the presentation group). Valid if InfiniteX is set to False.

Example:

range.EndX = 3


EndY

Name: EndY

Applies To: NRange

Type: Long

Remarks: The End Y value of the range (final Serie shown by the presentation group). Valid if InfiniteY is set to False.

Example:

range.EndY = 2


EndZ

Name: EndZ

Applies To: NRange

Type: Long

Remarks: The End Z value of the range (final Level shown by the presentation group). Valid if InfiniteZ is set to False.

Example:

range.EndZ = 3


InfiniteX

Name: InfiniteX

Applies To: NRange

Type: Boolean

Remarks: When set to True the range occupies all Categories values from BeginX to the last one.

Example:

range.InfiniteX = True


InfiniteY

Name: InfiniteY

Applies To: NRange

Type: Boolean

Remarks: When set to True the range occupies all Series values from BeginY to the last one.

Example:

range.InfiniteY = True


InfiniteZ

Name: InfiniteZ

Applies To: NRange

Type: Boolean

Remarks: When set to True the range occupies all Levels values from BeginZ to the last one.

Example:

range.InfiniteZ = True


GetLevelValueField

Name: GetLevelValueField

Applies To: NSerieMapping

Parameters:

Long nLevel

DataValueType Value

Return Value: String

Remarks: Gets the field of the specified level value.

Example:

field = seriemapping.GetLevelValueField(0, dvtValue1)


GetLevelValueFieldEx

Name: GetLevelValueFieldEx

Applies To: NSerieMapping

Parameters:

Long nLevel

DataPointObject Object

Long Property

Return Value: String

Remarks: Gets the field of the specified object property.

Example:

field = seriemapping.GetLevelValueFieldEx(0, dpoMouseResponse, dbmrpURL) 'get the field for the URL property of the MouseResponse object


Label

Name: Label

Applies To: NSerieMapping

Type: String

Remarks: Label of the serie. The NAxisParamter object created when the database is imported will have its Label property set to this value.

Example:

seriemapping.Label = "Serie1"


LevelCount

Name: LevelCount

Applies To: NSerieMapping

Type: Long

Remarks: Specifies the count of levels in the serie. The number of levels in the created data storage when the database is imported is the maximal LevelCount value from all serie mapping objects. seriemapping.LevelCount = 3 ' this serie has 3 levels


SetLevelValueField

Name: SetLevelValueField

Applies To: NSerieMapping

Parameters:

Long nLevel

DataValueType Value

String Field

Return Value: None

Remarks: Maps a level value to the specified field. This means that when the database is imported the Value at nLevel in the corresponding to this object serie will be extracted from Field.

Example:

seriemapping.SetLevelValueField 0, dvtValue1, "Serie2Level1" 'Value1 from level 0 is extracted from field "Serie2Level1"


SetLevelValueFieldEx

Name: SetLevelValueFieldEx

Applies To: NSerieMapping

Parameters:

Long nLevel

DataPointObject Object

Long Property

String Field

Return Value: None

Remarks: Maps the specified field to the specified property of the data point object. Depending on the Object parameters the allowed valued for the Property paramter are

Example:

seriemapping.SetLevelValueFieldEx 0, dpoMouseResponse, dbmrpURL, "URL" 'The URL property of the MouseResponse object is extracted from the URL datasource field.


ShowLabel

Name: ShowLabel

Applies To: NSerieMapping

Type: Boolean

Remarks: Shows or hides the label of the serie. The NAxisParamter object created when the database is imported will have its ShowLabel property set to this value.

Example:

seriemapping.ShowLabel = True


Add

Name: Add

Applies To: NSerieMappingCollection

Parameters:

String Label

Boolean ShowLabel

Return Value: Object

Remarks: Adds a new serie mapping and returns the newly created object.

Example:

Dim seriemapping As NSerieMapping
Set seriemapping = seriemappingcollection.Add("Label", True)


GetAt

Name: GetAt

Applies To: NSerieMappingCollection

Parameters:

Long nIndex

Return Value: Object

Remarks: Returns the object at the specified index.

Example:

Dim seriemapping As NSerieMapping
Set seriemapping = seriemappingcollection.GetAt(0)


GetCount

Name: GetCount

Applies To: NSerieMappingCollection

Parameters: None

Return Value: Long

Remarks: Returns the count of object in the serie mapping collection. objcount = seriemappingcollection.GetCount()


RemoveAll

Name: RemoveAll

Applies To: NSerieMappingCollection

Parameters: None

Return Value: None

Remarks: Removes all serie mappings in the collection. seriemappingcollection.RemoveAll


RemoveAt

Name: RemoveAt

Applies To: NSerieMappingCollection

Parameters:

Long nIndex

Return Value: None

Remarks: Removes the serie mapping at the given index. seriemappingcollection.RemoveAt 0


AntialiasLines

Name: AntialiasLines

Applies To: NSettings

Type: Boolean

Remarks: This is the general setting for turning on or off line antialiasing. All lines with AntialiasingType set to atSynchronizeWithControl align to this setting.The default value for this property is FALSE.

Example:

NevronControl.Settings.AntialiasLines = True ' turn on line antialiasing


AntialiasPoints

Name: AntialiasPoints

Applies To: NSettings

Type: Boolean

Remarks: This is the general setting for turning on or off antialiasing of points. The default value for this property is FALSE.

Example:

NevronControl.Settings.AntialiasPoints = True ' antialias points


AntialiasPolygons

Name: AntialiasPolygons

Applies To: NSettings

Type: Boolean

Remarks: This is the general setting for turning on or off polygon (fill effect) antialiasing. All fill effects with AntialiasingType set to atSynchronizeWithControl align to this setting. The default value for this property is FALSE.

Example:

NevronControl.Settings.AntialiasPolygons = True ' turn on polygon antialiasing


ApplyBackgroundFrameToImage

Name: ApplyBackgroundFrameToImage

Applies To: NSettings

Type: Boolean

Remarks: All Nevron controls have a frame applied around the image. The frame main goal is to make the control appearance better when the control is inserted into forms or dialogs. When you export images however this frame is not desirable because most of the users consider it is an unpleasant visual artifact or even a bug in the control image generation module. The ApplyBackgroundFrameToImage property defines whether the frame object should be applied when the control is generating an image. The default value for this property is FALSE.

Example:

NevronControl.Settings.ApplyBackgroundFrameToImage = TRUE 'I want to use the frame object when exporting to image


CacheRenderedBitmaps

Name: CacheRenderedBitmaps

Applies To: NSettings

Type: Boolean

Remarks: This property instructs the control to cache internally the bitmap rendering results. Subsequent draw operations will be significantly faster is you do not change the state of the component. The cache is automatically cleared when you change the component state from automation, property pages or via the mouse. You must disable this property if the component state changes frequently.

Example:

NevronControl.Settings.CacheRenderedBitmaps = FALSE 'disable bitmap cache


CacheSelectionRendering

Name: CacheSelectionRendering

Applies To: NSettings

Type: Boolean

Remarks: This property instructs the control to cache internally the selection results. Thus if you do not modify the control properties subsequent interactivity operations like tooltips, mouse cursors and mouse move events will work significantly faster. The cache is automatically cleared when you change the component state from automation, property pages or via the mouse. You must disable this property if the component state changes frequently.

Example:

NevronControl.Settings.CacheSelectionRendering = FALSE 'disable selection cache


EnableHardwareAcceleration

Name: EnableHardwareAcceleration

Applies To: NSettings

Type: Boolean

Remarks: Enables or disables the hardware acceleration if present. Note that not all OpenGL drivers are compatible with the specifications so you must enable this property only if you're confident that the users using your programs will run on video boards with compatible drivers. The default value for this property is FALSE.

Example:

NevronControl.Settings.EnableHardwareAcceleration = TRUE ' enable the acceleration


EnableWinXPLookAndFeel

Name: EnableWinXPLookAndFeel

Applies To: NSettings

Type: Boolean

Remarks: This property instructs the control whether to draw the owner draw controls using Win XP visual styles. When enabled the control will draw the controls with Win XP look and feel visual styles on Win XP systems. This property does not effect the control appearance on non Win XP systems. The default value is FALSE.

Example:

NevronControl.Settings.EnableWinXPLookAndFeel = TRUE


Jitter2DObjects

Name: Jitter2DObjects

Applies To: NSettings

Type: Boolean

Remarks: Sometimes you want to use the antialiasing effect delivered by jittering without making the 2d texts and legends less readable. To achieve this you can turn off the jittering for the 2d objects in the scene by setting the Jitter2DObjects to FALSE (which is also the default value)

Example:

NevronControl.Settings.UseJittering = TRUE
NevronControl.Settings.JitteringSamples = 4 ' increase the jittering samples
NevronControl.Settings.JitteringDeviation = 2 ' increase the jittering deviation (produces a more blurred image)
NevronControl.Settings.Jitter2DObjects ' do not apply jittering on 2D texts, labels, legends and annotations


JitteringDeviation

Name: JitteringDeviation

Applies To: NSettings

Type: Single

Remarks: The maximum deviation of the jittering samples from the original image in pixels. The default value for this property is 1.

Example:

NevronControl.Settings.UseJittering = TRUE
            NevronControl.Settings.JitteringSamples = 4 ' increase the jittering samples
NevronControl.Settings.JitteringDeviation = 2 ' increase the jittering deviation (produces a more blurred image)
NevronControl.Settings.Jitter2DObjects ' do not apply jittering on 2D texts, labels, legends and annotations


JitteringSamples

Name: JitteringSamples

Applies To: NSettings

Type: Integer

Remarks: Defines how many times the control has to render the scene in order to produce the jittered image. The values of this property range from 2 to 16 and greater values produce a better blurring effect. The default value is 2.

Example:

NevronControl.Settings.UseJittering = TRUE
NevronControl.Settings.JitteringSamples = 4 ' increase the jittering samples
NevronControl.Settings.JitteringDeviation = 2 ' increase the jittering deviation (produces a more blurred image)
NevronControl.Settings.Jitter2DObjects ' do not apply jittering on 2D texts, labels, legends and annotations


MaxBitmapHeight

Name: MaxBitmapHeight

Applies To: NSettings

Type: Long

Remarks: The MaxBitmapHeight property specifies the maximum image height that can be exported without breaking the image for separate rendering. This property has effect only if the MaxBitmapSizeEqualsScreen is se to FALSE.

Example:

NevronControl.Settings.RenderLargeBitmapsOnPortions = TRUE
NevronControl.Settings.MaxBitmapSizeEqualsScreen = FALSE
NevronControl.Settings.MaxBitmapWidth = 500 ' render all images larger than 500x500 by splitting them into cells of 500x500
NevronControl.Settings.MaxBitmapHeight = 500


MaxBitmapSizeEqualsScreen

Name: MaxBitmapSizeEqualsScreen

Applies To: NSettings

Type: Boolean

Remarks: All image export functions define the dimensions of the resulting image by either explicitly specifying them or by instructing the control to retrieve them from the control dimensions in the form or dialog it resides in. If you have turned on the RenderLargeBitmapsOnPortions property the MaxBitmapSizeEqualsScreen property tells the control to split the image into a grid if the image dimensions are bigger than the screen dimensions.

Example:

NevronControl.Settings.RenderLargeBitmapsOnPortions = TRUE
NevronControl.Settings.MaxBitmapSizeEqualsScreen = TRUE ' render images larger than the screen by dividing them in a grid


MaxBitmapWidth

Name: MaxBitmapWidth

Applies To: NSettings

Type: Long

Remarks: The MaxBitmapWidth property specifies the maximum image width that can be exported without breaking the image for separate rendering. This property has effect only if the MaxBitmapSizeEqualsScreen is se to FALSE.

Example:

NevronControl.Settings.RenderLargeBitmapsOnPortions = TRUE
NevronControl.Settings.MaxBitmapSizeEqualsScreen = FALSE
NevronControl.Settings.MaxBitmapWidth = 500 ' render all images larger than 500x500 by splitting them into cells of 500x500
NevronControl.Settings.MaxBitmapHeight = 500


NumberFormatCustomLocale

Name: NumberFormatCustomLocale

Applies To: NSettings

Type: Long

Remarks: Specifies the locale with which the numbers must be formatted. Valid only if UserDefaultNumberFormat is set to False. The following table lists the possible values for this property:
Identifier | Language
0x0000 | Language Neutral
0x0400 | Process Default Language
0x0436 | Afrikaans
0x041c | Albanian
0x0401 | Arabic (Saudi Arabia)
0x0801 | Arabic (Iraq)
0x0c01 | Arabic (Egypt)
0x1001 | Arabic (Libya)
0x1401 | Arabic (Algeria)
0x1801 | Arabic (Morocco)
0x1c01 | Arabic (Tunisia)
0x2001 | Arabic (Oman)
0x2401 | Arabic (Yemen)
0x2801 | Arabic (Syria)
0x2c01 | Arabic (Jordan)
0x3001 | Arabic (Lebanon)
0x3401 | Arabic (Kuwait)
0x3801 | Arabic (U.A.E.)
0x3c01 | Arabic (Bahrain)
0x4001 | Arabic (Qatar)
0x042b | Windows 2000: Armenian. This is Unicode only.
0x044d | Windows 2000: Assamese. This is Unicode only.
0x042c | Azeri (Latin)
0x082c | Azeri (Cyrillic)
0x042d | Basque
0x0423 | Belarussian
0x0445 | Windows 2000: Bengali. This is Unicode only.
0x0402 | Bulgarian
0x0455 | Burmese
0x0403 | Catalan
0x0404 | Chinese (Taiwan)
0x0804 | Chinese (PRC)
0x0c04 | Chinese (Hong Kong SAR, PRC)
0x1004 | Chinese (Singapore)
0x1404 | Chinese (Macau SAR)
0x041a | Croatian
0x0405 | Czech
0x0406 | Danish
0x0413 | Dutch (Netherlands)
0x0813 | Dutch (Belgium)
0x0409 | English (United States)
0x0809 | English (United Kingdom)
0x0c09 | English (Australian)
0x1009 | English (Canadian)
0x1409 | English (New Zealand)
0x1809 | English (Ireland)
0x1c09 | English (South Africa)
0x2009 | English (Jamaica)
0x2409 | English (Caribbean)
0x2809 | English (Belize)
0x2c09 | English (Trinidad)
0x3009 | English (Zimbabwe)
0x3409 | English (Philippines)
0x0425 | Estonian
0x0438 | Faeroese
0x0429 | Farsi
0x040b | Finnish
0x040c | French (Standard)
0x080c | French (Belgian)
0x0c0c | French (Canadian)
0x100c | French (Switzerland)
0x140c | French (Luxembourg)
0x180c | French (Monaco)
0x0437 | Windows 2000: Georgian. This is Unicode only.
0x0407 | German (Standard)
0x0807 | German (Switzerland)
0x0c07 | German (Austria)
0x1007 | German (Luxembourg)
0x1407 | German (Liechtenstein)
0x0408 | Greek
0x0447 | Windows 2000: Gujarati. This is Unicode only.
0x040d | Hebrew
0x0439 | Windows 2000: Hindi. This is Unicode only.
0x040e | Hungarian
0x040f | Icelandic
0x0421 | Indonesian
0x0410 | Italian (Standard)
0x0810 | Italian (Switzerland)
0x0411 | Japanese
0x044b | Windows 2000: Kannada. This is Unicode only.
0x0860 | Kashmiri (India)
0x043f | Kazakh
0x0457 | Windows 2000: Konkani. This is Unicode only.
0x0412 | Korean
0x0812 | Korean (Johab)
0x0426 | Latvian
0x0427 | Lithuanian
0x0827 | Lithuanian (Classic)
0x042f | Macedonian
0x043e | Malay (Malaysian)
0x083e | Malay (Brunei Darussalam)
0x044c | Windows 2000: Malayalam. This is Unicode only.
0x0458 | Manipuri
0x044e | Windows 2000: Marathi. This is Unicode only.
0x0861 | Windows 2000: Nepali (India). This is Unicode only.
0x0414 | Norwegian (Bokmal)
0x0814 | Norwegian (Nynorsk)
0x0448 | Windows 2000: Oriya. This is Unicode only.
0x0415 | Polish
0x0416 | Portuguese (Brazil)
0x0816 | Portuguese (Standard)
0x0446 | Windows 2000: Punjabi. This is Unicode only.
0x0418 | Romanian
0x0419 | Russian
0x044f | Windows 2000: Sanskrit. This is Unicode only.
0x0c1a | Serbian (Cyrillic)
0x081a | Serbian (Latin)
0x0459 | Sindhi
0x041b | Slovak
0x0424 | Slovenian
0x040a | Spanish (Traditional Sort)
0x080a | Spanish (Mexican)
0x0c0a | Spanish (Modern Sort)
0x100a | Spanish (Guatemala)
0x140a | Spanish (Costa Rica)
0x180a | Spanish (Panama)
0x1c0a | Spanish (Dominican Republic)
0x200a | Spanish (Venezuela)
0x240a | Spanish (Colombia)
0x280a | Spanish (Peru)
0x2c0a | Spanish (Argentina)
0x300a | Spanish (Ecuador)
0x340a | Spanish (Chile)
0x380a | Spanish (Uruguay)
0x3c0a | Spanish (Paraguay)
0x400a | Spanish (Bolivia)
0x440a | Spanish (El Salvador)
0x480a | Spanish (Honduras)
0x4c0a | Spanish (Nicaragua)
0x500a | Spanish (Puerto Rico)
0x0430 | Sutu
0x0441 | Swahili (Kenya)
0x041d | Swedish
0x081d | Swedish (Finland)
0x0449 | Windows 2000: Tamil. This is Unicode only.
0x0444 | Tatar (Tatarstan)
0x044a | Windows 2000: Telugu. This is Unicode only.
0x041e | Thai
0x041f | Turkish
0x0422 | Ukrainian
0x0420 | Urdu (Pakistan)
0x0820 | Urdu (India)
0x0443 | Uzbek (Latin)
0x0843 | Uzbek (Cyrillic)
0x042a | Vietnamese

Example:

NevronControl.Settings.NumberFormatCustomLocale = 0x80c 'French (Belgium)


PaletteManager

Name: PaletteManager

Applies To: NSettings

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPaletteManager object which control the palette used in all color selection controls.

Example:

Dim palman As NPaletteManager
Set palman = NevronControl.PaletteManager()


RecreateContextOnResize

Name: RecreateContextOnResize

Applies To: NSettings

Type: Boolean

Remarks: This property instructs the control to automatically recreate the OpenGL rendering context when a window resize occurs. This may be necessary on machines where OpenGL has problems to properly adjust the window viewport when the window is resized


RecreateOpenGLContext

Name: RecreateOpenGLContext

Applies To: NSettings

Parameters: None

Return Value: None

Remarks: Recreates the OpenGL context when the control runs in window mode. This function can be very useful when you run the control in a window or VB form which is resizable or scrollable. Microsoft OpenGL has problems to detect when a certain area of the window is valid and this function helps you to fix unpleasant visual artifacts.


RenderGrayScale

Name: RenderGrayScale

Applies To: NSettings

Type: Boolean

Remarks: This is the general setting for turning on or off the grayscaling mode of the control. All fill effects, lines, frames, materials and lights with grayscale mode of gsSynchronizeWithControl align to this setting. The default value for this property is FALSE.

Example:

NevronControl.Settings.RenderGrayScale = True ' turn on grayscaling


RenderLargeBitmapsOnPortions

Name: RenderLargeBitmapsOnPortions

Applies To: NSettings

Type: Boolean

Remarks: Very often you need to render images which extend beyond the screen dimensions. Unfortunately some versions of OpenGL cannot handle bitmap render surfaces bigger than the screen dimensions. This is where the RenderLargeBitmapsOnPortions may come handy. The RenderLargeBitmapsOnPortions property instruct the control to divide the image into a grid, render each cell of the grid separately and then add them together in the resulting image. Thus you can rendering large images containing thousands of pixels in each directions. Such images can later be used for posters or TV programs where the quality of the image is very important. You must note that rendering bitmaps on portions does have a negative impact on performance because the control is actually rendering not only the grid cell but also a small area around it. This is done to prevent eventual clipping of some objects like 2d texts from the resulting image.

Example:

NevronControl.Settings.RenderLargeBitmapsOnPortions = TRUE
NevronControl.Settings.MaxBitmapSizeEqualsScreen = TRUE ' render images larger than the screen by dividing them in a grid


ResourceDLL

Name: ResourceDLL

Applies To: NSettings

Type: String

Remarks: Specifies the resource dll currently used by the component. An empty string specifies that the current resources are the default ones (build in the component ocx file). This feature allows the component to change its resources at runtime.


Scale2DObjectsPercent

Name: Scale2DObjectsPercent

Applies To: NSettings

Type: Single

Remarks: Sometimes it is very useful to be able to scale all 2D objects in the scene by modifying only one property. For example consider that you have a control that generates images in 300x300 or 600x600. You may want 2d objects to be scaled in the second image in order to keep their relative size to the rest of the image. This can be easily accomplished with the help of the Scale2DobjectsPercent property.

Example:

NevronControl.Settings.Scale2DObjectsPercent = 200


Transparent

Name: Transparent

Applies To: NSettings

Type: Boolean

Remarks: When the control is activated in windowless mode you can also instruct it to use a background supplied by the container or in other words to have a transparent background. Note that the transparent mode will decrease the control's performance because the control has to perform some additional steps.

Example:

NevronControl.Settings.Transparent = TRUE


UseJittering

Name: UseJittering

Applies To: NSettings

Type: Boolean

Remarks: Jittering or blurring is the most efficient way to antialias the whole scene without making a significant tradeoff of performance. In some cases it also produces images with a better quality that antialiasing because it uses a completely different approach to antialias the image.
The idea behind jittering is very simple and this why this special visual effect is so effective. Instead of rendering the scene only once the control renders it several times and produces different image samples of the image. All these samples have a small offset along the X and Y directions. The samples are added together with weight coefficients to produce the final image. The UseJittering turns on and off jittering. The default value for this property is FALSE.

Example:

NevronControl.Settings.UseJittering = TRUE
NevronControl.Settings.JitteringSamples = 4 ' increase the jittering samples
NevronControl.Settings.JitteringDeviation = 2 ' increase the jittering deviation (produces a more blurred image)
NevronControl.Settings.Jitter2DObjects ' do not apply jittering on 2D texts, labels, legends and annotations


UserDefaultNumberFormat

Name: UserDefaultNumberFormat

Applies To: NSettings

Type: Boolean

Remarks: Specifies whether the numbers must be formatted with the current user locale settings

Example:

NevronControl.Settings.UserDefaultNumberFormat = True


Windowless

Name: Windowless

Applies To: NSettings

Type: Boolean

Remarks: This property instructs the control whether to activate in windowless mode. When set to TRUE the next the time the control is activated it will not create a window, but instead will render itself into a bitmap. Make sure to modify this property before the control is activated.

Example:

NevronControl.Settings.Windowless = TRUE


AllFailHidden

Name: AllFailHidden

Applies To: NShmooPresentGroup

Type: Boolean

Remarks: Automatically hides all fail bits.

Example:

shmoo.AllFailHidden = True 'will hide all bits that are hidden


Common

Name: Common

Applies To: NShmooPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.


FirstFailType

Name: FirstFailType

Applies To: NShmooPresentGroup

Type: FirstFailType

Remarks: Specifies the dimension for which to highlight the first fail bits. Possible values are:

  • fftFirstXFail
  • fftFirstYFail
  • fftFirstZFail

    Example:

    shmoo.FirstFailType = fftFirstXFail

            •


HighlightFirstFail

Name: HighlightFirstFail

Applies To: NShmooPresentGroup

Type: Boolean

Remarks: The presentation group will highlight the first fail bits in one of the three dimensions (X, Y or Z) depending on the FirstFailType property. The highlighted bits are displayed with the third uniform appearace of the presentation group. See the Shmoo chart topic for more information.

Example:

shmoo.HighlightFirstFail = True


ShowXRow

Name: ShowXRow

Applies To: NShmooPresentGroup

Parameters:

None nY

None nZ

Boolean bShow

Return Value: None

Remarks: Set the show - hide bit to bShow for all categories at serie nY and level nZ


ShowYRow

Name: ShowYRow

Applies To: NShmooPresentGroup

Parameters:

None nX

None nZ

Boolean bShow

Return Value: None

Remarks: Set the show - hide bit to bShow for all series at category nX and level nZ


ShowZRow

Name: ShowZRow

Applies To: NShmooPresentGroup

Parameters:

None nX

None nY

Boolean bShow

Return Value: None

Remarks: Set the show - hide bit to bShow for all levels at category nX and serie nY


Common

Name: Common

Applies To: NSmoothLinePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = spline.Common()


HasValuePoints

Name: HasValuePoints

Applies To: NSmoothLinePresentGroup

Type: Boolean

Remarks: Controls the visibility of the value points.

Example:

spline.HasValuePoints = True 'show the value point marks


Interpolation2D

Name: Interpolation2D

Applies To: NSmoothLinePresentGroup

Type: Boolean

Remarks: This property is considered only when the UseXValue property is set to True. It changes the interpolation method and allows drawing of 2D curves which may cross themselves.


LineStyle

Name: LineStyle

Applies To: NSmoothLinePresentGroup

Type: LinePresentStyle

Remarks: Controls the style of the lines. Valid values are:

  • lpsTube - the line segments are displayed as cylineders
  • lpsTape - the line segments are displayed as rectangles
  • lpsLine - the line segments are displayed as simple lines

    Example:

    spline.LineStyle = lpsTube ' the line is displayed as a tube

            •


LineWidth

Name: LineWidth

Applies To: NSmoothLinePresentGroup

Type: Single

Remarks: Controls the width of the line in OpenGL units when LineStyle is lpsTube or lpsTape.

Example:

spline.LineWidth = 0.10 'the line width is 0.10 OpenGL units


PointSize

Name: PointSize

Applies To: NSmoothLinePresentGroup

Type: Single

Remarks: Controls the size of the value points in OpenGL units.

Example:

function.PointSize = 0.20


PointStyle

Name: PointStyle

Applies To: NSmoothLinePresentGroup

Type: PointStyle

Remarks: Controls the style of the value points. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond
  • psCross
  • psDiagonalCross
  • psStar

    Example:

    function.PointStyle = psCone 'change the point style to cone

            •


Smoothness

Name: Smoothness

Applies To: NSmoothLinePresentGroup

Type: Long

Remarks: Controls the smoothness of the curve. This value defines how much line segments are rendered for a length of one OpenGL unit;

Example:

spline.Smoothness = 20


UseXValue

Name: UseXValue

Applies To: NSmoothLinePresentGroup

Type: Boolean

Remarks: Use Value2 as X coordinate of the data point. You need to manually switch the categories axis in value, date time or logarithmic scale mode.

Example:

spline.UseXValue = True


Common

Name: Common

Applies To: NStackAreaPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = bar.Common()


DepthPercent

Name: DepthPercent

Applies To: NStackAreaPresentGroup

Type: Long

Remarks: Controls the depth of area in percents of the floor grid cell depth.

Example:

area.DepthPercent = 50 'half the cell depth


DropLines

Name: DropLines

Applies To: NStackAreaPresentGroup

Type: Boolean

Remarks: Controls the visibility of the area separation lines. area.DropLines = True


StackStyle

Name: StackStyle

Applies To: NStackAreaPresentGroup

Type: StackStyle

Remarks: Controls the stacking style of the area. Valid values are:

  • ssStacked - normal stacked area chart
  • ssStackedPercent - stacked percent chart. Each item shows the contribution to the overall item sum.

    Example:

    area.StackStyle = ssStackedPercent 'stack percent area chart

            •


Stairs

Name: Stairs

Applies To: NStackAreaPresentGroup

Type: Boolean

Remarks: When set to True the area is drawn in stairs mode.

Example:

area.Stairs = True


BarEdgePercent

Name: BarEdgePercent

Applies To: NStackBarPresentGroup

Type: Long

Remarks: Controls the edge size of the smooth edge bar in percents of the smaller bar dimension (width or depth).

Example:

bar.BarEdgePercent = 35


BarStyle

Name: BarStyle

Applies To: NStackBarPresentGroup

Type: BarStyle

Remarks: Controls the style of the bars. Valid values are:

  • bsBar
  • bsCylinder
  • bsCone
  • bsInvertedCone
  • bsPyramid
  • bsInvertedPyramid
  • bsSmoothEdgeBar

    Example:

    bar.BarStyle = bsInvertedPyramid 'bars are now displayed as pyramids

            •


Common

Name: Common

Applies To: NStackBarPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = bar.Common()


DepthPercent

Name: DepthPercent

Applies To: NStackBarPresentGroup

Type: Long

Remarks: Controls the depth of bars in percents of the floor grid cell depth.

Example:

bar.DepthPercent = 50 'half the cell depth


HasBottomEdge

Name: HasBottomEdge

Applies To: NStackBarPresentGroup

Type: Boolean

Remarks: When set to True the first cut edge or smooth edge bar has a bottom edge. By default False.

Example:

bar.HasBottomEdge = True


HasJoinLines

Name: HasJoinLines

Applies To: NStackBarPresentGroup

Type: Boolean

Remarks: Controls the visibility of the join line between bars.

Example:

bar.HasJoinLines = True


HasMiddleEdge

Name: HasMiddleEdge

Applies To: NStackBarPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge bars in the pile have edges. By default False.

Example:

bar.HasMiddleEdge = True


HasTopEdge

Name: HasTopEdge

Applies To: NStackBarPresentGroup

Type: Boolean

Remarks: When set to True the last cut edge or smooth edge bar has a top edge. By default True.

Example:

bar.HasTopEdge = True


JoinLineProps

Name: JoinLineProps

Applies To: NStackBarPresentGroup

Parameters: None

Return Value: Object

Remarks: Controls the appearance of the line connecting the bars

Example:

bar.JoinLineProps.Width = 2


RoundLastVisible

Name: RoundLastVisible

Applies To: NStackBarPresentGroup

Type: Boolean

Remarks: Specifies wheather the last visible stack bar should be rounded. By default False. Valid only when the style of the bars is either bsSmoothEdgeBar or bsCutEdgeBar

Example:

bar.RoundLastVisible = True


StackStyle

Name: StackStyle

Applies To: NStackBarPresentGroup

Type: StackStyle

Remarks: Controls the stacking style of the bars. Valid values are:
- ssStacked - normal stacked bar chart
- ssStackedPercent - stacked percent chart. Each item shows the contribution to the overall item sum.

Example:

bar.StackStyle = ssStackedPercent 'stack percent bar chart


WidthPercent

Name: WidthPercent

Applies To: NStackBarPresentGroup

Type: Long

Remarks: Controls the width of bars in percents of the floor grid cell width.

Example:

bar.WidthPercent = 50 'half the cell width


Common

Name: Common

Applies To: NStackLinePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = bar.Common()


HasValuePoints

Name: HasValuePoints

Applies To: NStackLinePresentGroup

Type: Boolean

Remarks: Controls the visibility of the value points.

Example:

function.HasValuePoints = True 'show the value points


LineStyle

Name: LineStyle

Applies To: NStackLinePresentGroup

Type: LinePresentStyle

Remarks: Controls the style of the lines. Valid values are

  • lpsTube - the line segments are displayed as cylineders
  • lpsTape - the line segments are displayed as rectangles
  • lpsLine - the line segments are displayed as simple lines

    Example:

    line.LineStyle = lpsTube ' the line is displayed as tube

            •


LineWidth

Name: LineWidth

Applies To: NStackLinePresentGroup

Type: Single

Remarks: Controls the width of the line in OpenGL units when LineStyle is lpsTube or lpsTape.

Example:

line.LineWidth = 0.10 'the line width is 0.10 OpenGL units


PointSize

Name: PointSize

Applies To: NStackLinePresentGroup

Type: Single

Remarks: Controls the size of the value points in OpenGL units.

Example:

function.PointSize = 0.20


PointStyle

Name: PointStyle

Applies To: NStackLinePresentGroup

Type: PointStyle

Remarks: Controls the style of the value points. Valid values are:

  • psBar
  • psCylinder
  • psCone
  • psInvertedCone
  • psPyramid
  • psInvertedPyramid
  • psSphere
  • psCircle
  • psDiamond
  • psCross
  • psDiagonalCross
  • psStar

    Example:

    function.PointStyle = psCone 'change the point style to cone

            •


StackStyle

Name: StackStyle

Applies To: NStackLinePresentGroup

Type: StackStyle

Remarks: Controls the stacking style of the lines. Valid values are:

  • ssStacked - normal stacked line chart
  • ssStackedPercent - stacked percent chart. Each item shows the contribution to the overal item sum.

    Example:

    bar.StackStyle = ssStackedPercent 'stack percent line chart

            •


Stairs

Name: Stairs

Applies To: NStackLinePresentGroup

Type: Boolean

Remarks: When set to True the area is drawn in stairs mode.

Example:

line.Stairs = True


CandleDepthPercent

Name: CandleDepthPercent

Applies To: NStockPresentGroup

Type: Long

Remarks: Controls the candle depth in percents of the chart floor grid depth. Valid only if the CandleStyle property is set to csBar.

Example:

stock.CandleDepthPercent = 45


CandleStyle

Name: CandleStyle

Applies To: NStockPresentGroup

Type: CandleStyle

Remarks: Controls the shape of the candle. Valid values are:

  • csBar - bar beginning from the Open value (Value1) and ending at the Close value (Value4)
  • csStick - the Open and Close values are displayed as lines and the user can show and hide them with the help of the ShowOpen and ShowClose properties

    Example:

    stock.CandleStyle = csStick

            •


CandleWidth

Name: CandleWidth

Applies To: NStockPresentGroup

Type: Single

Remarks: Controls the width of the candle in OpenGL units.

Example:

stock.CandleWidth = 0.20 'candle is 0.20 in width


Common

Name: Common

Applies To: NStockPresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = stock.Common()


HasVolume

Name: HasVolume

Applies To: NStockPresentGroup

Type: Boolean

Remarks: Controls the visibility of the stock volume bar.

Example:

stock.HasVolume = True 'show the traded volume bar


ShowClose

Name: ShowClose

Applies To: NStockPresentGroup

Type: Boolean

Remarks: Controls the visibility of the close value. Valid if CandleStyle is csStick.

Example:

stock.ShowClose = False ' hide the close stock tick


ShowHighLow

Name: ShowHighLow

Applies To: NStockPresentGroup

Type: Boolean

Remarks: Controls the visibility of the high - low values. By default set to True.

Example:

stock.ShowHighLow = False ' hide the high - low values


ShowOpen

Name: ShowOpen

Applies To: NStockPresentGroup

Type: Boolean

Remarks: Controls the visibility of the open value. Valid if CandleStyle is csStick.

Example:

stock.ShowOpen = False ' hide the open stock tick


UseVolumeOrigin

Name: UseVolumeOrigin

Applies To: NStockPresentGroup

Type: Boolean

Remarks: Turns on and off volume origin. When set to True the stock uses the VolumeOrigin property. When set to False the bars begin from the maximal possible value.

Example:

stock.UseOrigin = True
stock.VolumeOrigin = 10 ' bars begin from value 10


UseXValue

Name: UseXValue

Applies To: NStockPresentGroup

Type: Boolean

Remarks: Use Value6 as X coordinate of the data point. You must manually switch the categories axis in value, datetime or logarithmic mode.

Example:

stock.UseXValue = True
NChart1.Axes(atCategoriesAxis).ScaleMode = asmValue


VolumeAxis

Name: VolumeAxis

Applies To: NStockPresentGroup

Type: AxisType

Remarks: Specifies a secondary axis for the traded volume bars. This is required because the traded volume has different measure compared to the stock open-hi-low-close values.

Example:

stock.VolumeAxis = atFrontAxis 'scale the volume bars on the front axis


VolumeDepthPercent

Name: VolumeDepthPercent

Applies To: NStockPresentGroup

Type: Long

Remarks: Controls the volume depth in percents of the chart floor grid depth.

Example:

stock.VolumeDepthPercent = 45


VolumeEdgePercent

Name: VolumeEdgePercent

Applies To: NStockPresentGroup

Type: Long

Remarks: Controls the volume edge in percents of the smaller bar dimension (width or depth). Valid only if VolumeStyle is bsSmoothEdgeBar.

Example:

stock.VolumeEdgePercent = 55


VolumeHasBottomEdge

Name: VolumeHasBottomEdge

Applies To: NStockPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge volume bars have a bottom edge. By default False.

Example:

stock.VolumeHasBottomEdge = True


VolumeHasTopEdge

Name: VolumeHasTopEdge

Applies To: NStockPresentGroup

Type: Boolean

Remarks: When set to True the cut edge and smooth edge volume bars have a top edge. By default True.

Example:

stock.VolumeHasTopEdge = True


VolumeOrigin

Name: VolumeOrigin

Applies To: NStockPresentGroup

Type: Double

Remarks: Specifies the volume bars origin value when UseOrigin is set to True. By default 0.

Example:

stock.UseOrigin = True
stock.VolumeOrigin = 10 ' bars begin from value 10


VolumeStyle

Name: VolumeStyle

Applies To: NStockPresentGroup

Type: BarStyle

Remarks: Controls the shape of the volume bar. Valid values are:

  • bsBar
  • bsCylinder
  • bsCone
  • bsInvertedCone
  • bsPyramid
  • bsInvertedPyramid
  • bsSmoothEdgeBar

    Example:

    stock.VolumeStyle = bsPyramid

            •


VolumeWidth

Name: VolumeWidth

Applies To: NStockPresentGroup

Type: Single

Remarks: Controls the width of the volume bars in OpenGL units.

Example:

stock.VolumeWidth = 0.30


AutomaticPalette

Name: AutomaticPalette

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: When set to True the component uses the automatic surface palette. The automatic palette entry count is synchronized with the tick count of the axis. When set to False the component uses a custom defined palette.

Example:

surface.AutomaticPalette = True


Common

Name: Common

Applies To: NSurfacePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NPresentGroupCommon object of the presentation group.

Example:

Dim common As NPresentGroupCommon
Set common = surface.Common()


DrawFlat

Name: DrawFlat

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: Draws the surface in flat mode (Contour chart). The PositionMode and PositionValue properties determine the vertical position of the surface.

Example:

surface.DrawFlat = True


FillStyle

Name: FillStyle

Applies To: NSurfacePresentGroup

Type: SurfaceFillStyle

Remarks: Controls the way in which the surface is filled. Valid values are:

  • sfsFillNone - no filling at all
  • sfsFillMesh - filling is applied on the segments between 4 adjacent data points
  • sfsFillZone - filling is applied on surface elevation zones.

    Example:

    surface.FillStyle = sfsFillZone ' set zoned filling

            •


FrameLine

Name: FrameLine

Applies To: NSurfacePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the NLineProperties applied on the surface frame. The line color affect the frame only if the PaletteFrame flag is set to False.

Example:

Dim lineprops As NLineProperties
Set lineprops = surface.FrameLine()


FrameStyle

Name: FrameStyle

Applies To: NSurfacePresentGroup

Type: SurfaceFrameStyle

Remarks: Controls the surface frame style. Supported values are:

  • sfsFrameNone - no frame at all
  • sfsFrameMesh - frame connecting the adjacent data points.
  • sfsFrameContour - contour lines at specific surface elevations
  • sfsFrameMeshContour - mixed mesh and contour frame
  • sfsFrameDots - dots at the data points

    Example:

    surface.FrameStyle = sfsFrameContour

            •


OptimizeTriangulation

Name: OptimizeTriangulation

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: This property is taken into consideration only when the surface uses X and/or Y values for its points. If the property is set to False then the input set of points is triangulated on every frame. If the property is set to True then the triangulation of the surface is pre-calculated only once and stored into memory, so that the surface is rendered faster. The surface can be explicitly triangulated again with the ReTriangulate method. If the optimization is turned on and you want to add new points to the surface or modify some existing points, you will have to call ReTriangulate after adding/modifying.

Example:

surface.UseXValue = True 'User defined x coordinates for each point
surface.UseYValue = True 'User defined y coordinates for each point
surface.OptimizeTriangulation = True 'Precalculate the triangulation and store it (for faster rendering)
...
NChart1.DataAt(0, 0, 0).Value2 = 3 'Change the data for some points
NChart1.DataAt(1, 0, 0).Value3 = 7
surface.ReTriangulate 'Rebuild the triangulation in order to show the changes


Palette

Name: Palette

Applies To: NSurfacePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the palette object attached to the presentation group.

Example:

Dim palette As NPalette
Set palette = surface.Palette()


PaletteFill

Name: PaletteFill

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: Turns on and off palette filling. This flag has effect only if fill style is sfsFillZone, because zone filling uses only palette filling. When set to False the filling of the surface is provided from the data points or the uniform appearances of the presentation group depending on the EnableUniformAppearances flag


PaletteFrame

Name: PaletteFrame

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: When set to True the frame is displayed with the current palette (automatic or manual). When set to False the frame is displayed with the line properties accessible with the FrameLine method.

Example:

surface.FrameLine. = sfsFrameContour


PaletteSteps

Name: PaletteSteps

Applies To: NSurfacePresentGroup

Type: Long

Remarks: Controls the number of entries in the automatic palette if the SyncPaletteWithAxisScale is set to False. Valid only when AutomaticPalette is set to True.

Example:

surface.PaletteSteps = 23


PaletteTransparency

Name: PaletteTransparency

Applies To: NSurfacePresentGroup

Type: Long

Remarks: This property controls the transparency of the palette applied on the surface.

Example:

surface.PaletteTransparency = 50


PositionMode

Name: PositionMode

Applies To: NSurfacePresentGroup

Type: SurfacePositionMode

Remarks: The PositionMode property controls the vertical position of the surface, when it is rendered in flat mode (DrawFlat property is set to True).

  • spmFloor - the surface is positioned at the chart floor
  • spmCeiling - the surface is positioned at the chart ceiling
  • spmCustom - the user specifies the position of the surface with the PositionValue property

    Example:

    surface.PositionMode = spmFloor

            •


PositionValue

Name: PositionValue

Applies To: NSurfacePresentGroup

Type: Double

Remarks: The PositionValue property specifies the vertical position of the surface when PositionMode is spmCustom.

Example:

surface.PositionValue = spmFloor


ReTriangulate

Name: ReTriangulate

Applies To: NSurfacePresentGroup

Parameters: None

Return Value: None

Remarks: Re-reads the input data and rebuilds the surface triangulation. This method is useful only for surfaces that work with user provided X and/or Y coordinates for the points and only if the OptimizeTriangulation property is set to True. In such case the triangulation is pre-calculated and stored internally for better rendering performance. This means that if data is added or modified in the data storage the changes will not take effect until you call ReTriangulate.

Example:

surface.ReTriangulate()


SidesBorder

Name: SidesBorder

Applies To: NSurfacePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the line properties object attached on the surface sides. Valid when VisibleSurfaceSides property is set to True.

Example:

surface.SidesBorder.Color = vbYellow


SidesFillEffect

Name: SidesFillEffect

Applies To: NSurfacePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the fill effect object attached on the surface sides. Valid when VisibleSurfaceSides property is set to True.

Example:

surface.SidesFillEffect.SetSolidColor vbRed


SidesMaterial

Name: SidesMaterial

Applies To: NSurfacePresentGroup

Parameters: None

Return Value: Object

Remarks: Gives you access to the material object attached on the surface sides. Valid when VisibleSurfaceSides property is set to True.

Example:

surface.SidesMaterial.SetAmbientDiffuseColor vbBlue


SidesOrigin

Name: SidesOrigin

Applies To: NSurfacePresentGroup

Type: Double

Remarks: Controls the origin value of the surface sides when SidesOriginMode is set to somCustom. By default 0.

Example:

surface.SidesOrigin = 10


SidesOriginMode

Name: SidesOriginMode

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: Controls the origin mode of the surface sides. The possible values are: somFloor - the surface sides begin from the minimal possible value; somCeiling - the surface sides begin from the max value; somCustom - the surface sides begin from a custom value defined by the SurfaceSidesOrigin property.

Example:

surface.SidesOriginMode = somCeiling


SmoothPalette

Name: SmoothPalette

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: When set to True the component gradients the palette on the surface segments.

Example:

surface.SmoothPalette = True


SurfaceHoles

Name: SurfaceHoles

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: This property allows displaying of holes in the surface. It is mutually exclusive with the UseXValue and UseYValue properties. This means that surface holes can be shown only for surfaces with grid-calculated X and Y coordinates. If UseXValue or UseYValue is set to True then SurfaceHoles is not taken into consideration. If SurfaceHoles is set to True then Value2 specifies whether a point is "valid" or "invalid". If Value2 equals 0 for a particular point, then the point is "valid". If Value2 is different from 0, the point is considered "invalid". All the square segments in which an "invalid" point participates as an edge are not rendered.

Example:

surface.SurfaceHoles = True


SyncPaletteWithAxisScale

Name: SyncPaletteWithAxisScale

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: Synchronizes the number of palette entries in the automatic palette with the current scale of the vertical axis on which the presentation group is displayed. Valid only when AutomaticPalette is set to True.

Example:

surface.SyncPaletteWithAxisScale = True


UseXValue

Name: UseXValue

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: When this property is set to True the surface uses Value2 of each data item as an X coordinate of the corresponding point in the surface. Otherwise the X coordinate is calculated from the position of the data item in the data grid. If the surface works with user defined X-Values then the categories axis must operate in value scale mode.

Example:

surface.UseXValue = True
NChart1.Axes(atCategoriesAxis).ScaleMode = asmValue


UseYValue

Name: UseYValue

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: When this property is set to True the surface uses Value3 of each data item as an Y coordinate of the corresponding point in the surface. Otherwise the Y coordinate is calculated from the position of the data item in the data grid.If the surface works with user defined Y-Values then the series axis must operate in value scale mode.

Example:

surface.UseYValue = True
NChart1.Axes(atSeriesAxis).ScaleMode = asmValue


VisibleSurfaceSides

Name: VisibleSurfaceSides

Applies To: NSurfacePresentGroup

Type: Boolean

Remarks: Controls the visibility of the surface sides surrounding the surface.

Example:

surface.VisibleSurfaceSides = True


GetColor

Name: GetColor

Applies To: NSystemPalette

Parameters:

Long nIndex

Return Value: OLE_COLOR

Remarks: Gets the color of the palette at the specified index. The nIndex parameter must be in the range 0 - 47.

Example:

Dim palette As NSystemPalette
Set palette = NevronControl.PaletteManager.GetPaletteByName "MyPalette"
color = palete.GetColor()


PaletteName

Name: PaletteName

Applies To: NSystemPalette

Type: String

Remarks: Specifies the name of the palette. If the palette is predefined the user is not able to modify it. If the user tries to modify the name of the name of a custom palette, but there is already such a palette the method will again fail.

Example:

Label.OriginHorzAlign = haLeft


PredefinedPalette

Name: PredefinedPalette

Applies To: NSystemPalette

Type: Boolean

Remarks: Indicates wheather the palette is predefined or not

Example:

Label.Text = "This is a label"


SetColor

Name: SetColor

Applies To: NSystemPalette

Parameters:

Long nIndex

OLE_COLOR Color

Return Value: None

Remarks: Sets the color of the palette at the specified index. The nIndex parameter must be in the range 0 - 47.

Example:

Dim palette As NSystemPalette
Set palette = NevronControl.PaletteManager.GetPaletteByName "MyPalette"
palete.SetColor(20, RGB(45,24,236))


Backplane

Name: Backplane

Applies To: NTextEx

Parameters: None

Return Value: Object

Remarks: Gives you access to the NBackplane object associated with the back plane of the text.

Example:

NTextEx.Backplane.FillEffect.SetSolidColor vbRed ' set the back plane color to red


Extrusion

Name: Extrusion

Applies To: NTextEx

Type: Single

Remarks: Controls the extrusion of the 3D text. Increase the extrusion if you want a 3D text with bigger depth. The Extrusion is specified in OpenGL units.

Example:

TextEx.Extrusion = 0.1


FillEffect

Name: FillEffect

Applies To: NTextEx

Parameters: None

Return Value: Object

Remarks: Gives you access to the NFillEffect object associated with the text. Note that you cannot apply gradients, textures, animations or patterns to the text if it is in 2D mode.

Example:

NTextEx.FillEffect.SetSolidColor vbRed ' set the text color to red


Font

Name: Font

Applies To: NTextEx

Type: Object

Remarks: Controls the font of the text. Used for both in 2D and 3D mode.

Example:

TextEx.Font.Bold = True
TextEx.Font.Size = 10
TextEx.Font.Name = "Arial black"


HorzAlign

Name: HorzAlign

Applies To: NTextEx

Type: HorizontalAlign

Remarks: This property enables you to control the horizontal alignment of the texts around the text origin point. The possible values are haCenter, haLeft and haRight.

Example:

NTextEx.HorzAlign = haLeft 'align to the left


InitFromTextEx

Name: InitFromTextEx

Applies To: NTextEx

Parameters:

Object pTextEx

Return Value: None

Remarks: This method initializes the component from another TextEx object

Example:

FillEffect.InitFromTextEx pTextExDisp


Material

Name: Material

Applies To: NTextEx

Parameters: None

Return Value: Object

Remarks: Gives you access to the NMaterial object associated with the text. The material properties take effect only when the NTextEx object is in 3D mode and lighting is enabled.

Example:

TextEx.Material.AmbientColor = RGB(25, 25, 25) 'modify the ambient material of the text


OffsetX

Name: OffsetX

Applies To: NTextEx

Type: Long

Remarks: Controls the horizontal offset the text origin point from the text base point. The value is given in pixels. The default value is 0.

Example:

NTextEx.OffsetX = 10 'offset to the right


OffsetY

Name: OffsetY

Applies To: NTextEx

Type: Long

Remarks: Controls the vertical offset the text origin point from the text base point. The value is given in pixels. The default value is 0.

Example:

NTextEx.OffsetY = 10 'offset to the bottom


Orientation

Name: Orientation

Applies To: NTextEx

Type: Long

Remarks: Controls the orientation of the 2D texts in degrees. The default value is 0.

Example:

NTextEx.Orientation = 45


OriginDistance

Name: OriginDistance

Applies To: NTextEx

Type: Single

Remarks: This property controls the distance of the text origin point from the base point. The base point is set by the control and cannot be changed. For example if you have a category axis it will position the base points of the texts at the coordinates of the axis ticks. By using the OriginRotation, OriginElevation and OriginDistance properties you can control the polar coordinates of the text origin point relative to the base point set by the control. This property does not impact the texts if the NTextEx object is working in 2D mode. The OriginDistance is in OpenGL units.

Example:

TextEx.OriginDistance = 0.2 'set some origin distance


OriginElevation

Name: OriginElevation

Applies To: NTextEx

Type: Single

Remarks: This property controls the elevation of the text origin point from the base point. The base point is set by the control and cannot be changed. For example if you have a category axis it will position the base points of the texts at the coordinates of the axis ticks. By using the OriginRotation, OriginElevation and OriginDistance properties you can control the polar coordinates of the text origin point relative to the base point set by the control. This property does not impact the texts if the NTextEx object is working with 2D mode.

Example:

TextEx.OriginElevation = 90 'set some elevation


OriginRotation

Name: OriginRotation

Applies To: NTextEx

Type: Single

Remarks: This property controls the rotation of the text origin point around the base point. The base point is set by the control and cannot be changed. For example if you have a category axis it will position the base points of the texts at the coordinates of the axis ticks. By using the OriginRotation, OriginElevation and OriginDistance properties you can control the polar coordinates of the text origin point relative to the base point set by the control. This property does not impact the texts if the NTextEx object is working in 2D mode.

Example:

TextEx.OriginRotation = 90 'rotate at 90 degrees


RotateAroundXAxis

Name: RotateAroundXAxis

Applies To: NTextEx

Type: Single

Remarks: Rotates the 3D text around the X axis.

Example:

TextEx.RotateAroundXAxis = 45


RotateAroundYAxis

Name: RotateAroundYAxis

Applies To: NTextEx

Type: Single

Remarks: Rotates the 3D text around the Y axis.

Example:

TextEx.RotateAroundYAxis = 45


RotateAroundZAxis

Name: RotateAroundZAxis

Applies To: NTextEx

Type: Single

Remarks: Rotates the 3D text around the Z axis.

Example:

TextEx.RotateAroundZAxis = 45


ShowDialog

Name: ShowDialog

Applies To: NTextEx

Parameters: None

Return Value: Long

Remarks: Shows the NTextEx properties dialog at runtime. The return value indicates whether the user pressed the Ok button.


TextOverlapsImage

Name: TextOverlapsImage

Applies To: NTextEx

Type: Boolean

Remarks: When the NTextEx object is in 2D mode you can choose whether your 2D texts must always overlap the 3D image or be rendered with the z coordinate of their origin point. When TextOverlapsImage is TRUE all 2D texts overlap the 3D image regardless of the origin point z coordinate. Lets look at some example - suppose that you have a bar chart with multiple categories and series and the bars from the second serie have smaller values. You want to see the values of all bars regardless whether they are visible or not - in this case you should turn on the TextOverlapsImage property of the NTextEx object associated with the bar present group.

Example:

NTextEx.TextOverlapsImage = FALSE 'render 2D texts with the z coordinate of the text origin point


Use2DText

Name: Use2DText

Applies To: NTextEx

Type: Boolean

Remarks: Controls the mode of the NTextEx object. When TRUE the NTextEx is in 2D mode otherwise the NTextEx will display 3D texts.

Example:

TextEx.Use2DText = TRUE 'I want to use 2D (GDI like) texts


VertAlign

Name: VertAlign

Applies To: NTextEx

Type: VerticalAlign

Remarks: This property enables you to control the vertical alignment of the texts around the text origin point. The possible values are vaCenter, vaTop, vaBottom.

Example:

NTextEx.VertAlign = vaBottom 'align to the bottom


PAGradientScheme

Overview An enumeration used to identify the different predefined advanced gradients. For more information see the description of the SetPredefinedAdvancedGradient method of the NFillEffect object.

Values
gsCustom = 0
gsWhiteOnBlack = 1
gsWhiteOnRed = 2
gsWhiteOnGreen = 3
gsWhiteOnBlue = 4
gsRed = 5
gsGreen = 6
gsBlue = 7
gsSunset = 8
gsNightFall1 = 9
gsNightFall2 = 10
gsOcean1 = 11
gsOcean2 = 12
gsOcean3 = 13
gsOcean4 = 14
gsCalmWater1 = 15
gsCalmWater2 = 16
gsDesert1 = 17
gsDesert2 = 18
gsFire1 = 19
gsFire2 = 20
gsFog1 = 21
gsFog2 = 22
gsMahagony1 = 23
gsMahagony2 = 24


PaletteManager

Type topic text here.


PaperOrientation

Overview The paper orientation when printing. For more information see the NPrintManager object description in the Object Reference.

Values
poLandscape = 0
poPortrait = 1


PieGroupMode

Overview Defines the grouping mode the of the pie slices

Values
pgmNone = 0
pgmBelowValue = 1
pgmBelowPercent = 2


PieOrderMode

Overview Defines the grouping mode the of the pie slices

Values
pomNone = 0
pomAscending = 1
pomDescending = 2


PieStyle

Overview This custom type is used by the PieStyle property of the NPiePresentGroup object and determine the style of the of the pie segments.

Values
psPie = 0
psTorus = 1
psSmoothEdgePie = 2


PointStyle

Overview Defines the possible point shapes. This custom type is used by presentation groups that display data value points.

Values
psBar = 0
psCylinder = 1
psCone = 2
psInvertedCone = 3
psPyramid = 4
psInvertedPyramid = 5
psSphere = 6
psCircle = 7
psDiamond = 8
psCross = 9
psDiagonalCross = 10
psStar = 11


PredefinedAxisTextPosition

Overview This enumeration is used to define the predefined axis text positions. It is accepted by the SetPredefinedTextPosition method of the NAxis object and helps you easily position the axis text in accordance with the current projection

Values
patpVertical = 0
patpHorizontalLeft = 1
patpHorizontalRight = 2


PredefinedFunction

Overview Predefined functions for the function present group.

Values
pfAdd = 0
pfSub = 1
pfMul = 2
pfDiv = 3
pfPow = 4
pfAbs = 5
pfHigh = 6
pfLow = 7
pfCount = 8
pfAverage = 9
pfSum = 10
pfMin = 11
pfMax = 12
pfCumSum = 13
pfStdDev = 14
pfExpAvg = 15
pfSMA = 16
pfWMA = 17
pfEMA = 18
pfMMA = 19
pfMomentum = 20
pfMomentumDiv = 21
pfStochastic = 22
pfRSI = 23
pfBollingerUpper = 24
pfBollingerLower = 25
pfRMS = 26
pfMACD = 27
pfTrueRange = 28
pfATR = 29
pfDiPos = 30
pfDiNeg = 31
pfDMI = 32
pfADX = 33


PredefinedProjection

Overview Nevron controls posses eighteen predefined projections that enable you to set all the projection parameters with one function call.

Values
pp2D = 0
pp2DHorizontalLeft = 1
pp2DHorizontalRight = 2
pp2DTop = 3
pp2DTopHorizontalLeft = 4
pp2DTopHorizontalRight = 5
pp2DHalf = 6
pp2DHalfHorizontalLeft = 7
pp2DHalfHorizontalRight = 8
pp2DHalfTop = 9
pp2DHalfTopHorizontalLeft = 10
pp2DHalfTopHorizontalRight = 11
pp3D = 12
pp3DHorizontalLeft = 13
pp3DHorizontalRight = 14
pp3DTop = 15
pp3DTopHorizontalLeft = 16
pp3DTopHorizontalRight = 17


PresentGroupLegendMode

Overview Defines the modes in which the presentation groups fills the legend. This custom type is used by the LegendMode property of the NPresentGroup common object. See the Configuring the Legend topic for more information

Values
pglmCategories = 0
pglmSeries = 1
pglmDataItems = 2
pglmUniformAppearances = 3
pglmPresentationGroup = 4
pglmPresentationGroupCustom = 5


PresentGroupType

Overview Defines the currently supported charting types. This custom type is passed as a parameter to the Add method of the NPresentGroupCollection object and determines the type of the newly created presentation group.

Values
pgtBar = 0
pgtStackBar = 1
pgtLine = 2
pgtStackLine = 3
pgtArea = 4
pgtStackArea = 5
pgtSurface = 6
pgtPoint = 7
pgtBubble = 8
pgtStock = 9
pgtFloatBar = 10
pgtPie = 11
pgtDoughnut = 12
pgtRadar = 13
pgtPolar = 14
pgtShmoo = 15
pgtHighLow = 16
pgtMap = 17
pgtArrow = 18
pgtError = 19
pgtErrorBar = 20
pgtSmoothLine = 21
pgtFunction = 22


PTProjectionType

Overview Defines the projection type. For more information see the N3DView object description in the Object Reference.

Values
ptPerspective = 0
ptOrthogonal = 1


RadarStyle

Overview Defines the possible radar styles. This custom type is accepted by the RadarStyle property of the NRadarPresentGroup object. When set to rsLines the radar is displayed as lines only. When set to rsFilledArea the radar fills the area surrounded by the lines connecting the radar data points.

Values
rsLines = 0
rsFilledArea = 1


ShapeDepthMode

Overview Depth modes for the map presentation group shapes.

Values
sdmNone = 0
sdmByValue = 1
sdmByOrder = 2


ShowTooltips

Overview Defines how a NMouseResponse object should synchronize with the general control settings for displaying tooltips.

Values
stSynchronizeWithControl = 0
stShowTooltips = 1
stDoNotShowTooltips = 2


Smooth Line Present Group

Type topic text here.


StackStyle

Overview Controls the stack style of the stacking presentation groups

Values
ssStacked = 0
ssStackedPercent = 1


SurfaceFillStyle

Overview Controls the fill style of the surface. This custom type is accepted by the FillStyle property of the NSurfacePresentGroup object.

Values
sfsFillNone = 0
sfsFillMesh = 1
sfsFillZone = 2


SurfaceFrameStyle

Overview Controls the frame style of the surface. This custom type is accepted by the FrameStyle property of the NSurfacePresentGroup object.

Values
sfsFrameNone = 0
sfsFrameMesh = 1
sfsFrameContour = 2
sfsFrameMeshContour = 3
sfsFrameDots = 4


SurfacePositionMode

Overview Controls the possible surface position modes, which are taken into account when the surface is rendered in flat mode (contour chart)

Values
spmFloor = 0
spmCeiling = 1
spmCustom = 2


SurfaceSidesOriginMode

Overview Possible position modes of the surface sides origin.

Values
somFloor = 0
somCeiling = 1
somCustom = 2


VerticalAlign

Overview The vertical alignment relative to the text origin (margin) point.

Values
vaCenter = 0
vaTop = 1
vaBottom = 2


WallStyle

Overview Defines the shape of the chart walls

Values
wsBar = 0
wsSmoothEdgeBar = 1
wsCutEdgeBar = 2


WinColor

Overview Sometimes it is very useful to synchronize the colors displayed by your control with the Windows appearance settings. The WinColor enumeration enumerates the colors from the Windows appearance settings. Form more information see the NFillEffect object description in the Object Reference.

Values
wc3dDkShadow = 0
wc3dFace = 1
wcBtnFace = 2
wc3dHiLight = 3
wc3dHighLight = 4
wcBtnHiLight = 5
wcBtnHighLight = 6
wc3dLight = 7
wc3dShadow = 8
wcBtnShadow = 9
wcActiveBorder = 10
wcActiveCaption = 11
wcAppWorkspace = 12
wcBackground = 13
wcDesktop = 14
wcBtnText = 15
wcCaptionText = 16
wcGrayText = 17
wcHighLight = 18
wcHighLightText = 19
wcInactiveBorder = 20
wcInacitveCaption = 21
wcInacitveCaptionText = 22
wcInfoBk = 23
wcInfoText = 24
wcMenu = 25
wcMenuText = 26
wcScrollBar = 27
wcWindow = 28
wcWindowFrame = 29
wcWindowText = 30