Skip to content

arlas-d3 / Exports / Axis

Class: Axis

Hierarchy

Axis

↳↳ DayAxis

↳↳ WeekAxis

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Axis(context, name)

Parameters

Name Type
context Selection<SVGGElement, TimelineData, BaseType, TimelineData>
name string

Overrides

DrawableObject.constructor

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:39

Properties

axisXOffset

Protected axisXOffset: number

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:34


axisYOffset

Protected axisYOffset: number

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:35


context

Protected context: Selection<SVGGElement, TimelineData, BaseType, TimelineData>

the context is the parent element to which the current element is appended

Inherited from

DrawableObject.context

Defined in

src/calendar-timeline/lib/classes/drawable.object.ts:27


dimensions

Protected dimensions: Dimensions

Inherited from

DrawableObject.dimensions

Defined in

src/calendar-timeline/lib/classes/drawable.object.ts:28


domain

Protected domain: ScaleTime<number, number, never>

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:29


element

Protected element: Selection<SVGGElement, TimelineData, BaseType, TimelineData>

the element contains the drawing of this current object

Inherited from

DrawableObject.element

Defined in

src/calendar-timeline/lib/classes/drawable.object.ts:25


textFontSize

Protected textFontSize: number

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:36


tickFormat

Protected tickFormat: (domainValue: Date | NumberValue, index: number) => string

Type declaration

▸ (domainValue, index): string

Parameters
Name Type
domainValue Date | NumberValue
index number
Returns

string

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:33


tickInterval

Protected tickInterval: AxisTimeInterval

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:30


tickIntervalWidth

Protected tickIntervalWidth: number

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:31


tickSize

Protected tickSize: number = 6

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:32

Methods

getDate

getDate(d): Date

Parameters

Name Type
d number

Returns

Date

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:113


getIntervalWidth

getIntervalWidth(d): number

Parameters

Name Type
d Date

Returns

number

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:105


getPosition

getPosition(d): number

Parameters

Name Type
d Date

Returns

number

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:109


getTickIntervalWidth

getTickIntervalWidth(): number

Returns

number

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:101


onClick

onClick(e): void

Parameters

Name Type
e any

Returns

void

Inherited from

DrawableObject.onClick

Defined in

src/calendar-timeline/lib/classes/drawable.object.ts:60


plot

plot(): void

plots the axis, if the axis has already been plotted, it's replaced.

Returns

void

Overrides

DrawableObject.plot

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:87


remove

remove(): void

Returns

void

Inherited from

DrawableObject.remove

Defined in

src/calendar-timeline/lib/classes/drawable.object.ts:45


setAxisYOffset

setAxisYOffset(axisYOffset): Axis

Parameters

Name Type
axisYOffset number

Returns

Axis

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:76


setBoundDates

setBoundDates(dates): Axis

Set the dates of the axis bounds

Parameters

Name Type Description
dates Date[] start and end dates

Returns

Axis

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:56


setDimensions

setDimensions(dimensions): DrawableObject

Parameters

Name Type
dimensions Dimensions

Returns

DrawableObject

Inherited from

DrawableObject.setDimensions

Defined in

src/calendar-timeline/lib/classes/drawable.object.ts:52


setRange

setRange(d): Axis

Parameters

Name Type
d Dimensions

Returns

Axis

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:47


setTextFontSize

setTextFontSize(textFontSize): Axis

Parameters

Name Type
textFontSize number

Returns

Axis

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:81


setTickInterval

setTickInterval(t): Axis

Parameters

Name Type
t AxisTimeInterval

Returns

Axis

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:61


setTickIntervalWidth

setTickIntervalWidth(t): Axis

Parameters

Name Type
t number

Returns

Axis

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:71


setTickSize

setTickSize(s): Axis

Parameters

Name Type
s number

Returns

Axis

Defined in

src/calendar-timeline/lib/classes/axes/axis.ts:66