Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDArrayMBS class.

Previous items Next items

CDArrayMBS.mulArray(value as CDArrayMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 16.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies an array to the CDArrayMBS object.

The array will be multiplied by multiplying each array element with the corresponding element of the CDArrayMBS object.

ParameterDefaultDescription
Values(Mandatory)A CDArrayMBS with numbers to be multiplied to the CDArrayMBS object.

See also:

CDArrayMBS.mulArray(value() as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies an array to the CDArrayMBS object.
Example
dim src(-1) as Double = Array( 63.1, 10.15, 6.15, 2.88 )
dim data As New CDArrayMBS(array(2.0, 2.0, 2.0, 2.0))

data.mulArray( src )

dim lines(-1) as string

lines.Append str(data.count)+" values:"
lines.Append ""
lines.Append str(Data.getvalue(0))
lines.Append str(Data.getvalue(1))
lines.Append str(Data.getvalue(2))
lines.Append str(Data.getvalue(3))

MsgBox Join(lines,EndOfLine)

The array will be multiplied by multiplying each array element with the corresponding element of the CDArrayMBS object.

ParameterDefaultDescription
b(Mandatory)An array of numbers to be multiplied to the CDArrayMBS object.

See also:

CDArrayMBS.mulValue(value as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies a number to every element of the CDArrayMBS object.
Example
dim data As New CDArrayMBS(array(1.0, 2.0, 3.0, 4.0))

data.mulValue(5)

dim lines(-1) as string

lines.Append str(data.count)+" values:"
lines.Append ""
lines.Append str(Data.getvalue(0))
lines.Append str(Data.getvalue(1))
lines.Append str(Data.getvalue(2))
lines.Append str(Data.getvalue(3))

MsgBox Join(lines,EndOfLine)

ParameterDefaultDescription
b(Mandatory)A number to be multiplied to every element of the CDArrayMBS object.

Some examples using this method:

CDArrayMBS.percentile(p as Double) as double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the required percentile value of the elements of the CDArrayMBS object.

ParameterDefaultDescription
p(Mandatory)The percentile to get. It should be between 0 - 100.

CDArrayMBS.rate(offset as Integer = 1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Divides each element of the CDArrayMBS object by an earlier element in the same CDArrayMBS object.

ParameterDefaultDescription
offset1The difference in position between an element and the earlier element to divide it.

CDArrayMBS.replace(a as Double, b as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds elements that are equal to a given value and replace it with another value.

ParameterDefaultDescription
a(Mandatory)The value to be replaced.
b(Mandatory)The replacing value.

CDArrayMBS.result as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the content of the CDArrayMBS object as a memoryblock.

CDArrayMBS.selectEQZ

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is equal to zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectEQZ(decisionArray() as Double, fillValue as Double = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is equal to zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectGEZ

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is greater than or equal to zero.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectGEZ(decisionArray() as Double, fillValue as Double = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is greater than or equal to zero.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectGTZ

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is greater than zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectGTZ(decisionArray() as Double, fillValue as Double = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is greater than zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectLEZ

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is less than or equal to zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectLEZ(decisionArray() as Double, fillValue as Double = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is less than or equal to zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectLTZ

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is less than zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectLTZ(decisionArray() as Double, fillValue as Double = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object by checking if the elements of the given decisionArray is less than zero.

The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectNEZ

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectNEZ(decisionArray() as Double, fillValue as Double = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The selected elements will be left unchanged. The remaining elements will be replaced by the given fillValue.

If the decisionArray is empty, the CDArrayMBS object itself will function as the decision array.

ParameterDefaultDescription
decisionArray[Empty_Array]An array of numbers used to decide whether the corresponding elements in the CDArrayMBS object is selected or not.
fillValue0The value used to replace the elements that are not selected.

See also:

CDArrayMBS.selectRegularSpacing(majorTickStep as Integer, minorTickStep as Integer = 0, initialMargin as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects an evenly spaced subset of elements of the CDArrayMBS object.

The primary purpose of this method is to select the regularly spaced elements as ticks on an enumerated axis.

For example, if the majorTickStep is 10, and minorTickStep is 5, this method will select one out of 10 elements as major tick elements, and one of out of 5 elements as minor tick elements.

Major tick elements will remain intact. The remaining minor ticks elements will have their values replaced with MinorTickOnly. Non-selected elements will have their values replaced with kNoValue, so they will not appear on the axis. The resulting array can be used directly in Axis.setLabels.

ParameterDefaultDescription
majorTickStep(Mandatory)The spacing between major ticks.
minorTickStep0The spacing between minor ticks. The default value of 0 means no minor tick will be used.
initialMargin0The position of the first tick.

CDArrayMBS.selectStartOfDay(majorTickStep as Integer = 1, initialMargin as Double = 10800.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object that represents a different day from the previous element.

This method assumes the elements of the CDArrayMBS object are dates/times.

The primary purpose of this method is to select the appropriate elements as ticks on an enumerated axis.

Suppose you want to plot a variable against time. The x-values of the data points will be an array of dates/times. If an enumerated x-axis is used (see
Axis.setLabels), there will be a tick at every data point, which may be too dense if there are too many data points.

This method can be used to reduce the ticks to one tick per day (or one tick per multiple days). This is by selecting the dates/times in the data array only if it is not the same day as the previous element in the array. The selected elements will be left unchanged, while the elements not select will be replaced by kNoValue. The resulting array can be used directly in Axis.setLabels.

For the first data point, there is no previous data point to compare, so it is handled differently. The first data point will be selected if it is near the beginning of the day it represents. By default, near means within 3 hours (10800 seconds). This is configurable using the initialMargin argument.

Note that if the data points does not have data in a certain time range, no element can be selected in that time range, and so there will be no tick for that time range. This is appropriate for many chart types, such as finance charts, in which missing time ranges (non-trading hours, holidays, etc) are traditionally skipped.

However, if the data points may contain missing time ranges, but the ticks cannot be skipped, it may be more appropriate to use a non-enumerated x-axis by using Layer.setXData and Axis.setDateScale.

ParameterDefaultDescription
majorTickStep1The tick step. The default value of 1 means one tick per day. A value of n means one tick per n days.
initialMargin10800The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the day it represents. The default is 3 hours (10800 seconds).

CDArrayMBS.selectStartOfHour(majorTickStep as Integer = 1, initialMargin as Double = 300.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object that represents a different hour from the previous element.

This method assumes the elements of the CDArrayMBS object are dates/times.

The primary purpose of this method is to select the appropriate elements as ticks on an enumerated axis.

Suppose you want to plot a variable against time. The x-values of the data points will be an array of dates/times. If an enumerated x-axis is used (see
Axis.setLabels), there will be a tick at every data point, which may be too dense if there are too many data points.

This method can be used to reduce the ticks to one tick per hour (or one tick per multiple hours). This is by selecting the dates/times in the data array only if it is not the same hour as the previous element in the array. The selected elements will be left unchanged, while the elements not select will be replaced by kNoValue. The resulting array can be used directly in Axis.setLabels2.

For the first data point, there is no previous data point to compare, so it is handled differently. The first data point will be selected if it is near the beginning of the hour it represents. By default, near means within 300 seconds. This is configurable using the initialMargin argument.

Note that if the data points does not have data in a certain time range, no element can be selected in that time range, and so there will be no tick for that time range. This is appropriate for many chart types, such as finance charts, in which missing time ranges (non-trading hours, holidays, etc) are traditionally skipped.

However, if the data points may contain missing time ranges, but the ticks cannot be skipped, it may be more appropriate to use a non-enumerated x-axis by using Layer.setXData and Axis.setDateScale.

ParameterDefaultDescription
majorTickStep1The tick step. The default value of 1 means one tick per hour. A value of n means one tick per n hours.
initialMargin300The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the hour it represents. The default is 300 seconds.

CDArrayMBS.selectStartOfMinute(majorTickStep as Integer = 1, initialMargin as Double = 5.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 15.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the array that represents a different minute from the previous element.

This method assumes the elements of the ArrayMath object are dates/times.

The primary purpose of this method is to select the appropriate elements as ticks on an enumerated axis.

Suppose you want to plot a variable against time. The x-values of the data points will be an array of dates/times. If an enumerated x-axis is used (see CDAxisMBS.setLabels), there will be a tick at every data point, which may be too dense if there are too many data points.

This method can be used to reduce the ticks to one tick per minute (or one tick per multiple minutes). This is by selecting the dates/times in the data array only if it is not the same minute as the previous element in the array. The selected elements will be left unchanged, while the elements not select will be replaced by kNoValue. The resulting array can be used directly in CDAxisMBS.setLabels2.

For the first data point, there is no previous data point to compare, so it is handled differently. The first data point will be selected if it is near the beginning of the minute it represents. By default, near means within 5 seconds. This is configurable using the initialMargin argument.

Note that if the data points does not have data in a certain time range, no element can be selected in that time range, and so there will be no tick for that time range. This is appropriate for many chart types, such as finance charts, in which missing time ranges (non-trading hours, holidays, etc) are traditionally skipped.

However, if the data points may contain missing time ranges, but the ticks cannot be skipped, it may be more appropriate to use a non-enumerated x-axis by using CDLayerMBS.setXData and CDAxisMBS.setDateScale3 (or CDAxisMBS.setDateScale or CDAxisMBS.setDateScale2).

ArgumentDefaultDescription
majorTickStep1The tick step. A value of n means one tick per n minutes.
initialMargin5The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the minute it represents. The default is 5 seconds.

CDArrayMBS.selectStartOfMonth(majorTickStep as Integer = 1, initialMargin as Double = 432000.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object that represents a different month from the previous element.

This method assumes the elements of the CDArrayMBS object are dates/times.

The primary purpose of this method is to select the appropriate elements as ticks on an enumerated axis.

Suppose you want to plot a variable against time. The x-values of the data points will be an array of dates/times. If an enumerated x-axis is used (see
Axis.setLabels), there will be a tick at every data point, which may be too dense if there are too many data points.

This method can be used to reduce the ticks to one tick per month (or one tick per multiple months). This is by selecting the dates/times in the data array only if it is not the same month as the previous element in the array. The selected elements will be left unchanged, while the elements not select will be replaced by kNoValue. The resulting array can be used directly in
Axis.setLabels.

For the first data point, there is no previous data point to compare, so it is handled differently. The first data point will be selected if it is near the beginning of the month it represents. By default, near means within 5 days (432000 seconds). This is configurable using the initialMargin argument.

Note that if the data points does not have data in a certain time range, no element can be selected in that time range, and so there will be no tick for that time range. This is appropriate for many chart types, such as finance charts, in which missing time ranges (non-trading hours, holidays, etc) are traditionally skipped.

However, if the data points may contain missing time ranges, but the ticks cannot be skipped, it may be more appropriate to use a non-enumerated x-axis by using Layer.setXData and Axis.setDateScale.

ParameterDefaultDescription
majorTickStep1The tick step. The default value of 1 means one tick per month. A value of n means one tick per n months.
initialMargin432000The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the month it represents. The default is 5 days (432000 seconds).

CDArrayMBS.selectStartOfSecond(majorTickStep as Integer = 1, initialMargin as Double = 0.1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 15.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the ArrayMath object that represents a different second from the previous element.

This method assumes the elements of the ArrayMath object are dates/times.

The primary purpose of this method is to select the appropriate elements as ticks on an enumerated axis.

Suppose you want to plot a variable against time. The x-values of the data points will be an array of dates/times. If an enumerated x-axis is used (see CDAxisMBS.setLabels), there will be a tick at every data point, which may be too dense if there are too many data points.

This method can be used to reduce the ticks to one tick per second (or one tick per multiple seconds). This is by selecting the dates/times in the data array only if it is not the same second as the previous element in the array. The selected elements will be left unchanged, while the elements not select will be replaced by NoValue. The resulting array can be used directly in CDAxisMBS.setLabels2.

For the first data point, there is no previous data point to compare, so it is handled differently. The first data point will be selected if it is near the beginning of the second it represents. By default, near means within 0.1 second. This is configurable using the initialMargin argument.

Note that if the data points does not have data in a certain time range, no element can be selected in that time range, and so there will be no tick for that time range. This is appropriate for many chart types, such as finance charts, in which missing time ranges (non-trading hours, holidays, etc) are traditionally skipped.

However, if the data points may contain missing time ranges, but the ticks cannot be skipped, it may be more appropriate to use a non-enumerated x-axis by using CDLayerMBS.setXData and CDAxisMBS.setDateScale3 (or CDAxisMBS.setDateScale or CDAxisMBS.setDateScale2).

ArgumentDefaultDescription
majorTickStep1The tick step. A value of n means one tick per n seconds.
initialMargin0.1The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the second it represents. The default is 0.1 second.

CDArrayMBS.selectStartOfWeek(majorTickStep as Integer = 1, initialMargin as Double = 172800.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object that represents a different week from the previous element.

This method assumes the elements of the CDArrayMBS object are dates/times.

The primary purpose of this method is to select the appropriate elements as ticks on an enumerated axis.

Suppose you want to plot a variable against time. The x-values of the data points will be an array of dates/times. If an enumerated x-axis is used (see
Axis.setLabels), there will be a tick at every data point, which may be too dense if there are too many data points.

This method can be used to reduce the ticks to one tick per week (or one tick per multiple weeks). This is by selecting the dates/times in the data array only if it is not the same week as the previous element in the array. The selected elements will be left unchanged, while the elements not select will be replaced by kNoValue. The resulting array can be used directly in Axis.setLabels.

For the first data point, there is no previous data point to compare, so it is handled differently. The first data point will be selected if it is near the beginning of the week it represents. By default, near means within 2 days (172800 seconds). This is configurable using the initialMargin argument.

Note that if the data points does not have data in a certain time range, no element can be selected in that time range, and so there will be no tick for that time range. This is appropriate for many chart types, such as finance charts, in which missing time ranges (non-trading hours, holidays, etc) are traditionally skipped.


However, if the data points may contain missing time ranges, but the ticks cannot be skipped, it may be more appropriate to use a non-enumerated x-axis by using Layer.setXData and Axis.setDateScale.

ParameterDefaultDescription
majorTickStep1The tick step. The default value of 1 means one tick per week. A value of n means one tick per n weeks.
initialMargin172800The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the week it represents. The default is 2 days (172800 seconds).

CDArrayMBS.selectStartOfYear(majorTickStep as Integer = 1, initialMargin as Double = 5184000.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Selects the elements of the CDArrayMBS object that represents a different year from the previous element.

This method assumes the elements of the CDArrayMBS object are
dates/times. The primary purpose of this method is to select the appropriate elements as ticks on an enumerated axis.

Suppose you want to plot a variable against time. The x-values of the data points will be an array of dates/times. If an enumerated x-axis is used (see
Axis.setLabels), there will be a tick at every data point, which may be too dense if there are too many data points.

This method can be used to reduce the ticks to one tick per year (or one tick per multiple years). This is by selecting the dates/times in the data array only if it is not the same year as the previous element in the array. The selected elements will be left unchanged, while the elements not select will be replaced by kNoValue. The resulting array can be used directly in Axis.setLabels.

For the first data point, there is no previous data point to compare, so it is handled differently. The first data point will be selected if it is near the beginning of the year it represents. By default, near means within 60 days (5184000 seconds). This is configurable using the initialMargin argument.

Note that if the data points does not have data in a certain time range, no element can be selected in that time range, and so there will be no tick for that time range. This is appropriate for many chart types, such as finance charts, in which missing time ranges (non-trading hours, holidays, etc) are traditionally skipped.

However, if the data points may contain missing time ranges, but the ticks cannot be skipped, it may be more appropriate to use a non-enumerated x-axis by using Layer.setXData and Axis.setDateScale.

ParameterDefaultDescription
majorTickStep1The tick step. The default value of 1 means one tick per year. A value of n means one tick per n years.
initialMargin5184000The margin for the first data point. The first data point will be selected if it is within initialMargin number of seconds from beginning of the year it represents. The default is 60 days (5184000 seconds).

CDArrayMBS.shift(offset as Integer = 1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shifts the array "rightwards".

If the array does not have any kNoValue data points, this method will shift the point at position "n" to "n + offset". On the "right" side of the array (the side with the largest index), points that are shifted outside the array will be discarded. On the "left" side of the array, fillValue data points will be shifted in.

If the array contains kNoValue data points, these points are not shifted. Conceptually, one can imagine the non-NoValue points being shifted to the next non-NoValue positions, and the process repeats
offset number of times.

ParameterDefaultDescription
offset1The number of positions to shift the array "rightwards."
fillValuekNoValueThe new value to be shifted into the array.

See also:

CDArrayMBS.shift(offset as Integer, fillValue as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shifts the array "rightwards".

If the array does not have any kNoValue data points, this method will shift the point at position "n" to "n + offset". On the "right" side of the array (the side with the largest index), points that are shifted outside the array will be discarded. On the "left" side of the array, fillValue data points will be shifted in.

If the array contains kNoValue data points, these points are not shifted. Conceptually, one can imagine the non-NoValue points being shifted to the next non-NoValue positions, and the process repeats
offset number of times.

ParameterDefaultDescription
offset1The number of positions to shift the array "rightwards."
fillValuekNoValueThe new value to be shifted into the array.

See also:

CDArrayMBS.stdDev as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the stdDev value of the elements of the CDArrayMBS object.
Example
dim data As New CDArrayMBS(array(1.0, 2.0, 3.0, 4.0))
MsgBox str(data.stdDev) // shows 1.118034

CDArrayMBS.subArray(value as CDArrayMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 16.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Subtracts an array from the CDArrayMBS object.

The array will be subtracted by subtracting each array element from the corresponding element of the CDArrayMBS object.

ParameterDefaultDescription
Values(Mandatory)A CDArrayMBS with numbers to be subtracted from the CDArrayMBS object.

See also:

Previous items Next items

The items on this page are in the following plugins: MBS ChartDirector Plugin.


The biggest plugin in space...