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

Function makeValueGrid

test/tooltipTestHelper.js:294–367  ·  view source on GitHub ↗
(option, patterns)

Source from the content-addressed store, hash-verified

292}
293
294function makeValueGrid(option, patterns) {
295 var data = makeValueData();
296 var key = Math.random().toFixed(5);
297
298 option.legend = option.legend || {
299 tooltip: {show: true}
300 };
301 getArray(option.legend, 'data').push('line1' + key, 'line2' + key, 'line3' + key);
302
303 var grid = extend({}, patterns.grid);
304 grid.id = 'grid' + key;
305 getArray(option, 'grid').push(grid);
306
307 getArray(option, 'xAxis').push(extend({
308 id: 'xAxis' + key,
309 gridId: grid.id,
310 type: 'value',
311 splitArea: {
312 show: true
313 }
314 }, patterns['xAxis']));
315
316 getArray(option, 'yAxis').push(extend({
317 id: 'yAxis' + key,
318 gridId: grid.id,
319 nameLocation: 'middle',
320 nameGap: 40
321 }, patterns['yAxis']));
322
323 var patternsSeries = patterns.series || [];
324
325 getArray(option, 'series').push(
326 extend({
327 id: 'scatter1-id' + key,
328 name: 'scatter1' + key,
329 xAxisId: 'xAxis' + key,
330 yAxisId: 'yAxis' + key,
331 type: 'scatter',
332 symbolSize: 10,
333 data: data.data1,
334 smooth: true,
335 connectNulls: true
336 }, patternsSeries[0]),
337 extend({
338 id: 'scatter2-id' + key,
339 name: 'scatter2' + key,
340 xAxisId: 'xAxis' + key,
341 yAxisId: 'yAxis' + key,
342 type: 'scatter',
343 symbolSize: 10,
344 data: data.data2,
345 connectNulls: true,
346 smooth: true
347 }, patternsSeries[1]),
348 extend({
349 id: 'scatter3-id' + key,
350 name: 'scatter3' + key,
351 xAxisId: 'xAxis' + key,

Callers

nothing calls this directly

Calls 4

makeValueDataFunction · 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…