|
|
@@ -73,10 +73,11 @@ class ChartDesignerContent extends React.Component {
|
|
|
|
|
|
if(viewType === 'aggregateTable') {
|
|
|
configForm = (<AggregateTableConfigForm autoRefresh={autoRefresh}/>);
|
|
|
- chartView = (<AggregateTableView chartOption={chartOption}/>);
|
|
|
+ chartView = (<AggregateTableView key={hashcode(chartOption)} chartOption={chartOption}/>);
|
|
|
}else if(viewType === 'dataView') {
|
|
|
configForm = (<DataViewConfigForm autoRefresh={autoRefresh}/>);
|
|
|
chartView = (<TableView
|
|
|
+ key={hashcode(chartOption)}
|
|
|
chartOption={chartOption}
|
|
|
viewRef={`tableview-${code}`}
|
|
|
columns={chartOption.columns}
|
|
|
@@ -98,16 +99,16 @@ class ChartDesignerContent extends React.Component {
|
|
|
}else if(viewType === 'line') {
|
|
|
configForm = (<LineConfigForm autoRefresh={autoRefresh}/>);
|
|
|
// optionConfig 可以用来放替换属性(已做深拷贝替换)
|
|
|
- chartView = (<EchartsView chartOption={chartOption} />);
|
|
|
+ chartView = (<EchartsView key={hashcode(chartOption)} chartOption={chartOption} />);
|
|
|
}else if(viewType === 'bar') {
|
|
|
configForm = (<BarConfigForm autoRefresh={autoRefresh}/>);
|
|
|
- chartView = (<EchartsView chartOption={chartOption} />);
|
|
|
+ chartView = (<EchartsView key={hashcode(chartOption)} chartOption={chartOption} />);
|
|
|
}else if(viewType === 'pie') {
|
|
|
configForm = (<PieConfigForm autoRefresh={autoRefresh}/>);
|
|
|
- chartView = (<EchartsView chartOption={chartOption} />);
|
|
|
+ chartView = (<EchartsView key={hashcode(chartOption)} chartOption={chartOption} />);
|
|
|
}else if(viewType === 'scatter') {
|
|
|
configForm = (<ScatterConfigForm autoRefresh={autoRefresh}/>);
|
|
|
- chartView = (<EchartsView chartOption={chartOption} />);
|
|
|
+ chartView = (<EchartsView key={hashcode(chartOption)} chartOption={chartOption} />);
|
|
|
}else if(viewType === 'indicator') {
|
|
|
configForm = (<IndicatorConfigForm autoRefresh={autoRefresh}/>);
|
|
|
chartView = (<IndicatorView key={hashcode(chartOption)} chartOption={chartOption} />);
|