| | |
| | | } |
| | | }) |
| | | |
| | | if (config.plot.correction) { |
| | | delete config.plot.correction // 数据修正(已弃用) |
| | | config.plot.barSize = 35 |
| | | let plot = fromJS(config.plot).toJS() |
| | | |
| | | if (plot.correction) { |
| | | delete plot.correction // 数据修正(已弃用) |
| | | plot.barSize = 35 |
| | | } |
| | | |
| | | if (plot.datatype !== 'statistics') { |
| | | if (plot.colors) { |
| | | plot.colors = plot.colors.map(item => { |
| | | if (fieldName[item.type]) { |
| | | item.label = fieldName[item.type] |
| | | } |
| | | return item |
| | | }) |
| | | } |
| | | if (plot.customs) { |
| | | plot.customs = plot.customs.map(item => { |
| | | if (fieldName[item.type]) { |
| | | item.name = fieldName[item.type] |
| | | } |
| | | return item |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | view: 'normal', |
| | | ramp: config.plot.ramp || 'false', |
| | | datatype: config.plot.datatype || 'query', |
| | | ramp: plot.ramp || 'false', |
| | | datatype: plot.datatype || 'query', |
| | | fieldName: fieldName, |
| | | plot: fromJS(config.plot).toJS(), |
| | | baseFormlist: getBaseForm(config.plot, config.columns), |
| | | formlist: getOptionForm(config.plot, config.columns) |
| | | plot: plot, |
| | | baseFormlist: getBaseForm(plot, config.columns), |
| | | formlist: getOptionForm(plot, config.columns) |
| | | }) |
| | | } |
| | | |