MCPcopy Index your code
hub / github.com/apache/echarts / makeCategoryPolar

Function makeCategoryPolar

test/tooltipTestHelper.js:142–213  ·  view source on GitHub ↗
(option, patterns, inV)

Source from the content-addressed store, hash-verified

140}
141
142function makeCategoryPolar(option, patterns, inV) {
143 var data = makeCategoryData();
144 var key = Math.random().toFixed(5);
145
146 option.legend = option.legend || {
147 tooltip: {show: true}
148 };
149 getArray(option.legend, 'data').push('line1' + key, 'line2' + key, 'line3' + key);
150
151 var polar = extend({}, patterns.polar);
152 polar.id = 'polar' + key;
153 getArray(option, 'polar').push(polar);
154
155 var axisNames = ['radiusAxis', 'angleAxis'];
156 inV && axisNames.reverse();
157
158 getArray(option, axisNames[0]).push(extend({
159 id: axisNames[0] + key,
160 polarId: polar.id,
161 data: data.categoryData,
162 boundaryGap: false,
163 splitArea: {
164 show: true
165 }
166 }, patterns[axisNames[0]]));
167
168 getArray(option, axisNames[1]).push(extend({
169 id: axisNames[1] + key,
170 polarId: polar.id,
171 nameLocation: 'middle',
172 nameGap: 40
173 }, patterns[axisNames[1]]));
174
175 var patternsSeries = patterns.series || [];
176
177 getArray(option, 'series').push(
178 extend({
179 id: 'line1-id' + key,
180 name: 'line1' + key,
181 coordinateSystem: 'polar',
182 polarId: polar.id,
183 type: 'line',
184 symbolSize: 10,
185 data: data.data1,
186 connectNulls: true
187 }, patternsSeries[0]),
188 extend({
189 id: 'line2-id' + key,
190 name: 'line2' + key,
191 coordinateSystem: 'polar',
192 polarId: polar.id,
193 type: 'line',
194 symbolSize: 10,
195 data: data.data2
196 }, patternsSeries[1]),
197 extend({
198 id: 'line3-id' + key,
199 name: 'line3' + key,

Callers

nothing calls this directly

Calls 4

makeCategoryDataFunction · 0.85
getArrayFunction · 0.85
extendFunction · 0.85
toFixedMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…