Search results

Sparkline

Represents the Sparkline control.

<div id="sparkline"/>
<script>
  var sparkline = new Sparkline();
  sparkline.appendTo("#sparkline");
</script>

Properties

axisSettings

AxisSettingsModel

To configure Sparkline container area customization.

border

SparklineBorderModel

To configure Sparkline points border color and width.

containerArea

ContainerAreaModel

To configure Sparkline container area customization.

dataLabelSettings

SparklineDataLabelSettingsModel

To configure Sparkline dataLabel configuration.

dataSource

Object[]

To configure sparkline data source.

Defaults to []

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

endPointColor

string

To configure sparkline series last x value point color.

Defaults to

fill

string

To configure sparkline series fill.

Defaults to ‘#00bdae’

format

string

To apply internationalization for sparkline.

Defaults to null

height

string

To configure Sparkline height.

highPointColor

string

To configure sparkline series highest y value point color.

Defaults to

lineWidth

number

To configure sparkline line series width.

Defaults to ‘1’

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to undefined

lowPointColor

string

To configure sparkline series lowest y value point color.

Defaults to

markerSettings

SparklineMarkerSettingsModel

To configure Sparkline marker configuration.

negativePointColor

string

To configure sparkline series negative y value point color.

Defaults to

opacity

number

To configure sparkline line series opacity.

Defaults to ‘1’

padding

PaddingModel

To configure Sparkline container area customization.

palette

string[]

To configure sparkline series color palette. It applicable to column and pie type series.

Defaults to []

rangeBandSettings

RangeBandSettingsModel[]

To configure Sparkline axis line customization.

startPointColor

string

To configure sparkline series first x value point color.

Defaults to

theme

string

To configure sparkline theme.

Defaults to ‘Material’

tiePointColor

string

To configure sparkline winloss series tie y value point color.

Defaults to

tooltipSettings

SparklineTooltipSettingsModel

To configure Sparkline tooltip settings.

type

string

To configure Sparkline series type.

Defaults to ‘Line’

useGroupingSeparator

boolean

To enable the separator

Defaults to false

valueType

string

To configure sparkline series value type.

Defaults to ‘Numeric’

width

string

To configure Sparkline width.

xName

string

To configure sparkline series xName.

Defaults to null

yName

string

To configure sparkline series yName.

Defaults to null

Methods

addEventListener

Adds the handler to the given event listener.

Returns void

appendTo

Appends the control within the given HTML element

Parameter Type Description
selector (optional) string | HTMLElement Target element where control needs to be appended

Returns void

dataBind

When invoked, applies the pending property changes immediately to the component.

Returns void

destroy

Destroy the component

Returns void

getModuleName

Get component name

Returns string

refresh

Applies all the pending property changes and render the component again.

Returns void

removeEventListener

Removes the handler from the given event listener.

Returns void

renderSparkline

To render sparkline elements

Returns void

Inject

Dynamically injects the required modules to the component.

Returns void

Events

axisRendering

EmitType<IAxisRenderingEventArgs>

Triggers before sparkline axis render.

dataLabelRendering

EmitType<IDataLabelRenderingEventArgs>

Triggers before the sparkline datalabel render.

load

EmitType<ISparklineLoadEventArgs>

Triggers before sparkline render.

loaded

EmitType<ISparklineLoadedEventArgs>

Triggers after sparkline rendered.

markerRendering

EmitType<IMarkerRenderingEventArgs>

Triggers before the sparkline marker render.

pointRegionMouseClick

EmitType<IPointRegionEventArgs>

Triggers while mouse click on the sparkline point region.

pointRegionMouseMove

EmitType<IPointRegionEventArgs>

Triggers while mouse move on the sparkline point region.

pointRendering

EmitType<ISparklinePointEventArgs>

Triggers before sparkline points render.

resize

EmitType<ISparklineResizeEventArgs>

Triggers on resizing the sparkline.

seriesRendering

EmitType<ISeriesRenderingEventArgs>

Triggers before sparkline series render.

sparklineMouseClick

EmitType<ISparklineMouseEventArgs>

Triggers while mouse click on the sparkline container.

sparklineMouseMove

EmitType<ISparklineMouseEventArgs>

Triggers while mouse move on the sparkline container.

tooltipInitialize

EmitType<ITooltipRenderingEventArgs>

Triggers before sparkline tooltip render.