MCPcopy Index your code
hub / github.com/microsoft/SandDance / render

Method render

packages/sanddance-explorer/src/dialogs/chart.tsx:99–322  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 },

Callers

nothing calls this directly

Calls 6

disableSignalMethod · 0.95
getColumnMapOptionsFunction · 0.90
getTreemapColumnFunction · 0.90
filterMethod · 0.45
changeColumnMappingMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected