mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
New chart type : Chord Diagrams (#3013)
This commit is contained in:
committed by
GitHub
parent
a55f963e52
commit
7045018d86
@@ -334,11 +334,14 @@ export const controls = {
|
||||
type: 'SelectControl',
|
||||
multi: true,
|
||||
label: 'Columns',
|
||||
mapStateToProps: state => ({
|
||||
choices: (state.datasource) ? state.datasource.gb_cols : [],
|
||||
}),
|
||||
default: [],
|
||||
description: 'One or many controls to pivot as columns',
|
||||
optionRenderer: c => <ColumnOption column={c} />,
|
||||
valueRenderer: c => <ColumnOption column={c} />,
|
||||
valueKey: 'column_name',
|
||||
mapStateToProps: state => ({
|
||||
options: (state.datasource) ? state.datasource.columns : [],
|
||||
}),
|
||||
},
|
||||
|
||||
all_columns: {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { D3_TIME_FORMAT_OPTIONS } from './controls';
|
||||
|
||||
import * as v from '../validators';
|
||||
|
||||
export const sections = {
|
||||
druidTimeSeries: {
|
||||
label: 'Time',
|
||||
@@ -635,6 +637,37 @@ const visTypes = {
|
||||
},
|
||||
},
|
||||
},
|
||||
chord: {
|
||||
label: 'Chord Diagram',
|
||||
controlPanelSections: [
|
||||
{
|
||||
label: null,
|
||||
controlSetRows: [
|
||||
['groupby', 'columns'],
|
||||
['metric'],
|
||||
['row_limit', 'y_axis_format'],
|
||||
],
|
||||
},
|
||||
],
|
||||
controlOverrides: {
|
||||
y_axis_format: {
|
||||
label: 'Number format',
|
||||
description: 'Choose a number format',
|
||||
},
|
||||
groupby: {
|
||||
label: 'Source',
|
||||
multi: false,
|
||||
validators: [v.nonEmpty],
|
||||
description: 'Choose a source',
|
||||
},
|
||||
columns: {
|
||||
label: 'Target',
|
||||
multi: false,
|
||||
validators: [v.nonEmpty],
|
||||
description: 'Choose a target',
|
||||
},
|
||||
},
|
||||
},
|
||||
country_map: {
|
||||
label: 'Country Map',
|
||||
controlPanelSections: [
|
||||
|
||||
Reference in New Issue
Block a user