зеркало из https://github.com/microsoft/SandDance.git
handlers for barchartH
This commit is contained in:
Родитель
1533c1c1a1
Коммит
2c5547dd30
|
@ -26,8 +26,12 @@ export function ensureColumnsPopulated(chart: SandDance.types.Chart, insightColu
|
|||
};
|
||||
switch (chart) {
|
||||
case 'barchart':
|
||||
case 'barchartV':
|
||||
ensureColumn('x');
|
||||
break;
|
||||
case 'barchartH':
|
||||
ensureColumn('y');
|
||||
break;
|
||||
case 'density':
|
||||
case 'scatterplot':
|
||||
case 'stacks':
|
||||
|
|
|
@ -405,8 +405,10 @@ export class Explorer extends React.Component<Props, State> {
|
|||
newState.columns = { ...columns };
|
||||
|
||||
//special case mappings when switching chart type
|
||||
if (this.state.chart === 'scatterplot' && chart === 'barchart') {
|
||||
if (this.state.chart === 'scatterplot' && (chart === 'barchart' || chart === 'barchartV')) {
|
||||
newState.columns = { ...columns, sort: columns.y };
|
||||
} else if (this.state.chart === 'scatterplot' && chart === 'barchartH') {
|
||||
newState.columns = { ...columns, sort: columns.x };
|
||||
} else if (chart === 'treemap') {
|
||||
newState.view = '2d';
|
||||
if (!columns.size) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче