Common Attributes

Top Previous Topic Next Topic  Print this topic

Size and positioning attributes

x

x-axis coordinate.

Type

length

Initial Value

0

Applies to

xc:pie, xc:spider, xc:plot-area, xc:legend, xc:root, xc:title

 

y

y-axis coordinate.

Type

length

Initial Value

0

Applies to

xc:pie, xc:spider, xc:plot-area, xc:legend, xc:root, xc:title

 

width

Intrinsic width of an element.

Type

length

Initial Value

0

Applies to

xc:pie, xc:spider, xc:plot-area, xc:legend, xc:root, xc:title, xc:data-point

 

height

Intrinsic height of an element.

Type

length

Initial Value

0

Applies to

xc:pie, xc:spider, xc:plot-area, xc:legend, xc:root, xc:title, xc:data-point

 

viewBox

Element view box.

Type

rectangle defined as "x y width height", mapping the internal coordinates to the external viewport

Initial Value

0 0 1 1

Applies to

xc:root

 

offset

Specifies the distance to current viewport origin.

Type

length

Initial Value

0

Applies to

xc:stop, xc:display-values

 

Font Attributes

Collection of attributes describing the font for an element.

 

font-family

This property specifies a prioritized list of font family names and/or generic family names.

Type

length

Initial Value

System dependent

Applies to

any element

 

font-style

The 'font-style' property requests normal (sometimes referred to as "roman" or "upright"), italic, and oblique faces within a font family

Type

normal | italic

Initial Value

normal

Applies to

any element

 

font-weight

The 'font-weight' property specifies the weight of the font.

Type

normal | bold

Initial Value

normal

Applies to

any element

 

font-size

This property describes the size of the font.

Type

length

Initial Value

normal

Applies to

any element

 

Stroke Attributes

Set of attributes used to paint the outline of an element.

 

stroke

The color used to paint the outline.

Type

color

Initial Value

black

Applies to

any element

 

stroke-width

The width of the stroke on the current object. A zero value causes no stroke to be painted. A negative value is an error.

Type

length

Initial Value

1pt

Applies to

any element

 

stroke-linecap

The line cap type for the stroke.

Type

butt | round | square

Initial Value

butt

Applies to

any element

 

stroke-linejoin

The line join style for the stroke.

Type

miter | round | bevel

Initial Value

miter

Applies to

any element

 

stroke-miterlimit

The miter limit for the stroke.

Type

length

Initial Value

2px

Applies to

any element

 

stroke-dasharray

'stroke-dasharray' controls the pattern of dashes and gaps used to stroke paths. 'dash array' contains a list of comma-separated (with optional white space) lengths that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, stroke-dasharray: 5,3,2 is equivalent to stroke-dasharray: 5,3,2,5,3,2.

Type

none | 'dash array'

Initial Value

none

Applies to

any element

 

stroke-dashoffset

The offset (in the right direction) of the dash array.

Type

length

Initial Value

0px

Applies to

any element

 

Fill Attributes

Set of attributes used to paint the background of an element.

 

fill

The color used to paint the background.

Type

color

Initial Value

transparent

Applies to

any element

 

Value Attributes

 

value

Type

number | date | string

Initial Value

Not applicable. This attribute is always required

Applies to

xc:slice, xc:data-point, xc:spider-data-point, xc:display-values, xc:title, xc:value

 

category

Type

number, date, string

Initial Value

Not applicable. This attribute is always required

Applies to

xc:data-point

 

Miscellaneous Attributes

 

format

String identifying the number of date format to apply to data values.

Type

auto|string

Initial Value

auto

Applies to

xc:display-values

 

Formatting numbers:  The following characters are supported "."; ","; "#", "0". The "#" character is used to describe integers. The "." and "," characters are used to describe the location and type of punctuation. The "0" character is used enforce digits before and after the "." character. When truncating digits to the right of the decimal points, the number is rounded. The number to the left of the decimal point is never truncated. Prefix and postfix character sequences are copied to output without change.

 

Examples:

When using '#,###', number 5351 will be displayed as "5,351".

When using '#.00', number 5351 will be displayed as "5351.00".

When using '0000.0000', number 53.11 will be displayed as "0053.5100".

When using "0000.####", number 5351.12 will be displayed as "5351.12"

When using "$###0.##", number 5351.12 will be displayed as "$5351.12"

 

Formatting dates:

Value

Description

d

Day of month as digits with no leading zero for single-digit days.

dd

Day of month as digits with leading zero for single-digit days.

ddd

Day of week as a three-letter abbreviation.

dddd

Day of week as its full name.

M

Month as digits with no leading zero for single-digit months.

MM

Month as digits with leading zero for single-digit months.

MMM

Month as a three-letter abbreviation.

MMMM

Month as its full name.

y

Year as last two digits, with a leading zero for years less than 10. The same format as "yy".

yy

Year as last two digits, with a leading zero for years less than 10.

yyyy

Year represented by full four digits.

 

For example, to get the date string  "Wed, Aug 31 94"  use the following format string: "ddd, MMM dd yy".

 

orientation

Specifies if an axis is vertical or horizontal.

Type

vertical | horizontal

Initial Value

Not applicable. This attribute is always required.

Applies to

xc:value-axis, xc:category-axis

 

intersection

Specifies the intersection point of an axis with the opposite one.

Type

auto | min | max

Initial Value

auto

Applies to

xc:value-axis, xc:category-axis

 

min

Overrides the automatically calculated minimum value for an axis.

Type

number | date | string

Initial Value

nothing

Applies to

xc:value-axis, xc:category-axis

 

max

Overrides the automatically calculated maximum value for an axis.

Type

number | date | string

Initial Value

nothing

Applies to

xc:value-axis, xc:category-axis

 

unit

Overrides the automatically calculated unit value for an axis.

Type

auto | days | months | years | number

Initial Value

auto

Applies to

xc:value-axis, xc:category-axis

 

Values have the following meaning:

·auto - the units are calculated automatically based on the min-max range of the axis.
·days | months | years - applicable when the axis display dates.
·number - applicable when the axis display numbers.

 

The following line chart exemplifies the usage of min, max and unit properties.

 

placement

Specifies the placement method for xc:axis-labels elements in rapport with the xc:major-tick-marks.

Type

auto |center | between

Initial Value

auto

Applies to

xc:display-values