(option, patterns, xAxisIndex, yAxisIndex, scale, catePrefix)
| 461 | } |
| 462 | |
| 463 | function makeCategoryCartesian(option, patterns, xAxisIndex, yAxisIndex, scale, catePrefix) { |
| 464 | var data = makeCategoryData(scale, catePrefix); |
| 465 | var key = Math.random().toFixed(5); |
| 466 | |
| 467 | var axisColors = [ |
| 468 | '#2f4554', '#c23531', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3' |
| 469 | ]; |
| 470 | if (option.___test_axisColorIndex == null) { |
| 471 | option.___test_axisColorIndex = 0; |
| 472 | } |
| 473 | |
| 474 | option.legend = option.legend || { |
| 475 | tooltip: {show: true} |
| 476 | }; |
| 477 | getArray(option.legend, 'data').push('line1' + key, 'line2' + key, 'line3' + key); |
| 478 | |
| 479 | var xAxes = getArray(option, 'xAxis'); |
| 480 | var yAxes = getArray(option, 'yAxis'); |
| 481 | |
| 482 | if (!xAxes[xAxisIndex]) { |
| 483 | xAxes[xAxisIndex] = extend({ |
| 484 | data: data.categoryData, |
| 485 | boundaryGap: false, |
| 486 | splitArea: { |
| 487 | show: true |
| 488 | }, |
| 489 | axisLine: { |
| 490 | lineStyle: { |
| 491 | color: axisColors[option.___test_axisColorIndex++] |
| 492 | } |
| 493 | } |
| 494 | }, patterns['xAxis']); |
| 495 | } |
| 496 | if (!yAxes[yAxisIndex]) { |
| 497 | yAxes[yAxisIndex] = extend({ |
| 498 | nameLocation: 'middle', |
| 499 | nameGap: 40, |
| 500 | axisLine: { |
| 501 | lineStyle: { |
| 502 | color: axisColors[option.___test_axisColorIndex++] |
| 503 | } |
| 504 | } |
| 505 | }, patterns['yAxis']); |
| 506 | } |
| 507 | |
| 508 | var patternsSeries = patterns.series || []; |
| 509 | |
| 510 | getArray(option, 'series').push( |
| 511 | extend({ |
| 512 | id: 'line1-id' + key, |
| 513 | name: 'line1' + key, |
| 514 | xAxisIndex: xAxisIndex, |
| 515 | yAxisIndex: yAxisIndex, |
| 516 | type: 'line', |
| 517 | symbolSize: 10, |
| 518 | itemStyle: { |
| 519 | normal: { |
| 520 | color: yAxes[yAxisIndex].axisLine.lineStyle.color |
nothing calls this directly
no test coverage detected
searching dependent graphs…