Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

CDAxisMBS.setIndent(indent as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Specifies if the axis should be "indented" or not.
Notes:
Normally, the x-axis is automatically scaled so that x coordinate of first data point is at the beginning of the x-axis, and the x coordinate last data point is at the end of the axis. If a line layer is drawn, the line will span from the left border of the plot area to the right border of the plot area.

However, for bar layer, if the x-axis is scaled as above, half of the first bar and half of the last bar will be outside the plot area. The same applies to HLOC layers, candlestick layers and box-whisker layers.

When the axis is "indented", some margins will be reserved at the ends of the axis, so that all data representation are within the plot area.

By default, "indented" mode is automatically used in x-axis for charts that contain bar, HLOC, candlestick or box-whisker layers.

The setIndent method allows you to manually configure whether "indented" mode is used or not. One common usage is to align the x-axes in different charts.

For example, suppose a web page contains a bar chart and a line chart. The bar chart will be using "indented" mode x-axis, while the line chart will be using "non-indented" mode. If the two charts are on top of one another for ease of comparison (common for finance style charts), it is desirable that their x-axes should align. In this case, the setIndent method can be used to force the line chart to use indented mode x-axis.

ParameterDefaultDescription
indent(Mandatory)A true value sets the axis to indented mode. A false value sets the axis to non-indented mode.

Feedback, Comments & Corrections

CDAxisMBS.setLabelAlignment(alignment as Integer, minLabelSpace as Integer = 3)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 15.1 Yes Yes Yes Yes No
Function: Sets the label alignment.

Feedback, Comments & Corrections

CDAxisMBS.setLabelFormat(formatString as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the format for numeric or date/time axis labels.
Example:
dim c as CDAxisMBS

// you can use label formats like this:

c.setLabelFormat("<*block,halign=left*><*font=timesbi.ttf,size=12,underline=1*>{label}<*/font*><*br*>US$ {value}K ({percent}%)")

// we can reduce that to this:

c.setLabelFormat("{label} {value} {percent}%")

// and it shows 3 numbers. With |1 after the variable name, we define the decimals after dot:

c.setLabelFormat("{label} {value|1} {percent|1}%")

// and

c.setLabelFormat("{label} {value|1.,} {percent|1.,}%")

// uses dot for thousands and comma for decimal separator.
Notes:
By default, ChartDirector will try to guess if the axis represents numbers or dates. If the axis represents numbers, it will use "{value}" as the default format. If the axis represents dates, it will guess the format based on resolution of the dates (e.g. whether the dates contain hourly data or monthly data, etc). It may use formats such as {value|mm/dd/yy<*br*>hh:nn:ss}, {value|mm/dd/yy hh:nn:ss}, {value|mm/dd/yyyy}, {value|mm/yyyy} or {value|yyyy}.

Please refer to Parameter Substitution and Formatting on all available parameters and how to format them.

ParameterDefaultDescription
formatString(Mandatory)The format string.

Feedback, Comments & Corrections

CDAxisMBS.setLabelGap(d as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the distance between the axis labels and the ticks on the axis.
Notes:
ParameterDefaultDescription
d(Mandatory)The distance between the axis label and the tick in pixels.

Feedback, Comments & Corrections

CDAxisMBS.setLabelOffset(offset as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Shifts the axis labels from its default position along the axis.
Notes:
This method expects the offset along the axis being a value on the axis scale. The Box.setPos method of the axis label prototype (obtained using Axis.setLabelStyle) can also be used to shift the labels, with the offsets specified in pixel units.

ParameterDefaultDescription
offset(Mandatory)The distance to shift the labels along the axis as a value on the axis scale.

Feedback, Comments & Corrections

CDAxisMBS.setLabels(labels() as Double, formatString as string = "") as CDTextBoxMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the numeric/date/time labels to be used on the axis.
Notes:
This method is typically used to set the x-axis to enumerated scale. For more details on what is enumerated axis scale, please refer to
Axis.setLabels.

This method assumes the labels are in their "native" form (that is, not formatted). Please refer to Date Representation for the native date/time formats supported in ChartDirector.

If the labels are already formatted into human readable form (that is, they are text strings), use Axis.setLabels instead.

One common issue is that there may be too many labels on the axis. In this case, the Axis.setLabelStep method may be used show only a regularly spaced subset of labels on the axis.

For date/time labels, another alternative is to use Axis.setMultiFormat, which uses filters to select important dates/times (such as dates/times representing the start of a month) for display as labels.

A third method to avoid too many labels is to remove some labels by replacing them with kNoValue before passing them to ChartDirector. If you want to remove the label text but leave a minor tick, use MinorTickOnly as the label value.

labels(Mandatory)An array of numbers/dates to be used as the axis labels.
formatString""A format string to specified how to format the labels into human readable form. Please refer to Axis.setLabelFormat for the syntax of the format string. An empty string means the format will be automatically determined.

Return Value
A TextBox object representing the prototype of the obj. This may be used to fine-tune the appearance of the obj.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLabels(labels() as string) as CDTextBoxMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the text labels to be used on the axis.
Notes:
This method is typically used to set the x-axis to enumerated scale. In enumerated scale, the data points are associated with the x-axis by position. The first data point will be plotted at the first label position on the x-axis, the second data point at the second label position, and so on.

Enumerated axis is a very flexible axis type. It is most suitable for chart types where the data points are evenly spaced on the x-axis. The axis labels can be any text. They do not need to be numbers or dates. If they are numbers or dates, you can format them in any way you like before calling this method.

Internally, ChartDirector will assign a value of 0 to the first axis label, 1 to the second axis label, and so on. These values are not visible. Only the axis labels are visible. However, these values may be useful for some ChartDirector features that need to reference the axis position by value, such as adding mark lines using Axis.addMark.

By default, all axis labels will be associated major ticks. To associate a label with a minor tick, use '-' as the first character of the label. To draw a label without any tick at all, use '~' as the first character of the label.

Leading '-' or '~' characters are tick specification characters and will not appear on the labels. They just specify the the tick style to be associated with the labels. If you want have a label that actually begins these characters, add '\' as the first character as the escape character.

One common issue is that there may be too many labels on the axis. In this case, the Axis.setLabelStep method may be used show only a regularly spaced subset of labels on the axis.

Another method is to remove some labels is to replace them with empty strings before passing them to ChartDirector. If you want to remove the label text but leave a major tick, use a space character " " as the label text. If you want to remove the label text but leave a major tick, use "-" as the label text.

ParameterDefaultDescription
text(Mandatory)An array of strings containing the text of the labels.

Return Value
A TextBox object representing the prototype of the obj. This may be used to fine-tune the appearance of the obj.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLabelStep(majorTickStep as Integer, minorTickStep as Integer = 0, majorTickOffset as Integer = 0, minorTickOffset as Integer = -2147483647)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Shows a regularly spaced subset of the axis labels on the axis.
Notes:
This method is typically used in conjunction with
Axis.setLabels. These two methods define the full set of labels on the axis, one for each data point in a data set. In many cases, there may be too many labels and the axis may become overcrowded with labels. The setLabelStep method will cause the axis to show a regularly spaced subset of labels instead all labels.

ParameterDefaultDescription
majorTickStep(Mandatory)The spacing between visible labels (major ticks). For example, a value of 10 means displaying 1 label for every 10 labels.
minorTickStep0For labels that are not displayed, ChartDirector can optionally put a minor tick in its place. The argument specifies the spacing between minor ticks. For example, a value of 5 means displaying 1 minor tick for every 5 labels. The default value of 0 means no minor tick is used.
majorTickOffset0The offset used for selecting the labels. For example, if majorTickStep is set to 10, by default, ChartDirector will select the labels with index 0, 10, 20, 30 and so on. If the majorTickOffset argument is set to 3, then ChartDirector will select labels with index 3, 13, 23, 33 and so on.
minorTickOffset-7fffffffThe offset used for selecting minor tick points. The usage is the same as the majorTickOffset argument, except it applies to minor tick points. The default is to use the same value as majorTickOffset.

Feedback, Comments & Corrections

CDAxisMBS.setLabelStyle(font as string = "", fontsize as Double = 8, fontcolor as Integer = &hffff0002, fontAngle as Double = 0) as CDTextBoxMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the font style used to for the axis labels.
Notes:
See Font Specification for details on various font attributes.

ParameterDefaultDescription
font""The font used to draw the labels.
fontSize8The font size used to draw the labels in points.
fontColorTextColorThe color used to draw the labels.
fontAngle0The rotation angle of the labels.

Return Value
A TextBox object representing the prototype of the obj. This may be used to fine-tune the appearance of the obj.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLabelStyle(font as string, fontsize as Double, fontcolor as color, fontAngle as Double = 0) as CDTextBoxMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other setLabelStyle method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLength(length as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the length of the axis.

Feedback, Comments & Corrections

CDAxisMBS.setLinearScale(formatString as string = "")
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the axis to use linear auto-scale.
Notes:
ParameterDefaultDescription
formatString""The format used for the labels on the axis. Please refer to Axis.setLabelFormat for the syntax of the format string. An empty string means the format will be automatically determined.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLinearScale(lowerLimit as Double, upperLimit as Double, labels() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the axis to use the given linear scale and the given labels.
Notes:
ParameterDefaultDescription
lowerLimit(Mandatory)The lower bound of the axis.
upperLimit(Mandatory)The upper bound of the axis.
labels(Mandatory)An array of text strings to be used as the labels on the axis. ChartDirector will distribute the labels evenly on the axis. By default, all labels are associated with major ticks. These can be modified by using '-' or '~' as the first character. Please refer to Axis.setLabels for details.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLinearScale(lowerLimit as Double, upperLimit as Double, majorTickInc as Double = 0, minorTickInc as Double = 0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the axis to use the given linear scale.
Notes:
ParameterDefaultDescription
lowerLimit(Mandatory)The lower bound of the axis.
upperLimit(Mandatory)The upper bound of the axis.
majorTickInc0Adds major ticks to the axis, where the major ticks are separated by majorTickInc in value. Each major tick will have an associated text label for the value if the axis at the tick. The default value of 0 means the major ticks will be automatically determined. In this case, the lowerLimit and upperLimit may be automatically adjusted to align with the ticks. Use kNoValue to disable major ticks.
minorTickInc0Adds minor ticks to the axis, where the minor ticks are separated by minorTickInc in value. The default value of 0 means no minor tick is used.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLogScale(formatString as string = "")
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the axis to use logarithmic auto-scale.
Notes:
ParameterDefaultDescription
formatString""The format used for the labels on the axis. Please refer to Axis.setLabelFormat for the syntax of the format string. An empty string means the format will be automatically determined.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLogScale(lowerLimit as Double, upperLimit as Double, labels() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the axis to use the given logarithmic scale and the given labels.
Notes:
ParameterDefaultDescription
lowerLimit(Mandatory)The lower bound of the axis.
upperLimit(Mandatory)The upper bound of the axis.
labels(Mandatory)An array of text strings to be used as the labels on the axis. ChartDirector will distribute the labels evenly on the axis. By default, all labels are associated with major ticks. These can be modified by using '-' or '~' as the first character. Please refer to Axis.setLabels for details.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setLogScale(lowerLimit as Double, upperLimit as Double, majorTickInc as Double = 0, minorTickInc as Double = 0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the axis to use the given logarithmic scale.
Notes:
ParameterDefaultDescription
lowerLimit(Mandatory)The lower bound of the axis.
upperLimit(Mandatory)The upper bound of the axis.
majorTickInc0Adds major ticks to the axis, where the major ticks are separated by majorTickInc in ratio. For example, a value of 10 means each tick will be 10 times the value of the previous tick. Each major tick will have an associated text label for the value if the axis at the tick. The special predefined constant LogTick ( = 1.6e308) means the tick increment will be using the non-regular ratio 1, 2, 5, 10, 20, 50, 100, .... The default value of 0 means the major ticks will be automatically determined. In this case, the lowerLimit and upperLimit may be automatically adjusted to align with the ticks. Use kNoValue to disable major ticks.
minorTickInc0Adds minor ticks to the axis, where the minor ticks are separated by minorTickInc in ratio.

The special constant LogTick means the tick increment will be using the non- regular ratio 1, 2, 5, 10, 20, 50, 100, ....

The default value of 0 means no minor tick is used.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setMargin(topMargin as Integer, bottomMargin as Integer = 0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Reserve margins at the ends of the axis.
Notes:
This method is usually used to reserve space in the plot area. For example, if some margin is reserved at the top of the vertical y-axis, the top of the plot area will contain no data points. It is because this region would be outside the active range of the y-axis. If anything is put at the top of the plot area (such as a legend box or custom text), it will not overlap with the data points.

Note if auto-scaling is used, there is an alternative way to reserve space at the top and/or bottom of the plot area - the Axis.setAutoScale method.

ParameterDefaultDescription
topMargin(Mandatory)The margin reserved at the top end (or right end for horizontal axis) of the axis in pixels.
bottomMargin0The margin reserved at the bottom end (or left end for horizontal axis) of the axis in pixels.

Feedback, Comments & Corrections

CDAxisMBS.setMinTickInc(value as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the minimum distance between two ticks on the axis for auto-scaled axis.
Notes:
The most common use of this method is to ensure the ticks are of integer values (the minimum distance set to 1).

ChartDirector auto-scaling will automatically determine the optimal number of ticks and labels on the axis. However, in some cases, the nature of the data may be such that the ticks should assume only certain discrete values (such as must be integers). This method will inform ChartDirector for this constraint when performing auto-scaling.

For a log scale axis, because the axis ticks are unevenly spaced, the minimum distance will be handled as the minimum value allowed for the axis scale.

ParameterDefaultDescription
inc(Mandatory)The minimum distance between two ticks on the axis as a data value.

Feedback, Comments & Corrections

CDAxisMBS.setMultiFormat(filter as Integer, format as string, labelSpan as Integer = 1, promoteFirst as boolean=true)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Adds one filter and format string to the multi-format lists.
Notes:
Please refer to Axis.setMultiFormat on how to use this method.

ParameterDefaultDescription
filterId(Mandatory)The filter that defines a subset of labels.
formatString(Mandatory)The format string for formatting the subset defined by the above filter.
labelSpan1The number of label positions that are claimed by one label. If a label occupies more than 1 position, ChartDirector will not put labels on nearby positions, even if they meet the filter criteria.
promoteFirsttrueIf set to true, the first label will be promoted to a higher filter category in the multi-format list.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setMultiFormat(filter1 as Integer, format1 as string, filter2 as Integer, format2 as string, labelSpan as Integer = 1, promoteFirst as boolean=true)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets multiple formats for numeric or date/time axis labels.
Notes:
This method is typically used to format date/time labels. For example, for an axis that spans 90 days, this method can be used to format the first labels of each month in bold as "mmm-dd", while other labels are shown in normal font as "dd".

The multiple formats are defined as a list of filters and format strings. If the label value satisfies the first filter, it will be formatted using the first format string. Otherwise if the label value satisfies the second filter, it will be formatted using the second format string, and so on. If a label value does not satisfy any filter, it will be discarded.

In the above example, the first filter can be a "start of month" filter (created using Chart::StartOfMonthFilter), and the first format string can be "{value|mmm-dd}". The second filter can be the "all pass" filter (created using Chart::AllPassFilter), and the format string can be "{value|dd}".

Supported filters in ChartDirector include:

FilterDescription
Chart::StartOfHourFilterCreates a data filter that matches date/times that represent the start of a new hour in a date/time series.
Chart::StartOfDayFilterCreates a data filter that matches date/times that represent the start of a new day in a date/time series.
Chart::StartOfWeekFilterCreates a data filter that matches date/times that represent the start of a new week in a date/time series.
Chart::StartOfMonthFilterCreates a data filter that matches date/times that represent the start of a new month in a date/time series.
Chart::StartOfYearFilterCreates a data filter that matches date/times that represent the start of a new year in a date/time series.
Chart::RegularSpacingFilter Creates a data filter that matches 1 out of every N elements.
Chart::AllPassFilter Creates a data filter that matches every element.
Chart::NonePassFilterCreates a data filter that matches no element.
Chart::SelectItemFilterCreates a data filter that matches one specified item.

For the format strings, please refer to Parameter Substitution and Formatting on their syntax.

A single setMultiFormat method supports two filters and two format strings. You can use multiple setMultiFormat methods to add more filters and format strings.

One common issue in putting labels on the axis is that there may be too many labels on the axis. The setMultiFormat method supports a labelSpan argument that specifies how many label positions a single label will occupy. If a label occupies more than 1 position, ChartDirector will not put labels on nearby positions, even if they meet the filter criteria.

The setMultiFormat method supports special handling of the first label on the axis. For example, in the above example, we may want to show the the first label as "mmm-dd", even if it is not actually the "start of month". The promoteFirst argument, if set to true, will cause the first label to be promoted to a higher filter category in the multi-format list. For example, if the first label satisfies only the second filter, it will be formatted as if it satisfies the first filter.

ParameterDefaultDescription
filter1(Mandatory)The filter that defines the first kind of labels.
format1(Mandatory)The format string for the first kind of labels.
filter2(Mandatory)The filter that defines the second kind of labels.
format2(Mandatory)The format string for the second kind of labels.
labelSpan1The number of label positions that are claimed by one label. If a label occupies more than 1 position, ChartDirector will not put labels on nearby positions, even if they meet the filter criteria.
promoteFirsttrueIf set to true, the first label will be promoted to a higher filter category in the multi-format list.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setOffset(x as Integer, y as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 9.2 Yes Yes Yes Yes No
Function: Sets the positional offset of the axis.
Notes:
By default, ChartDirector draws horizontal axes at the top/bottom borders of the plot area, and vertical axes at the left/right borders of the plot area.

This method can be used to shift an axis from its standard position.

Arguments:
ArgumentDefaultDescription
x(Mandatory)The x offset in pixels.
y(Mandatory)The y offset in pixels.

Feedback, Comments & Corrections

CDAxisMBS.setReverse(value as boolean=true)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Reverse the axis.
Notes:
For a normal vertical axis, the axis starts from the bottom and increase its value towards the top. For a normal horizontal axis, the axis starts from the left and increase its value towards the right. The setReverse method can be used to reverse the direction of the axis.

ParameterDefaultDescription
btrueA true value means the axis is reversed. A false value means the axis is not reversed.

Feedback, Comments & Corrections

CDAxisMBS.setRounding(roundMin as boolean, roundMax as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Controls whether to round the ends of the axis to align with tick positions.
Notes:
For example, if the axis is from 0.33 - 9.7, ChartDirector may round it to 0 - 10 so that the ends 0 and 10 are properly aligned with the ticks.

By default, ChartDirector will round the axis ends for the y-axis, but not for the x-axis. An exception is a chart containing a scatter layer, where both x and y axes will be rounded.

ParameterDefaultDescription
roundMin(Mandatory)A true value means the lesser end of the axis should be rounded to align with tick positions. A false value means no rounding.
roundMax(Mandatory)A true value means the greater end of the axis should be rounded to align with tick positions. A false value means no rounding.

Feedback, Comments & Corrections

CDAxisMBS.setTickColor(majorTickColor as color, minorTickColor as color)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other setTickColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setTickColor(majorTickColor as Integer, minorTickColor as Integer = -1)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the colors of the axis ticks.
Notes:
ParameterDefaultDescription
majorTickColor(Mandatory)The color of the major ticks.
minorTickColor-1The color of the major ticks. -1 means the color is the same as majorTickColor

See also:

Feedback, Comments & Corrections

CDAxisMBS.setTickDensity(majorTickSpacing as Integer, minorTickSpacing as Integer = -1)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the density of the axis ticks.
Notes:
Tick density is the desired distance between two ticks in pixels. When ChartDirector performs auto-scaling, it will decide how many ticks to put on the axis based on tick density.

Note that the actual tick density chosen in auto-scaling may not be exactly the same as the desired tick density. It is because ChartDirector may have other constraints in choosing the ticks, such as the ticks and axis range should be neat numbers, and the axis must contain an integral number of ticks, etc. ChartDirector may use a tick distance that is larger than suggested, but never smaller.

ParameterDefaultDescription
majorTickSpacing(Mandatory)Specify the desired distance between two major ticks in pixels.
minorTickSpacing-1Specify the desired distance between two minor ticks in pixels. -1 means minor ticks are not used.

Feedback, Comments & Corrections

CDAxisMBS.setTickLength(majorTickLen as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the length of the axis ticks.
Notes:
A positive tick length means the ticks are drawn outside the plot area. A negative tick length means the ticks are drawn inside the plot area.

ParameterDefaultDescription
majorTickLen(Mandatory)The length of the major ticks in pixels. The length of the minor ticks will automatically be set to half the length of the major ticks.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setTickLength(majorTickLen as Integer, minorTickLen as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the length of the major and minor axis ticks.
Notes:
A positive tick length means the ticks are drawn outside the plot area. A negative tick length means the ticks are drawn inside the plot area.

ParameterDefaultDescription
majorTickLen(Mandatory)The length of the major ticks in pixels.
minorTickLen(Mandatory)The length of the minor ticks in pixels.

See also:

Feedback, Comments & Corrections

CDAxisMBS.setTickOffset(offset as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Shifts the position of the ticks along the axis.
Notes:
By default, ChartDirector draws the ticks at the label position. This method is typically used to shift the ticks so that the ticks are between two labels, rather than aligned with the label.

The offset is specified as a value on the axis scale. For a label based axis (configured using Axis.setLabels), shifting with an offset of 0.5 means shifting half the label interval. This will achieve the effect of putting the ticks in between the labels.

ParameterDefaultDescription
offset(Mandatory)The distance to shift the ticks along the axis as a value on the axis scale.

Feedback, Comments & Corrections

Previous items Next items

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




Links
MBS Xojo PDF Plugins