()
| 97 | } |
| 98 | |
| 99 | render() { |
| 100 | const { props } = this; |
| 101 | const { explorer, specCapabilities } = props; |
| 102 | const signals = explorer.viewer && |
| 103 | explorer.viewer.vegaSpec && |
| 104 | specCapabilities && |
| 105 | specCapabilities.signals && |
| 106 | explorer.viewer.vegaSpec.signals.filter(s => specCapabilities.signals.indexOf(s.name) >= 0); |
| 107 | return ( |
| 108 | <div> |
| 109 | <Group label={strings.labelChart}> |
| 110 | <div className="calculator"> |
| 111 | <base.fluentUI.ChoiceGroup |
| 112 | componentRef={this.choiceRef} |
| 113 | className="sanddance-chart-type" |
| 114 | options={chartLabelMap.map(o => { |
| 115 | return { |
| 116 | ...o, |
| 117 | checked: props.chart === o.key, |
| 118 | disabled: props.disabled |
| 119 | || (o.key === 'treemap' && props.quantitativeColumns.length === 0), |
| 120 | }; |
| 121 | })} |
| 122 | onChange={(e, o) => props.onChangeChartType(o.key as SandDance.specs.Chart)} |
| 123 | /> |
| 124 | </div> |
| 125 | </Group> |
| 126 | <Group label={strings.labelColumnMapping}> |
| 127 | <div> |
| 128 | {specCapabilities && specCapabilities.roles.map((specRole, i) => { |
| 129 | const specColumnInRole = props.insightColumns[specRole.role]; |
| 130 | const selectedColumnName = specColumnInRole; |
| 131 | let disabledColumnName: string; |
| 132 | let prefix: JSX.Element; |
| 133 | let suffix: JSX.Element; |
| 134 | let hideDropdown = false; |
| 135 | let { totalStyle } = props; |
| 136 | if (!totalStyle) { |
| 137 | totalStyle = 'count-square'; |
| 138 | } |
| 139 | let { facetStyle } = props; |
| 140 | if (!facetStyle) { |
| 141 | facetStyle = 'wrap'; |
| 142 | } |
| 143 | switch (specRole.role) { |
| 144 | case 'facet': { |
| 145 | suffix = ( |
| 146 | <Dropdown |
| 147 | disabled={!props.insightColumns.facet} |
| 148 | collapseLabel={props.collapseLabels} |
| 149 | label={strings.labelFacetLayout} |
| 150 | calloutProps={{ style: { minWidth: '18em' } }} |
| 151 | options={[ |
| 152 | { |
| 153 | key: 'header1', |
| 154 | text: `${strings.labelFacetLayout}:`, |
| 155 | itemType: base.fluentUI.DropdownMenuItemType.Header, |
| 156 | }, |
nothing calls this directly
no test coverage detected