Class IgrSparkline<S, SS, S>

Type parameters

  • S

  • SS

  • S

Hierarchy

Constructors

constructor

Properties

context

context: any

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType.

static contextType = MyContext
context!: React.ContextType<typeof MyContext>
deprecated

if used without a type annotation, or without static contextType

see

https://reactjs.org/docs/legacy-context.html

props

props: Readonly<IIgrSparklineProps> & Readonly<object>

refs

refs: object

Type declaration

  • [key: string]: ReactInstance

state

state: Readonly<S>

Static Optional contextType

contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
  static contextType = Ctx
  context!: React.ContextType<typeof Ctx>
  render () {
    return <>My context's value: {this.context}</>;
  }
}
see

https://reactjs.org/docs/context.html#classcontexttype

Accessors

actualPixelScalingRatio

  • get actualPixelScalingRatio(): number
  • set actualPixelScalingRatio(v: number): void
  • Gets the actual scaling value used by the component to affect the pixel density of the control. A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control to appear blurry.

    Returns number

  • Gets the actual scaling value used by the component to affect the pixel density of the control. A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control to appear blurry.

    Parameters

    • v: number

    Returns void

brush

  • get brush(): string
  • set brush(v: string): void
  • Gets or sets the sparkline brush.

    Returns string

  • Gets or sets the sparkline brush.

    Parameters

    • v: string

    Returns void

dataSource

  • get dataSource(): any
  • set dataSource(value: any): void
  • Returns any

  • Parameters

    • value: any

    Returns void

displayNormalRangeInFront

  • get displayNormalRangeInFront(): boolean
  • set displayNormalRangeInFront(v: boolean): void
  • Gets or sets the position of the normal range on the sparkline.

    Returns boolean

  • Gets or sets the position of the normal range on the sparkline.

    Parameters

    • v: boolean

    Returns void

displayType

  • Gets or sets the display type of the sparkline.

    Returns SparklineDisplayType

  • Gets or sets the display type of the sparkline.

    Parameters

    Returns void

firstMarkerBrush

  • get firstMarkerBrush(): string
  • set firstMarkerBrush(v: string): void
  • Gets or sets the first marker brush of the sparkline.

    Returns string

  • Gets or sets the first marker brush of the sparkline.

    Parameters

    • v: string

    Returns void

firstMarkerSize

  • get firstMarkerSize(): number
  • set firstMarkerSize(v: number): void
  • Gets or sets the first marker size of the sparkline.

    Returns number

  • Gets or sets the first marker size of the sparkline.

    Parameters

    • v: number

    Returns void

firstMarkerVisibility

  • get firstMarkerVisibility(): Visibility
  • set firstMarkerVisibility(v: Visibility): void
  • Gets or sets the first marker visibility of the sparkline.

    Returns Visibility

  • Gets or sets the first marker visibility of the sparkline.

    Parameters

    • v: Visibility

    Returns void

formatLabel

  • get formatLabel(): function
  • set formatLabel(v: function): void
  • Sets or gets a function which takes an object that produces a formatted label for displaying in the chart.

    Returns function

      • (arg1: any): string
      • Parameters

        • arg1: any

        Returns string

  • Sets or gets a function which takes an object that produces a formatted label for displaying in the chart.

    Parameters

    • v: function
        • (arg1: any): string
        • Parameters

          • arg1: any

          Returns string

    Returns void

