-
Notifications
You must be signed in to change notification settings - Fork 33
KnockoutJS support
IDD plots can be controlled with KnockoutJS. The bindings can control entire plot presence, plotted data, as well as individual plot properties.
- Source KnocokutJS (ver 3.4.1) in your page
- Source idd_knockout.js or idd_knockout.min.js
- Start using bindings
If you prefer samples, there is a group of Knockout related samples here. Place a link here
Presence or absence of the plot is controlled with default Knockout control flow bindings (e.g. foreach, if)
Plotted data and individual properties are controlled with custom bindings.
Mandatory bindings:
- iddX (number array) - horizontal coordinates data series
- iddY (number array) - vertical coordinates data series
Remark: Length of iddX and iddY must be the same
Optional bindings:
-
iddShape (string) - visual shape of the markers
Allowed values:
- "box"
- "circle"
- "diamond"
- "cross"
- "triangle"
-
iddColor (string) - the inner color of the marker (e.g. "red","#FF0000", ...)
-
iddBorder (string) - the color of the marker border (e.g. "red","#FF0000", ...)
-
iddSize (number) - the size of each marker
Source code: View
<div id="chart" data-idd-plot="chart">
<div data-idd-plot="markers" data-bind="iddX: X, iddY: Y,iddColor: ActiveColour" />
</div>Source code:View Model
ko.applyBindings({
X: ko.observable([1,2,3]),
Y: ko.observable([2,3,1]),
ActiveColour: "Red"
});Sample link
Home
FAQ
UI Guidelines
Export to SVG
Plot
Figure
Chart
ChartViewer
Polyline
Markers
Area
Heatmap
DOM Plot
Labels
Bing Maps
Intro
General bindings
Area plot
Bars plot
Polyline
Heatmap
Markers
Label plot
Box and whisker plot
Petals and BullEye plot
Axis
Palette Editor
Update layout
Axes
Legend
Color Palette
Navigation
Bound Plots
Tooltips and Probes