All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gwt.material.design.amplugin.sunburst.client.resources.js.sunburst.js Maven / Gradle / Ivy

There is a newer version: 2.8.3
Show newest version
/**
 * @license
 * Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
 *
 * This sofware is provided under multiple licenses. Please see below for
 * links to appropriate usage.
 *
 * Free amCharts linkware license. Details and conditions:
 * https://github.com/amcharts/amcharts4/blob/master/LICENSE
 *
 * One of the amCharts commercial licenses. Details and pricing:
 * https://www.amcharts.com/online-store/
 * https://www.amcharts.com/online-store/licenses-explained/
 *
 * If in doubt, contact amCharts at [email protected]
 *
 * PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE.
 * @hidden
 */
am4internal_webpackJsonp(["1b9f"],{ntkx:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={};r.d(a,"SunburstDataItem",function(){return b}),r.d(a,"Sunburst",function(){return g}),r.d(a,"SunburstSeriesDataItem",function(){return c}),r.d(a,"SunburstSeries",function(){return p});var i=r("m4/l"),s=r("quKg"),n=r("Puh1"),o=r("Mtpk"),u=r("aCit"),l=r("MIZb"),c=function(e){function t(){var t=e.call(this)||this;return t.className="SunburstSeriesDataItem",t.applyTheme(),t}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"sunburstDataItem",{get:function(){return this._dataContext},enumerable:!0,configurable:!0}),t.prototype.hide=function(t,r,a,i){var s=this.sunburstDataItem;return s&&s.series&&s.series.dataItems.each(function(e){e.hide(t,r,a,i)}),e.prototype.hide.call(this,t,r,a,i)},t.prototype.show=function(t,r,a){var i=this.sunburstDataItem;return i&&i.series&&i.series.dataItems.each(function(e){e.show(t,r,a)}),e.prototype.show.call(this,t,r,a)},Object.defineProperty(t.prototype,"value",{get:function(){var e=0,t=this.sunburstDataItem;return t&&(t.series?t.series.dataItems.each(function(t){var r=t.value;o.isNumber(r)&&(e+=r)}):e=this.values.value.value),e},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),t.prototype.getActualWorkingValue=function(e){var t=0,r=this.sunburstDataItem;return r.series?r.series.dataItems.each(function(r){var a=r.getWorkingValue(e);o.isNumber(a)&&(t+=a)}):t=this.values[e].workingValue,t},t}(n.b),p=function(e){function t(){var t=e.call(this)||this;t.className="SunburstSeries",t.dataFields.category="name",t.dataFields.value="value";var r=new l.a;t.stroke=r.getFor("background"),t.strokeOpacity=1,t.alignLabels=!1,t.ticks.template.disabled=!0,t.slices.template.hiddenState.properties.visible=!0;var a=t.labels.template;a.relativeRotation=90,a.radius=10,a.inside=!0,a.strokeOpacity=0,a.fillOpacity=1,a.fill=r.getFor("background"),a.padding(0,0,0,0),a.interactionsEnabled=!1;var i=t.slices.template;i.stroke=r.getFor("background");var s=i.states.getKey("active");return s&&(s.properties.shiftRadius=0),t.events.on("inited",function(){t.dataItems.each(function(e){e.hidden&&e.hide(0)})},void 0,!1),t.applyTheme(),t}return Object(i.c)(t,e),t.prototype.createDataItem=function(){return new c},t.prototype.processDataItem=function(t,r){r.seriesDataItem=t,e.prototype.processDataItem.call(this,t,r)},t.prototype.handleDataItemValueChange=function(t,r){e.prototype.handleDataItemValueChange.call(this,t,r),t.sunburstDataItem.setValue(r,t.getValue(r))},t.prototype.handleDataItemWorkingValueChange=function(t,r){e.prototype.handleDataItemWorkingValueChange.call(this,t,r);for(var a=t.sunburstDataItem.parent.parent;void 0!=a;)a.series.invalidateProcessedData(),a=a.parent},t}(n.a);u.c.registeredClasses.SunburstSeries=p,u.c.registeredClasses.SunburstSeriesDataItem=c;var d=r("Wglt"),h=r("v9UT"),f=r("tjMS"),m=r("DHte"),v=r("+qIf"),b=function(e){function t(){var t=e.call(this)||this;return t.className="SunburstDataItem",t.values.value={},t.hasChildren.children=!0,t.applyTheme(),t}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){var e=0;return this.children&&0!=this.children.length?d.each(this.children.iterator(),function(t){var r=t.value;o.isNumber(r)&&(e+=r)}):e=this.values.value.workingValue,e},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"percent",{get:function(){return this.parent?this.value/this.parent.value*100:100},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.properties.name},set:function(e){this.setProperty("name",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties.children},set:function(e){this.setProperty("children",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this.parent?this.parent.level+1:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){var e=this.properties.color;return void 0==e&&this.parent&&(e=this.parent.color),void 0==e&&this.component&&(e=this.component.colors.getIndex(this.component.colors.step*this.index)),e},set:function(e){this.setProperty("color",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"series",{get:function(){return this._series},set:function(e){e!=this._series&&(this._series&&(this.component.series.removeValue(this._series),this._series.dispose()),this._series=e,this._disposers.push(e))},enumerable:!0,configurable:!0}),t}(s.b),g=function(e){function t(){var t=e.call(this)||this;t.className="Sunburst",t.colors=new m.a,t._usesData=!0;var r=new p;return t.seriesTemplates=new v.c(r),r.virtualParent=t,t._disposers.push(new v.b(t.seriesTemplates)),t._disposers.push(r),t.radius=Object(f.c)(95),t.applyTheme(),t}return Object(i.c)(t,e),t.prototype.createSeries=function(){return new p},t.prototype.createDataItem=function(){return new b},t.prototype.validateData=function(){this.series.clear(),e.prototype.validateData.call(this),this._homeDataItem&&this._homeDataItem.dispose();var t=this.dataItems.template.clone();this._homeDataItem=t,d.each(this.dataItems.iterator(),function(e){e.parent=t}),t.children=this.dataItems,this._levelCount=0,this.createSunburstSeries(t)},t.prototype.createSunburstSeries=function(e){if(e.children){this.initSeries(e);for(var t=0;t




© 2015 - 2024 Weber Informatics LLC | Privacy Policy