UNPKG

4.68 kBSource Map (JSON)View Raw
1{"version":3,"file":"GridCircular.js","sourceRoot":"","sources":["../../../../../src/.internal/charts/axes/GridCircular.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAA+C,MAAM,QAAQ,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAyC/C;;;;;GAKG;AAEH;;;;;;GAMG;AACH;IAAkC,gCAAI;IAiBrC;;OAEG;IACH;QAAA,YACC,iBAAO,SAIP;QAHA,KAAI,CAAC,SAAS,GAAG,cAAc,CAAC;QAChC,KAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,KAAI,CAAC,UAAU,EAAE,CAAC;;IACnB,CAAC;IAOD,sBAAW,qCAAW;QAItB;;WAEG;aACH;YACC,OAAO,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAC7C,CAAC;QAdD;;;;WAIG;aACH,UAAuB,KAAuB;YAC7C,IAAI,CAAC,kBAAkB,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QACvE,CAAC;;;OAAA;IAcD,sBAAW,gCAAM;QAIjB;;WAEG;aACH;YACC,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QAdD;;;;WAIG;aACH,UAAkB,KAAuB;YACxC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAClE,CAAC;;;OAAA;IASF,mBAAC;AAAD,CAAC,AA3DD,CAAkC,IAAI,GA2DrC;;AAGD;;;;;GAKG;AACH,QAAQ,CAAC,iBAAiB,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC","sourcesContent":["/**\r\n * A module defining functionality for circular axis grid elements.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Grid, IGridProperties, IGridAdapters, IGridEvents } from \"./Grid\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { Percent } from \"../../core/utils/Percent\";\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines properties for [[GridCircular]].\r\n */\r\nexport interface IGridCircularProperties extends IGridProperties {\r\n\r\n\t/**\r\n\t * Inner radius of the circular grid. (absolute or relative)\r\n\t */\r\n\tinnerRadius: number | Percent;\r\n\r\n\t/**\r\n\t * Outer radius of the circular grid. (absolute or relative)\r\n\t */\r\n\tradius: number | Percent;\r\n\r\n}\r\n\r\n/**\r\n * Defines events for [[GridCircular]].\r\n */\r\nexport interface IGridCircularEvents extends IGridEvents { }\r\n\r\n/**\r\n * Defines adapters for [[GridCircular]].\r\n *\r\n * @see {@link Adapter}\r\n */\r\nexport interface IGridCircularAdapters extends IGridAdapters, IGridCircularProperties { }\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Creates a circular grid element for circular-type axis.\r\n *\r\n * @see {@link IGridCircularEvents} for a list of available events\r\n * @see {@link IGridCircularAdapters} for a list of available Adapters\r\n * @todo Review: container is better, as we'll be able to attach something to the GridCircular, also with 3d charts we might need some additional elements\r\n */\r\nexport class GridCircular extends Grid {\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: IGridCircularProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: IGridCircularAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: IGridCircularEvents;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"GridCircular\";\r\n\t\tthis.pixelPerfect = false;\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Inner radius of the circular grid. (absolute or relative)\r\n\t *\r\n\t * @param value Inner radius\r\n\t */\r\n\tpublic set innerRadius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"innerRadius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Inner radius\r\n\t */\r\n\tpublic get innerRadius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"innerRadius\");\r\n\t}\r\n\r\n\t/**\r\n\t * Outer radius of the circular grid. (absolute or relative)\r\n\t *\r\n\t * @param value Outer radius\r\n\t */\r\n\tpublic set radius(value: number | Percent) {\r\n\t\tthis.setPercentProperty(\"radius\", value, true, false, 10, false);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Outer radius\r\n\t */\r\n\tpublic get radius(): number | Percent {\r\n\t\treturn this.getPropertyValue(\"radius\");\r\n\t}\r\n\r\n}\r\n\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"GridCircular\"] = GridCircular;\r\n"]}
\No newline at end of file