Skip to content

Sparkline ​

About 3 min read

TwSparkline · Category: Charts

Settings ​

These settings are in the properties panel on the right while the widget is selected. The default value is the value the widget has when it is first added to a page.

Data ​

SettingTypeDefaultDescription
Sparkline Type
type
SelectionsplineareaChart type. Bar uses the positive and negative bar colors; Win/Loss draws only up/down bars with the win and loss colors.
Options: area Area, bar Bar, line Line, spline Spline, splinearea Spline Area, steparea Step Area, stepline Step Line, winloss Win/Loss
Win/Loss Threshold
winlossThreshold
Number0The win/loss threshold is 0.
Process Value
processValue
Text0Each new value is added to the line and the last 50 values are kept. The line starts empty when the page opens.

Line & Points ​

SettingTypeDefaultDescription
Point Symbol
pointSymbol
SelectioncircleShape of the data points.
Options: circle Circle, cross Cross, polygon Polygon, square Square, triangle Triangle, triangleDown Triangle Down, triangleUp Triangle Up
Line Width
lineWidth
Number2Line thickness in pixels (default 2); empty or 0 uses 2.
Point Color
pointColor
Color#fffFill color of the data points.
Line Color
lineColor
Color#666Color of the line and area.
Point Size
pointSize
Number2Size of the data points in pixels; 0 hides them.

Markers ​

SettingTypeDefaultDescription
First/Last Color
firstLastColor
Color#666Color of the first and last point when Show First Last is on.
Show Min Max
showMinMax
CheckboxOnHighlights the lowest and highest point with the Min and Max colors.
Show First Last
showFirstLast
CheckboxOnHighlights the first and last point with the First/Last color.

Colors ​

SettingTypeDefaultDescription
Bar Negative Color
barNegativeColor
Color#d7d7d7Color of the bars below zero in the bar type.
Win Color
winColor
Color#a9a9a9Color of the bars above the threshold in the Win/Loss type.
Min Color
minColor
Color#e8c267Color of the lowest point when Show Min Max is on.
Bar Positive Color
barPositiveColor
Color#a9a9a9Color of the bars above zero in the bar type.
Loss Color
lossColor
Color#d7d7d7Color of the bars below the threshold in the Win/Loss type.
Max Color
maxColor
Color#e55253Color of the highest point when Show Min Max is on.

Tooltip ​

SettingTypeDefaultDescription
Tooltip Enabled
tooltipEnabled
CheckboxOnShows the values when the pointer rests on the sparkline.

Other settings ​

SettingTypeDefaultDescription
Enable Flashing
enableFlashing
CheckboxOffMakes the widget blink (an opacity pulse every second). Usually bound to an alarm condition.
Log Button
logButton
CheckboxOffAt runtime shows a chart icon when hovering the widget; clicking it adds the Tags bound to the widget to the log Tag list.

Bindings ​

In the Bindings (Rules) section of the properties panel, a Tag can be bound to the following properties of this widget with a Direct binding. The binding types (Direct, IntRange, FloatRange, Boolean, Bit) are the same for all widgets; they are described on the Widget Reference page.

title, visible, authorization, x, y, width, height, rotation, class, foregroundColor, backgroundColor, borderColor, borderStyle, borderWidth, borderRadius, borderTopLeftRadius, borderTopRightRadius, enableFlashing, logButton, processValue, showMinMax, showFirstLast, lineWidth, tooltipEnabled, winlossThreshold, barNegativeColor, barPositiveColor, firstLastColor, lineColor, winColor, lossColor, minColor, maxColor, pointColor, pointSize, pointSymbol

The style fields of the widget can also be bound as style.<field> (e.g. style.fontSize).

Common sections ​

While this widget is selected, the properties panel also shows these common sections: General, Layout, Appearance, Bindings (Rules). These sections are described on the Page Editor page.

2WinScada 2.10