This repository has been archived by the owner on Oct 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdc.datatables.min.js
21 lines (20 loc) · 2.75 KB
/
dc.datatables.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*!
* dc.datatables 0.0.8
* http://dc-js.github.io/dc.datatables.js/
* Copyright 2018 Gordon Woodhull & the dc.datatables Developers
* https://github.com/dc-js/dc.datatables.js/blob/master/AUTHORS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
!function(){function a(a,b,c,d){"use strict";var e={version:"0.0.8"};return"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(a,b){if(null==a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1;d<arguments.length;d++){var e=arguments[d];if(null!=e)for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(c[f]=e[f])}return c},writable:!0,configurable:!0}),e.datatable=function(d,e){function f(a){switch(typeof a){case"string":return function(b,c,d){return d[a]};case"function":return function(b,c,d){return a(d)};case"object":return function(b,c,d){return a.format(d)};default:return null}}var g,h,i,j,k,l,m,n,o={},p=a.dispatch("renderlet");return o.render=function(){h=a.select(d);var b=h.selectAll("table").data([0]);return b.exit().remove(),b=b.enter().append("table").merge(b),g=c(b.node()).DataTable(Object.assign({},{columns:o.columns().map(function(a){var b={name:"string"==typeof a?a:a.label,type:"object"==typeof a?a.type:"num",render:f(a)};return b.title=b.name.charAt(0).toUpperCase()+b.name.slice(1),b})},j)),o.redraw()},o.redraw=function(){g.clear().rows.add(i.top(1/0)).draw()},o.dimension=function(a){return arguments.length?(i=a,this):i},o.group=function(){return this},o.dt=function(a){return arguments.length?(g=a,this):g},o.options=function(a){return arguments.length?(j=a,this):j},o.size=function(a){return arguments.length?(k=a,this):k},o.columns=function(a){return arguments.length?(l=a,this):l},o.sortBy=function(a){return arguments.length?(m=a,this):m},o.order=function(a){return arguments.length?(n=a,this):n},o.on=function(a,b){return arguments.length<2?p.on(a):(p.on(a,b),this)},b.registerChart(o,e),o},e.dc=b,e}if("function"==typeof define&&define.amd)define(["d3","dc","jquery","datatables"],a);else if("object"==typeof module&&module.exports){var b=require("d3"),c=require("dc"),d=require("jquery"),e=require("datatables");module.exports=a(b,c,d,e)}else this.dc_datatables=a(d3,dc,$,$)}();
//# sourceMappingURL=dc.datatables.min.js.map