mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Add event-flow visualization (#3102)
* [event-flow] add event flow visualizaton type from @data-ui/event-flow. * [event-flow] update vis thumbnail * [event-flow] update row limit label, remove duplicate chart controls * [dependencies] add @data-ui/event-flow 0.0.2 * [linting] fix multiple imports * [deps] bump mapbox-gl and react-map-gl to fix build * [event-flow] bump to 0.0.3 for es2015 + stage-0 babel presets * [deps] revert mapbox version bumps * [event-flow] update png, bump to newest version, address reviewer comments, add min event count form. * [event-flow] pin version * [event-flow][spec] add test for coveralls * [event-flow] revert spec
This commit is contained in:
committed by
Maxime Beauchemin
parent
a141695b2b
commit
40d9e15126
@@ -659,7 +659,7 @@ export const controls = {
|
||||
label: 'Entity',
|
||||
default: null,
|
||||
validators: [v.nonEmpty],
|
||||
description: 'This define the element to be plotted on the chart',
|
||||
description: 'This defines the element to be plotted on the chart',
|
||||
mapStateToProps: state => ({
|
||||
choices: (state.datasource) ? state.datasource.gb_cols : [],
|
||||
}),
|
||||
@@ -1273,5 +1273,23 @@ export const controls = {
|
||||
hidden: true,
|
||||
description: 'The number of seconds before expiring the cache',
|
||||
},
|
||||
|
||||
order_by_entity: {
|
||||
type: 'CheckboxControl',
|
||||
label: 'Order by entity id',
|
||||
description: 'Important! Select this if the table is not already sorted by entity id, ' +
|
||||
'else there is no guarantee that all events for each entity are returned.',
|
||||
default: true,
|
||||
},
|
||||
|
||||
min_leaf_node_event_count: {
|
||||
type: 'SelectControl',
|
||||
freeForm: false,
|
||||
label: 'Minimum leaf node event count',
|
||||
default: 1,
|
||||
choices: formatSelectOptionsForRange(1, 10),
|
||||
description: 'Leaf nodes that represent fewer than this number of events will be initially ' +
|
||||
'hidden in the visualization',
|
||||
},
|
||||
};
|
||||
export default controls;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { D3_TIME_FORMAT_OPTIONS } from './controls';
|
||||
|
||||
import * as v from '../validators';
|
||||
|
||||
export const sections = {
|
||||
@@ -890,6 +889,51 @@ const visTypes = {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
event_flow: {
|
||||
label: 'Event flow',
|
||||
requiresTime: true,
|
||||
controlPanelSections: [
|
||||
{
|
||||
label: 'Event definition',
|
||||
controlSetRows: [
|
||||
['entity'],
|
||||
['all_columns_x'],
|
||||
['row_limit'],
|
||||
['order_by_entity'],
|
||||
['min_leaf_node_event_count'],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Additional meta data',
|
||||
controlSetRows: [
|
||||
['all_columns'],
|
||||
],
|
||||
},
|
||||
],
|
||||
controlOverrides: {
|
||||
entity: {
|
||||
label: 'Column containing entity ids',
|
||||
description: 'e.g., a "user id" column',
|
||||
},
|
||||
all_columns_x: {
|
||||
label: 'Column containing event names',
|
||||
validators: [v.nonEmpty],
|
||||
default: control => (
|
||||
control.choices && control.choices.length > 0 ?
|
||||
control.choices[0][0] : null
|
||||
),
|
||||
},
|
||||
row_limit: {
|
||||
label: 'Event count limit',
|
||||
description: 'The maximum number of events to return, equivalent to number of rows',
|
||||
},
|
||||
all_columns: {
|
||||
label: 'Meta data',
|
||||
description: 'Select any columns for meta data inspection',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default visTypes;
|
||||
|
||||
Reference in New Issue
Block a user