mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
feat: Add groupBase axis option
This commit is contained in:
parent
91ae54d1c1
commit
9768ecfcc5
3 changed files with 12 additions and 13 deletions
|
|
@ -52,9 +52,14 @@ limitations under the License.
|
|||
</span>
|
||||
<span ng-if="isGroupAxis(axisSpec)"
|
||||
class="label label-default"
|
||||
style="background-color: #CD5C5C; font-weight: 300; font-size: 13px; margin-left: 3px;">
|
||||
style="background-color: #cd5c5c; font-weight: 300; font-size: 13px; margin-left: 3px;">
|
||||
group by
|
||||
</span>
|
||||
<span ng-if="isGroupBaseAxis(axisSpec)"
|
||||
class="label label-default"
|
||||
style="background-color: #906ebd; font-weight: 300; font-size: 13px; margin-left: 3px;">
|
||||
group base
|
||||
</span>
|
||||
|
||||
<!-- axis box: in case of single dimension -->
|
||||
<ul data-drop="true"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export const Aggregator = {
|
|||
}
|
||||
export function isAggregator(axisSpec) { return axisSpec.aggregator; }
|
||||
export function isGroup(axisSpec) { return axisSpec.group; }
|
||||
export function isGroupBase(axisSpec) { return axisSpec.groupBase; }
|
||||
export function isSingleDimension(axisSpec) { return axisSpec.dimension === 'single'; }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
import Transformation from './transformation';
|
||||
|
||||
import {
|
||||
isAggregator, isGroup, isSingleDimension,
|
||||
isAggregator, isGroup, isGroupBase, isSingleDimension,
|
||||
groupAndAggregateRows, getGroupAndAggrColumns,
|
||||
} from './advanced-transformation-util';
|
||||
|
||||
|
|
@ -99,10 +99,6 @@ class AdvancedTransformation extends Transformation {
|
|||
return `${axisSpec.name} (${axisSpec.type})`
|
||||
},
|
||||
|
||||
isAggregatorAxis: (axisSpec) => {
|
||||
return isAggregator(axisSpec)
|
||||
},
|
||||
|
||||
toggleColumnPanel: () => {
|
||||
configInstance.panel.columnPanelOpened =
|
||||
!configInstance.panel.columnPanelOpened
|
||||
|
|
@ -115,13 +111,10 @@ class AdvancedTransformation extends Transformation {
|
|||
self.emitConfig(configInstance)
|
||||
},
|
||||
|
||||
isGroupAxis: (axisSpec) => {
|
||||
return isGroup(axisSpec)
|
||||
},
|
||||
|
||||
isSingleDimensionAxis: (axisSpec) => {
|
||||
return isSingleDimension(axisSpec)
|
||||
},
|
||||
isGroupAxis: (axisSpec) => { return isGroup(axisSpec) },
|
||||
isGroupBaseAxis: (axisSpec) => { return isGroupBase(axisSpec) },
|
||||
isAggregatorAxis: (axisSpec) => { return isAggregator(axisSpec) },
|
||||
isSingleDimensionAxis: (axisSpec) => { return isSingleDimension(axisSpec) },
|
||||
|
||||
parameterChanged: (paramSpec) => {
|
||||
self.emitConfig(configInstance)
|
||||
|
|
|
|||
Loading…
Reference in a new issue