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

Function makeTimeGrid

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

Source from the content-addressed store, hash-verified

368
369
370function makeTimeGrid(option, patterns) {
371 var data = makeTimeData();
372 var key = Math.random().toFixed(5);
373
374 option.legend = option.legend || {
375 tooltip: {show: true}
376 };
377 getArray(option.legend, 'data').push('scatter1' + key, 'scatter2' + key, 'scatter3' + key);
378
379 var grid = extend({}, patterns.grid);
380 grid.id = 'grid' + key;
381 getArray(option, 'grid').push(grid);
382
383 getArray(option, 'xAxis').push(extend({
384 id: 'xAxis' + key,
385 type: 'time',
386 gridId: grid.id,
387 splitArea: {
388 show: true
389 }
390 }, patterns['xAxis']));
391
392 getArray(option, 'yAxis').push(extend({
393 id: 'yAxis' + key,
394 gridId: grid.id,
395 nameLocation: 'middle',
396 nameGap: 40
397 }, patterns['yAxis']));
398
399 var patternsSeries = patterns.series || [];
400
401 getArray(option, 'series').push(
402 extend({
403 id: 'scatter1-id' + key,
404 name: 'scatter1' + key,
405 xAxisId: 'xAxis' + key,
406 yAxisId: 'yAxis' + key,
407 type: 'line',
408 symbolSize: 5,
409 label: {
410 emphasis: {
411 show: true,
412 textStyle: {
413 color: '#333'
414 }
415 }
416 },
417 data: data.data1,
418 smooth: true,
419 connectNulls: true
420 }, patternsSeries[0]),
421 extend({
422 id: 'scatter2-id' + key,
423 name: 'scatter2' + key,
424 xAxisId: 'xAxis' + key,
425 yAxisId: 'yAxis' + key,
426 type: 'line',
427 symbolSize: 5,

Callers

nothing calls this directly

Calls 4

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