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[] | DataManager

To configure sparkline data source.

Defaults to null

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

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 []

query

Query

Specifies the query for filter the data.

Defaults to null

rangeBandSettings

RangeBandSettingsModel[]

To configure Sparkline axis line customization.

rangePadding

SparklineRangePadding

To configure Sparkline series type.

Defaults to ‘None’

sparkTheme

IThemes

Sparkline theme support @private

startPointColor

string

To configure sparkline series first x value point color.

Defaults to

theme

SparklineTheme

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

SparklineType

To configure Sparkline series type.

Defaults to ‘Line’

useGroupingSeparator

boolean

To enable the separator

Defaults to false

valueType

SparklineValueType

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.

Parameter Type Description
eventName string A String that specifies the name of the event
handler Function Specifies the call to run when the event occurs.

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

attachUnloadEvent

Adding unload event to persist data when enable persistence true

Returns void

dataBind

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

Returns void

destroy

Destroy the component

Returns void

detachUnloadEvent

Removing unload event to persist data when enable persistence true

Returns void

getLocalData

Returns the persistence data for component

Returns any

getModuleName

Get component name

Returns string

getRootElement

Returns the route element of the component

Returns HTMLElement

handleUnload

Handling unload event to persist data when enable persistence true

Returns void

refresh

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

Returns void

removeEventListener

Removes the handler from the given event listener.

Parameter Type Description
eventName string A String that specifies the name of the event to remove
handler Function Specifies the function to remove

Returns void

renderSparkline

To render sparkline elements

Returns void

Inject

Dynamically injects the required modules to the component.

Parameter Type Description
moduleList Function[] ?

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.