diff --git a/src/app/api.js b/src/app/api.js index 29eef145e..50b4f9f34 100644 --- a/src/app/api.js +++ b/src/app/api.js @@ -363,7 +363,13 @@ const g3wsdk = { InputsComponents }, Charts: { - ChartsFactory, + ChartsFactory: { + /** @param type: : */ + build({ type, hooks = {} } = {}) { + const [library='c3', chartType='lineXY'] = type.split(':'); + return Object.assign(hooks, this.CHARTS[library][chartType]); + } + }, c3: { lineXY: C3XYLine } @@ -431,7 +437,8 @@ const g3wsdk = { }; // BACKOMP v3.x -g3wsdk.core.geometry = { Geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; -g3wsdk.core.layer.geometry = { geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; +g3wsdk.core.geometry = { Geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; +g3wsdk.core.layer.geometry = { geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; +g3wsdk.gui.vue.Charts.ChartsFactory.CHARTS = { c3: { lineXY: C3XYLine } }; module.exports = g3wsdk; \ No newline at end of file diff --git a/src/app/gui/charts/chartsfactory.js b/src/app/gui/charts/chartsfactory.js deleted file mode 100644 index da6bb0255..000000000 --- a/src/app/gui/charts/chartsfactory.js +++ /dev/null @@ -1,20 +0,0 @@ -import C3XYLine from 'components/C3XYLine.vue'; - -const Chartsfactory = { - CHARTS: { - c3: { - lineXY: C3XYLine - } - }, - /* - * type: : - * */ - build({type, hooks={}} = {}) { - const [library='c3', chartType='lineXY'] = type.split(':'); - const chartVue = this.CHARTS[library][chartType]; - return Object.assign(hooks, chartVue); - } -}; - - -module.exports = Chartsfactory;