Skip to content

Instantly share code, notes, and snippets.

@xalunda
xalunda / ko-chart.js
Created May 2, 2018 15:24 — forked from mika76/ko-chart.js
Chart.js Knockout bindings
/*global ko, Chart */
(function(ko, Chart) {
ko.bindingHandlers.chartType = {
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
if (!allBindings.has('chartData')) {
throw Error('chartType must be used in conjunction with chartData and (optionally) chartOptions');
}
},