mirror of
https://github.com/apache/superset.git
synced 2026-04-24 02:25:13 +00:00
[Feature] Percentage columns in Table Viz (#3586)
* Added percent metric options to table viz * Added unit tests for TableViz * fixed code for python3 * bump travis
This commit is contained in:
committed by
Maxime Beauchemin
parent
adef519583
commit
e121a8585e
@@ -100,6 +100,19 @@ export const controls = {
|
||||
description: t('One or many metrics to display'),
|
||||
},
|
||||
|
||||
percent_metrics: {
|
||||
type: 'SelectControl',
|
||||
multi: true,
|
||||
label: t('Percentage Metrics'),
|
||||
valueKey: 'metric_name',
|
||||
optionRenderer: m => <MetricOption metric={m} />,
|
||||
valueRenderer: m => <MetricOption metric={m} />,
|
||||
mapStateToProps: state => ({
|
||||
options: (state.datasource) ? state.datasource.metrics : [],
|
||||
}),
|
||||
description: t('Metrics for which percentage of total are to be displayed'),
|
||||
},
|
||||
|
||||
y_axis_bounds: {
|
||||
type: 'BoundsControl',
|
||||
label: t('Y Axis Bounds'),
|
||||
|
||||
@@ -338,8 +338,9 @@ export const visTypes = {
|
||||
label: t('GROUP BY'),
|
||||
description: t('Use this section if you want a query that aggregates'),
|
||||
controlSetRows: [
|
||||
['groupby', 'metrics'],
|
||||
['include_time', null],
|
||||
['groupby'],
|
||||
['metrics', 'percent_metrics'],
|
||||
['include_time'],
|
||||
['timeseries_limit_metric', 'order_desc'],
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user