NChartTimeAxis Class Reference

Inherits from NChartAxis : NChartObject : NSObject
Declared in NChartTimeAxis.h

Overview

The NChartTimeAxis class provides methods to display the time axis of the chart.

– setBeginButtonStateImagesNormal:andPushed:

Set images for button “go to the beginning”.

- (void)setBeginButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed

Parameters

normal
  • image for the button’s normal state.
pushed
  • image for the button’s pushed state.

Declared In

NChartTimeAxis.h

– setEndButtonStateImagesNormal:andPushed:

Set images for button “go to the ending”.

- (void)setEndButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed

Parameters

normal
  • image for the button’s normal state.
pushed
  • image for the button’s pushed state.

Declared In

NChartTimeAxis.h

– setPlayButtonStateImagesNormal:andPushed:

Set images for button “play”.

- (void)setPlayButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed

Parameters

normal
  • image for the button’s normal state.
pushed
  • image for the button’s pushed state.

Declared In

NChartTimeAxis.h

– setPauseButtonStateImagesNormal:andPushed:

Set images for button “pause”.

- (void)setPauseButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed

Parameters

normal
  • image for the button’s normal state.
pushed
  • image for the button’s pushed state.

Declared In

NChartTimeAxis.h

– setHandlerImage:

Set image for the handler of the slider.

- (void)setHandlerImage:(NSImage *)handler

Parameters

handler
  • image for the slider’s handler.

Declared In

NChartTimeAxis.h

– setSliderImage:capInsets:

Specify the image for the slider and the cap insets to stretch it. The cap insets works as the insets in a method [NSImage resizableImageWithCapInsets:]. This means, they specify the stretchable caps of the image.

- (void)setSliderImage:(NSImage *)slider capInsets:(NSEdgeInsets)capInsets

Parameters

slider
  • image for the slider.
capInsets
  • cap insets for the image.

Declared In

NChartTimeAxis.h

– setImagesForBeginNormal:beginPushed:endNormal:endPushed:playNormal:playPushed:pauseNormal:pausePushed:slider:handler:contentScale:

Set all images used for time axis at once. This method automatically adjusts tickSize and tickOffset according to images provided.

- (void)setImagesForBeginNormal:(NSImage *)beginNormal beginPushed:(NSImage *)beginPushed endNormal:(NSImage *)endNormal endPushed:(NSImage *)endPushed playNormal:(NSImage *)playNormal playPushed:(NSImage *)playPushed pauseNormal:(NSImage *)pauseNormal pausePushed:(NSImage *)pausePushed slider:(NSImage *)slider handler:(NSImage *)handler contentScale:(double)contentScale

Parameters

beginNormal
  • image for the begin button’s normal state.
beginPushed
  • image for the begin button’s pushed state.
endNormal
  • image for the end button’s normal state.
endPushed
  • image for the end button’s pushed state.
playNormal
  • image for the play button’s normal state.
playPushed
  • image for the play button’s pushed state.
pauseNormal
  • image for the pause button’s normal state.
pausePushed
  • image for the pause button’s pushed state.
slider
  • image for the slider.
handler
  • image for the slider’s handler.
contentScale
  • current content scale.

Declared In

NChartTimeAxis.h

– goToNextTick

Go to the next timestamp (without any user interactions).

- (void)goToNextTick

Declared In

NChartTimeAxis.h

– goToPreviousTick

Go to the previous timestamp (without any user interactions).

- (void)goToPreviousTick

Declared In

NChartTimeAxis.h

– goToFirstTick

Go to the beginning of the timeline (without any user interactions).

- (void)goToFirstTick

Declared In

NChartTimeAxis.h

– goToLastTick

Go to the ending of the timeline (without any user interactions).

- (void)goToLastTick

Declared In

NChartTimeAxis.h

– play

Start playing the timeline (without any user interactions).

- (void)play

Declared In

NChartTimeAxis.h

– stop

Stop playing the timeline (without any user interactions).

- (void)stop

Declared In

NChartTimeAxis.h

  currentIndex

Current timestamp index (index of the timestamp tick where the handler stays).

@property (nonatomic, assign) NSInteger currentIndex

Declared In

NChartTimeAxis.h

  tooltip

Tooltip that appears over the handler. This is nil by default.

@property (nonatomic, strong) NChartTimeAxisTooltip *tooltip

Declared In

NChartTimeAxis.h

  tickTitlesFont

Font used to display timestamp titles.

@property (nonatomic, strong) NSFont *tickTitlesFont

Declared In

NChartTimeAxis.h

  tickTitlesColor

Color used to display timestamp titles.

@property (nonatomic, strong) NSColor *tickTitlesColor

Declared In

NChartTimeAxis.h

  tickColor

Color used to display timestamp ticks.

@property (nonatomic, strong) NSColor *tickColor

Declared In

NChartTimeAxis.h

  tickSize

Size of ticks in pixels.

@property (nonatomic, assign) CGSize tickSize

Declared In

NChartTimeAxis.h

  tickOffset

Offset of timestamp ticks (spacing between slider and ticks) in pixels. If positive, ticks are outside of slider, if negative, ticks may overlap the slider; so the outer border of the slider (including the slider’s handler) is assumed as zero offset.

@property (nonatomic, assign) float tickOffset

Declared In

NChartTimeAxis.h

  tickTitlesOffset

Offset of timestamp titles (spacing between the slider and titles) in pixels.

@property (nonatomic, assign) float tickTitlesOffset

Declared In

NChartTimeAxis.h

  tickShape

Shape of timestamp ticks.

@property (nonatomic, assign) NChartTimeAxisTickShape tickShape

Declared In

NChartTimeAxis.h

  tickTitlesLayout

Layout of timestamp titles.

@property (nonatomic, assign) NChartTimeAxisLabelsLayout tickTitlesLayout

Declared In

NChartTimeAxis.h

  tickTitlesPosition

Position of timestamp titles.

@property (nonatomic, assign) NChartTimeAxisLabelsPosition tickTitlesPosition

Declared In

NChartTimeAxis.h

  minTickSpacing

Minimal spacing between neighbor ticks in pixels (the tick is the center place of the timestamp title, a kind of milestone on the axis). According to this value some timestamps can be hidden, if there are too many of them.

@property (nonatomic, assign) float minTickSpacing

Declared In

NChartTimeAxis.h

  margin

Margin of the time axis.

@property (nonatomic, assign) NChartMargin margin

Declared In

NChartTimeAxis.h

  autohideTooltip

Flag indicating whether the tooltip should be hidden automatically when the user interactions end (YES) or not (NO).

@property (nonatomic, assign) BOOL autohideTooltip

Declared In

NChartTimeAxis.h

  animationTime

Time that takes to play the whole time axis in seconds.

@property (nonatomic, assign) float animationTime

Declared In

NChartTimeAxis.h

  padding

Padding of the time axis.

@property (nonatomic, assign) NChartMargin padding

Declared In

NChartTimeAxis.h

  frame

Frame of the time axis in the view’s coordinate system.

@property (nonatomic, readonly) CGRect frame

Discussion

The frame is a rect fully enclosing the entire time axis with its ticks, labels and control buttons, but not its tooltip. This rect is calculated during updateData call when the chat lays out its elements.

Declared In

NChartTimeAxis.h

  dataSource

Time axis data source.

@property (nonatomic, assign) id<NChartTimeAxisDataSource> dataSource

Declared In

NChartTimeAxis.h