v5.20192.624
|

Fibonacci Class

Represents a Fibonacci Retracements tool for the FinancialChart.

The tool enables the calculation and plotting of various alert levels that are useful in financial charts.

To add Fibonacci tool to a FinancialChart control, create an instance of the Fibonacci and add it to the series collection of the chart. For example:

// create chart
var chart = new FinancialChart('#chartElement');
// create Fibonacci tool
var ftool = new Fibonacci();
chart.series.push(ftool);

Hierarchy

Constructors

constructor

  • Initializes a new instance of the Fibonacci class.

    Parameters

    • Optional options: any

      JavaScript object containing initialization data for the object.

    Returns Fibonacci

Properties

altStyle

altStyle: any

Gets or sets the alternate style for the series.

The alternate style is used for negative values in Bar, Column, and Scatter charts; and for rising values in financial chart types like Candlestick, LineBreak, EquiVolume etc.

The default value for this property is null, which causes the series to use the default style.

axisX

axisX: Axis

Gets or sets the X-axis for the series.

axisY

axisY: Axis

Gets or sets the Y-axis for the series.

binding

binding: string

Gets or sets the name of the property that contains Y values for the series.

bindingX

bindingX: string

Gets or sets the name of the property that contains X values for the series.

chart

Gets the FlexChart object that owns this series.

collectionView

collectionView: ICollectionView

Gets the ICollectionView object that contains the data for this series.

cssClass

cssClass: string

Gets or sets the series CSS class.

high

high: number

Gets or sets the high value of Fibonacci tool.

If not specified, the high value is caclulated based on data values provided by the itemsSource.

hostElement

hostElement: SVGGElement

Gets the series host element.

interpolateNulls

interpolateNulls: boolean

Gets or sets a value that determines whether to interpolate null values in the data.

If true, the series interpolates the value of any missing data based on neighboring points. If false, it leaves a break in lines and areas at the points with null values.

The default value for this property is false.

itemFormatter

itemFormatter: Function

Gets or sets the item formatter function that allows you to customize the appearance of the series.

The property overrides the chart's itemFormatter wijmo.chart.FlexChart.itemFormatter.

itemsSource

itemsSource: any

Gets or sets the array or ICollectionView object that contains the series data.

labelPosition

labelPosition: LabelPosition

Gets or sets the label position for levels in Fibonacci tool.

legendElement

legendElement: SVGGElement

Gets the series element in the legend.

levels

levels: number[]

Gets or sets the array of levels for plotting.

Default value is [0, 23.6, 38.2, 50, 61.8, 100].

low

low: number

Gets or sets the low value of Fibonacci tool.

If not specified, the low value is calculated based on data values provided by itemsSource.

maxX

maxX: any

Gets or sets the x maximum value of the Fibonacci tool.

If not specified, current maximum of x-axis is used. The value can be specified as a number or Date object.

minX

minX: any

Gets or sets the x minimal value of the Fibonacci tool.

If not specified, current minimum of x-axis is used. The value can be specified as a number or Date object.

name

name: string

Gets or sets the series name.

The series name is displayed in the chart legend. Any series without a name does not appear in the legend.

style

style: any

Gets or sets the series style.

symbolMarker

symbolMarker: Marker

Gets or sets the shape of marker to use for each data point in the series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.

The default value for this property is Marker.Dot.

symbolSize

symbolSize: number

Gets or sets the size (in pixels) of the symbols used to render this Series. Applies to Scatter, LineSymbols, and SplineSymbols chart types.

The default value for this property is 10 pixels.

symbolStyle

symbolStyle: any

Gets or sets the series symbol style.

Applies to Scatter, LineSymbols, and SplineSymbols chart types.

tooltipContent

tooltipContent: any

Gets or sets the series specific tooltip content.

The property overrides the content of chart tooltip content.

uptrend

uptrend: boolean

Gets or sets a value indicating whether to create uptrending Fibonacci tool.

Default value is true(uptrend). If the value is false, the downtrending levels are plotted.

visibility

visibility: SeriesVisibility

Gets or sets an enumerated value indicating whether and where the series appears.

The default value for this property is SeriesVisibility.Visible.

Methods

dataToPoint

drawLegendItem

  • Draw a legend item at the specified position.

    Parameters

    • engine: IRenderEngine

      The rendering engine to use.

    • rect: Rect

      The position of the legend item.

    • index: number

      Index of legend item(for series with multiple legend items).

    Returns void

getDataRect

  • getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect
  • Returns the series bounding rectangle in data coordinates.

    If getDataRect() returns null, the limits are calculated automatically based on the data values.

    Parameters

    • Optional currentRect: Rect

      The current rectangle of chart. This parameter is optional.

    • Optional calculatedRect: Rect

      The calculated rectangle of chart. This parameter is optional.

    Returns Rect

getPlotElement

  • getPlotElement(pointIndex: number): any
  • Gets the plot element that corresponds to the specified point index.

    Parameters

    • pointIndex: number

      The index of the data point.

    Returns any

hitTest

  • Gets a HitTestInfo object with information about the specified point.

    Parameters

    • pt: any

      The point to investigate, in window coordinates.

    • Optional y: number

      The Y coordinate of the point (if the first parameter is a number).

    Returns HitTestInfo

initialize

  • initialize(options: any): void
  • Initializes the series by copying the properties from a given object.

    Parameters

    • options: any

      JavaScript object containing initialization data for the series.

    Returns void

legendItemLength

  • legendItemLength(): number

measureLegendItem

  • Measures height and width of the legend item.

    Parameters

    • engine: IRenderEngine

      The rendering engine to use.

    • index: number

      Index of legend item(for series with multiple legend items).

    Returns Size

onRendered

onRendering

  • onRendering(engine: IRenderEngine, index: number, count: number): boolean

pointToData

  • Converts a Point from control coordinates to series data coordinates.

    Parameters

    • pt: Point

      The point to convert, in control coordinates.

    Returns Point

    The point in series data coordinates.

Events

rendered

rendered: Event

Occurs when series is rendered.

rendering

rendering: Event

Occurs when series is rendering.