|
@@ -27,7 +27,7 @@ class DataViewConfigForm extends React.Component {
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
<FormItem label='排序列' {...formItemLayout}>
|
|
<FormItem label='排序列' {...formItemLayout}>
|
|
|
<Cascader
|
|
<Cascader
|
|
|
- value={[chartDesigner.dataViewConfig.sortColumn.value, chartDesigner.barConfig.xAxis.granularity.value]}
|
|
|
|
|
|
|
+ // value={[chartDesigner.dataViewConfig.sortColumn.name, chartDesigner.dataViewConfig.sortColumn.sortType]}
|
|
|
allowClear={true}
|
|
allowClear={true}
|
|
|
options={columns.filter(c =>['ordinal', 'categorical', 'time'].indexOf(c.type) !== -1).map((c, i)=>{
|
|
options={columns.filter(c =>['ordinal', 'categorical', 'time'].indexOf(c.type) !== -1).map((c, i)=>{
|
|
|
|
|
|
|
@@ -38,15 +38,15 @@ class DataViewConfigForm extends React.Component {
|
|
|
}
|
|
}
|
|
|
})}
|
|
})}
|
|
|
onChange={(value, items) => {
|
|
onChange={(value, items) => {
|
|
|
- let column = {};
|
|
|
|
|
- let granularity = {};
|
|
|
|
|
- if(items.length > 0) {
|
|
|
|
|
- column = { type: items[0].type, value: items[0].value, label: items[0].label };
|
|
|
|
|
- }
|
|
|
|
|
- if(items.length > 1) {
|
|
|
|
|
- granularity = { value: items[1].value, label: items[1].label };
|
|
|
|
|
- }
|
|
|
|
|
- dispatch({ type: 'chartDesigner/changeField', name: 'barConfig', value: { ...chartDesigner.barConfig, xAxis: { column, granularity } } });
|
|
|
|
|
|
|
+ // let column = {};
|
|
|
|
|
+ // let granularity = {};
|
|
|
|
|
+ // if(items.length > 0) {
|
|
|
|
|
+ // column = { type: items[0].type, value: items[0].value, label: items[0].label };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if(items.length > 1) {
|
|
|
|
|
+ // granularity = { value: items[1].value, label: items[1].label };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // dispatch({ type: 'chartDesigner/changeField', name: 'sortColumn', value: { ...chartDesigner.dataViewConfig, sortColumn: { column, granularity } } });
|
|
|
}}
|
|
}}
|
|
|
displayRender={(label, selectedOptions) => {
|
|
displayRender={(label, selectedOptions) => {
|
|
|
let text = '';
|
|
let text = '';
|