MCPcopy
hub / github.com/dc-js/dc.js / ordering

Method ordering

src/base/base-mixin.js:360–367  ·  view source on GitHub ↗

* Get or set an accessor to order ordinal dimensions. The chart uses * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort Array.sort * to sort elements; this accessor returns the value to order on. * @example * // Default ordering

(orderFunction)

Source from the content-addressed store, hash-verified

358 * @returns {Function|BaseMixin}
359 */
360 ordering (orderFunction) {
361 if (!arguments.length) {
362 return this._ordering;
363 }
364 this._ordering = orderFunction;
365 this.expireCache();
366 return this;
367 }
368
369 _computeOrderedGroups (data) {
370 // clone the array before sorting, otherwise Array.sort sorts in-place

Callers 14

constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
_partitionNodesMethod · 0.80
startOrdinalFunction · 0.80
resetFunction · 0.80
row-chart-spec.jsFile · 0.80
buildPieChartFunction · 0.80
cap-mixin-spec.jsFile · 0.80
pie-chart-spec.jsFile · 0.80

Calls 1

expireCacheMethod · 0.95

Tested by

no test coverage detected