| | |
| | | _plot.customs = [] |
| | | delete _plot.Yaxis |
| | | } else if (_plot.Yaxis) { |
| | | let yaxis = JSON.parse(JSON.stringify(_plot.Yaxis)) |
| | | let caxis = _plot.customs ? _plot.customs.map(m => m.type) : [] |
| | | yaxis.sort() |
| | | caxis.sort() |
| | | |
| | | if (JSON.stringify(yaxis) !== JSON.stringify(caxis)) { |
| | | let labels = {} |
| | | config.columns.forEach(col => { |
| | | labels[col.field] = col.label |
| | |
| | | color1: chartColors[i % limit] |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | _plot.colors = _plot.colors || [] |
| | | delete _plot.Yaxis |
| | | } else if (_plot.Yaxis) { |
| | | let yaxis = JSON.parse(JSON.stringify(_plot.Yaxis)) |
| | | let caxis = _plot.customs ? _plot.customs.map(m => m.type) : [] |
| | | yaxis.sort() |
| | | caxis.sort() |
| | | |
| | | if (JSON.stringify(yaxis) !== JSON.stringify(caxis)) { |
| | | let labels = {} |
| | | config.columns.forEach(col => { |
| | | labels[col.field] = col.label |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | datatype: _plot.datatype, |