// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
define(["dojo/_base/declare"],function(d){return d([],{constructor:function(a){this.chart=a.chart;this.gauge=a.gauge;this.chartUtils=a.chartUtils},produceOption:function(a){if(a&&a.type){var b=a.type,c={};c=this.setCommonOption(c,a);this.chartUtils.isAxisChart(a)?c=this.setAxisChartOption(c,a):"pie"===b?c=this.setPieChartOption(c,a):"funnel"===b?c=this.setFunnelChartOption(c,a):"radar"===b?c=this.setRadarChartOption(c,a):a.shape&&(c=this.setGaugeChartOption(c,a));return c=this.chartUtils.settingAdvanceOption(c,
a)}},setPieChartOption:function(a,b){a=this.chartUtils.settingPieSeries(a,b);a=this.chartUtils._settingSeriesDataLabel(a,b);a=this.chartUtils.pieChartAvoidLegendLabelOverLap(a,b);return a=this.chartUtils.avoidAdjoiningColorSameForPie(a,b)},setGaugeChartOption:function(a,b){return a=this.gauge.produceOption(a,b)},setFunnelChartOption:function(a,b){return a=this.chartUtils.settingFunnelSeries(a,b)},setRadarChartOption:function(a,b){a=this.chartUtils.settingRadar(a,b);return a=this.chartUtils.settingRadarSeries(a,
b)},setAxisChartOption:function(a,b){a=this.chartUtils.settingDefaultGrid(a,b);a=this.chartUtils.settingAxisChartAxis(a,b);a=this.chartUtils.settingAxisSeries(a,b);a=this.chartUtils.settingMarks(a,b);a=this.chartUtils._settingSeriesDataLabel(a,b);a=this.chartUtils.splitAxisStackColumn(a,b);a=this.chartUtils.settingStack(a,b);a=this.chartUtils.settingArea(a,b);return a=this.chartUtils.settingScale(a,b)},setCommonOption:function(a,b){this.chart._theme||(this.chart._theme={});a=this.chartUtils.settingRenderOption(a,
b);a=this.chartUtils.settingBackgroundColor(a,b);a=this.chartUtils.settingColor(a,b);a=this.chartUtils.settingToolTip(a,b);return a=this.chartUtils.settingLegend(a,b)}})});