height

  • get height(): string
  • set height(value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

highMarkerBrush

  • get highMarkerBrush(): string
  • set highMarkerBrush(v: string): void
  • Gets or sets the high marker brush of the sparkline.

    Returns string

  • Gets or sets the high marker brush of the sparkline.

    Parameters

    • v: string

    Returns void

highMarkerSize

  • get highMarkerSize(): number
  • set highMarkerSize(v: number): void
  • Gets or sets the high marker size of the sparkline.

    Returns number

  • Gets or sets the high marker size of the sparkline.

    Parameters

    • v: number

    Returns void

highMarkerVisibility

  • get highMarkerVisibility(): Visibility
  • set highMarkerVisibility(v: Visibility): void
  • Gets or sets the high marker visibility of the sparkline.

    Returns Visibility

  • Gets or sets the high marker visibility of the sparkline.

    Parameters

    • v: Visibility

    Returns void

horizontalAxisBrush

  • get horizontalAxisBrush(): string
  • set horizontalAxisBrush(v: string): void
  • Gets or sets the horizontal axis line brush of the sparkline.

    Returns string

  • Gets or sets the horizontal axis line brush of the sparkline.

    Parameters

    • v: string

    Returns void

horizontalAxisLabel

  • get horizontalAxisLabel(): any
  • set horizontalAxisLabel(v: any): void
  • The value or content to display on the horizontal axis. This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate.

    Returns any

  • The value or content to display on the horizontal axis. This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate.

    Parameters

    • v: any

    Returns void

horizontalAxisVisibility

  • get horizontalAxisVisibility(): Visibility
  • set horizontalAxisVisibility(v: Visibility): void
  • Gets or sets the display state of the horizontal axis.

    Returns Visibility

  • Gets or sets the display state of the horizontal axis.

    Parameters

    • v: Visibility

    Returns void

labelMemberPath

  • get labelMemberPath(): string
  • set labelMemberPath(v: string): void
  • String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis.

    Returns string

  • String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis.

    Parameters

    • v: string

    Returns void

lastMarkerBrush

  • get lastMarkerBrush(): string
  • set lastMarkerBrush(v: string): void
  • Gets or sets the last marker brush of the sparkline.

    Returns string

  • Gets or sets the last marker brush of the sparkline.

    Parameters

    • v: string

    Returns void

lastMarkerSize

  • get lastMarkerSize(): number
  • set lastMarkerSize(v: number): void
  • Gets or sets the last marker size of the sparkline.

    Returns number

  • Gets or sets the last marker size of the sparkline.

    Parameters

    • v: number

    Returns void

lastMarkerVisibility

  • get lastMarkerVisibility(): Visibility
  • set lastMarkerVisibility(v: Visibility): void
  • Gets or sets the last marker visibility of the sparkline.

    Returns Visibility

  • Gets or sets the last marker visibility of the sparkline.

    Parameters

    • v: Visibility

    Returns void

lineThickness

  • get lineThickness(): number
  • set lineThickness(v: number): void
  • Gets or sets the line thickness of the sparkline.

    Returns number

  • Gets or sets the line thickness of the sparkline.

    Parameters

    • v: number

    Returns void

lowMarkerBrush

  • get lowMarkerBrush(): string
  • set lowMarkerBrush(v: string): void
  • Gets or sets the low marker brush of the sparkline.

    Returns string

  • Gets or sets the low marker brush of the sparkline.

    Parameters

    • v: string

    Returns void

lowMarkerSize

  • get lowMarkerSize(): number
  • set lowMarkerSize(v: number): void
  • Gets or sets the low marker size of the sparkline.

    Returns number

  • Gets or sets the low marker size of the sparkline.

    Parameters

    • v: number

    Returns void

lowMarkerVisibility

  • get lowMarkerVisibility(): Visibility
  • set lowMarkerVisibility(v: Visibility): void
  • Gets or sets the low marker visibility of the sparkline.

    Returns Visibility

  • Gets or sets the low marker visibility of the sparkline.

    Parameters

    • v: Visibility

    Returns void

markerBrush

  • get markerBrush(): string
  • set markerBrush(v: string): void
  • Gets or sets the marker brush of the sparkline.

    Returns string

  • Gets or sets the marker brush of the sparkline.

    Parameters

    • v: string

    Returns void

markerSize

  • get markerSize(): number
  • set markerSize(v: number): void
  • Gets or sets the marker size of the sparkline.

    Returns number

  • Gets or sets the marker size of the sparkline.

    Parameters

    • v: number

    Returns void

markerVisibility

  • get markerVisibility(): Visibility
  • set markerVisibility(v: Visibility): void
  • Gets or sets the marker visibility of the sparkline.

    Returns Visibility

  • Gets or sets the marker visibility of the sparkline.

    Parameters

    • v: Visibility

    Returns void

maximum

  • get maximum(): number
  • set maximum(v: number): void
  • Gets or sets the maximum value of the y axis.

    Returns number

  • Gets or sets the maximum value of the y axis.

    Parameters

    • v: number

    Returns void

minimum

  • get minimum(): number
  • set minimum(v: number): void
  • Gets or sets the minimum value of the y axis.

    Returns number

  • Gets or sets the minimum value of the y axis.

    Parameters

    • v: number

    Returns void

negativeBrush

  • get negativeBrush(): string
  • set negativeBrush(v: string): void
  • Gets or sets the negative brush of the sparkline.

    Returns string

  • Gets or sets the negative brush of the sparkline.

    Parameters

    • v: string

    Returns void

negativeMarkerBrush

  • get negativeMarkerBrush(): string
  • set negativeMarkerBrush(v: string): void
  • Gets or sets the negative marker brush of the sparkline.

    Returns string

  • Gets or sets the negative marker brush of the sparkline.

    Parameters

    • v: string

    Returns void

negativeMarkerSize

  • get negativeMarkerSize(): number
  • set negativeMarkerSize(v: number): void
  • Gets or sets the negative marker size of the sparkline.

    Returns number

  • Gets or sets the negative marker size of the sparkline.

    Parameters

    • v: number

    Returns void

negativeMarkerVisibility

  • get negativeMarkerVisibility(): Visibility
  • set negativeMarkerVisibility(v: Visibility): void
  • Gets or sets the negative marker visibility of the sparkline.

    Returns Visibility

  • Gets or sets the negative marker visibility of the sparkline.

    Parameters

    • v: Visibility

    Returns void

normalRangeFill

  • get normalRangeFill(): string
  • set normalRangeFill(v: string): void
  • Gets or sets the normal range brush of the sparkline.

    Returns string

  • Gets or sets the normal range brush of the sparkline.

    Parameters

    • v: string

    Returns void

normalRangeMaximum

  • get normalRangeMaximum(): number
  • set normalRangeMaximum(v: number): void
  • Gets or sets the maximum value of the normal range.

    Returns number

  • Gets or sets the maximum value of the normal range.

    Parameters

    • v: number

    Returns void

normalRangeMinimum

  • get normalRangeMinimum(): number
  • set normalRangeMinimum(v: number): void
  • Gets or sets the minimum value of the normal range.

    Returns number

  • Gets or sets the minimum value of the normal range.

    Parameters

    • v: number

    Returns void

normalRangeVisibility

  • get normalRangeVisibility(): Visibility
  • set normalRangeVisibility(v: Visibility): void
  • Gets or sets the normal range visibility of the sparkline.

    Returns Visibility

  • Gets or sets the normal range visibility of the sparkline.

    Parameters

    • v: Visibility

    Returns void

pixelScalingRatio

  • get pixelScalingRatio(): number
  • set pixelScalingRatio(v: number): void
  • Gets or sets the scaling value used to affect the pixel density of the control. A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control to appear blurry.

    Returns number

  • Gets or sets the scaling value used to affect the pixel density of the control. A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control to appear blurry.

    Parameters

    • v: number

    Returns void

tooltipTemplate

  • get tooltipTemplate(): React.SFC<IChartTooltipProps> | Component<IChartTooltipProps>
  • set tooltipTemplate(value: React.SFC<IChartTooltipProps> | Component<IChartTooltipProps>): void
  • Returns React.SFC<IChartTooltipProps> | Component<IChartTooltipProps>

  • Parameters

    • value: React.SFC<IChartTooltipProps> | Component<IChartTooltipProps>

    Returns void

trendLineBrush

  • get trendLineBrush(): string
  • set trendLineBrush(v: string): void
  • Gets or sets the trendline brush of the sparkline.

    Returns string

  • Gets or sets the trendline brush of the sparkline.

    Parameters

    • v: string

    Returns void

trendLinePeriod

  • get trendLinePeriod(): number
  • set trendLinePeriod(v: number): void
  • Gets or sets the trendline period used by the sparkline.

    Returns number

  • Gets or sets the trendline period used by the sparkline.

    Parameters

    • v: number

    Returns void

trendLineThickness

  • get trendLineThickness(): number
  • set trendLineThickness(v: number): void
  • Gets or sets the thickness of the sparkline's trendline.

    Returns number

  • Gets or sets the thickness of the sparkline's trendline.

    Parameters

    • v: number

    Returns void

trendLineType

  • get trendLineType(): TrendLineType
  • set trendLineType(v: TrendLineType): void
  • Gets or sets the type of trendline used by the sparkline.

    Returns TrendLineType

  • Gets or sets the type of trendline used by the sparkline.

    Parameters

    • v: TrendLineType

    Returns void

unknownValuePlotting

  • get unknownValuePlotting(): UnknownValuePlotting
  • set unknownValuePlotting(v: UnknownValuePlotting): void
  • Gets or sets the way null values are interpreted.

    Returns UnknownValuePlotting

  • Gets or sets the way null values are interpreted.

    Parameters

    • v: UnknownValuePlotting

    Returns void

valueMemberPath

  • get valueMemberPath(): string
  • set valueMemberPath(v: string): void
  • Gets or sets the string path to the value column.

    Returns string

  • Gets or sets the string path to the value column.

    Parameters

    • v: string

    Returns void

verticalAxisBrush

  • get verticalAxisBrush(): string
  • set verticalAxisBrush(v: string): void
  • Gets or sets the vertical axis line brush of the sparkline.

    Returns string

  • Gets or sets the vertical axis line brush of the sparkline.

    Parameters

    • v: string

    Returns void

verticalAxisLabel

  • get verticalAxisLabel(): any
  • set verticalAxisLabel(v: any): void
  • The value or content to display on the vertical axis. This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate.

    Returns any

  • The value or content to display on the vertical axis. This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate.

    Parameters

    • v: any

    Returns void

verticalAxisVisibility

  • get verticalAxisVisibility(): Visibility
  • set verticalAxisVisibility(v: Visibility): void
  • Gets or sets the display state of the vertical axis.

    Returns Visibility

  • Gets or sets the display state of the vertical axis.

    Parameters

    • v: Visibility

    Returns void

width

  • get width(): string
  • set width(value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

Methods

Optional UNSAFE_componentWillMount

  • UNSAFE_componentWillMount(): void

Optional UNSAFE_componentWillReceiveProps

  • UNSAFE_componentWillReceiveProps(nextProps: Readonly<IIgrSparklineProps>, nextContext: any): void

Optional UNSAFE_componentWillUpdate

  • UNSAFE_componentWillUpdate(nextProps: Readonly<IIgrSparklineProps>, nextState: Readonly<S>, nextContext: any): void

Optional componentDidCatch

  • componentDidCatch(error: Error, errorInfo: ErrorInfo): void
  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

componentDidMount

  • componentDidMount(): void
  • Returns void

Optional componentDidUpdate

  • componentDidUpdate(prevProps: Readonly<IIgrSparklineProps>, prevState: Readonly<S>, snapshot?: SS): void
  • Called immediately after updating occurs. Not called for the initial render.

    The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

    Parameters

    Returns void

Optional componentWillMount

  • componentWillMount(): void

Optional componentWillReceiveProps

  • componentWillReceiveProps(nextProps: Readonly<IIgrSparklineProps>, nextContext: any): void

componentWillUnmount

  • componentWillUnmount(): void
  • Returns void

Optional componentWillUpdate

  • componentWillUpdate(nextProps: Readonly<IIgrSparklineProps>, nextState: Readonly<S>, nextContext: any): void

destroy

  • destroy(): void
  • Returns void

exportSerializedVisualData

  • exportSerializedVisualData(): string
  • Returns visuals as a serialized string.

    Returns string

exportVisualData

  • exportVisualData(): SparklineVisualData
  • Returns the sparkline visuals expressed as a SparklineVisualData object.

    Returns SparklineVisualData

forceUpdate

  • forceUpdate(callBack?: function): void
  • Parameters

    • Optional callBack: function
        • (): void
        • Returns void

    Returns void

Optional getSnapshotBeforeUpdate

  • getSnapshotBeforeUpdate(prevProps: Readonly<IIgrSparklineProps>, prevState: Readonly<S>): SS | null
  • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

    Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

    Parameters

    Returns SS | null

initializeContent

  • initializeContent(): void
  • Returns void

notifyClearItems

  • notifyClearItems(source_: any): void
  • Used to manually notify the IgxSparklineComponent that the data source has reset or cleared its items. Invoking this method is only necessary if that datasource is not observable.

    Parameters

    • source_: any
      • The data source which was cleared or reset.

    Returns void

notifyInsertItem

  • notifyInsertItem(source_: any, index: number, newItem: any): void
  • Parameters

    • source_: any
    • index: number
    • newItem: any

    Returns void

notifyRemoveItem

  • notifyRemoveItem(source_: any, index: number, oldItem: any): void
  • Parameters

    • source_: any
    • index: number
    • oldItem: any

    Returns void

notifyResized

  • notifyResized(): void
  • Notify that the control has resized.

    Returns void

notifySetItem

  • notifySetItem(source_: any, index: number, oldItem: any, newItem: any): void
  • Parameters

    • source_: any
    • index: number
    • oldItem: any
    • newItem: any

    Returns void

provideContainer

  • provideContainer(container: any): void
  • Provides a container to the sparkline control.

    Parameters

    • container: any
      • The container.

    Returns void

render

  • render(): DetailedReactHTMLElement<object, HTMLDivElement>
  • Returns DetailedReactHTMLElement<object, HTMLDivElement>

setState

  • setState<K>(state: function | S | object, callback?: function): void
  • Type parameters

    • K: keyof S

    Parameters

    • state: function | S | object
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

shouldComponentUpdate

  • shouldComponentUpdate(nextProps: any, nextState: any): boolean
  • Parameters

    • nextProps: any
    • nextState: any

    Returns boolean

Static _createFromInternal

  • Parameters

    • internal: any

    Returns IgrSparkline