MCPcopy
hub / github.com/apache/echarts / makeCategoryGrid

Function makeCategoryGrid

test/tooltipTestHelper.js:215–292  ·  view source on GitHub ↗
(option, patterns, inV, dataCount, seriesType, catePrefix)

Source from the content-addressed store, hash-verified

213}
214
215function makeCategoryGrid(option, patterns, inV, dataCount, seriesType, catePrefix) {
216 var data = makeCategoryData(null, catePrefix, dataCount);
217 var key = Math.random().toFixed(5);
218 seriesType = seriesType || 'line';
219
220 option.legend = option.legend || {
221 tooltip: {show: true}
222 };
223 getArray(option.legend, 'data').push('line1' + key, 'line2' + key, 'line3' + key);
224
225 var grid = extend({}, patterns.grid);
226 grid.id = 'grid' + key;
227 getArray(option, 'grid').push(grid);
228
229 var axisNames = ['xAxis', 'yAxis'];
230 inV && axisNames.reverse();
231
232 getArray(option, axisNames[0]).push(extend({
233 id: axisNames[0] + key,
234 gridId: grid.id,
235 data: data.categoryData,
236 boundaryGap: false,
237 splitArea: {
238 show: true
239 }
240 }, patterns[axisNames[0]]));
241
242 getArray(option, axisNames[1]).push(extend({
243 id: axisNames[1] + key,
244 gridId: grid.id,
245 nameLocation: 'middle',
246 nameGap: 40
247 }, patterns[axisNames[1]]));
248
249 var patternsSeries = patterns.series || [];
250
251 getArray(option, 'series').push(
252 extend({
253 id: 'line1-id' + key,
254 name: 'line1' + key,
255 xAxisId: 'xAxis' + key,
256 yAxisId: 'yAxis' + key,
257 type: seriesType,
258 symbolSize: 10,
259 data: data.data1,
260 smooth: true,
261 connectNulls: true
262 }, patternsSeries[0]),
263 extend({
264 id: 'line2-id' + key,
265 name: 'line2' + key,
266 xAxisId: 'xAxis' + key,
267 yAxisId: 'yAxis' + key,
268 type: seriesType,
269 symbolSize: 10,
270 data: data.data2,
271 connectNulls: true,
272 smooth: true

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…