| | |
| | | |
| | | if (plot.colors && plot.colors.length > 0) { |
| | | if (plot.ramp === 'true') { |
| | | let _s = 'l(0) ' |
| | | if (plot.rampDirection === 'vertical') { |
| | | _s = 'l(90) ' |
| | | } |
| | | plot.colors.forEach(item => { |
| | | if (!colors.has(transfield[item.type])) { |
| | | colors.set(transfield[item.type], `l(0) 0:${item.color} 1:${item.color1}` ) |
| | | colors.set(transfield[item.type], `${_s}0:${item.color} 1:${item.color1}` ) |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | let limit = chartColors.length |
| | | _chart.color('key', (key) => { |
| | | if (colors.has(key)) { |
| | | if (plot.area === 'true' && plot.rampDirection === 'vertical') { |
| | | return colors.get(key).replace(/l\(9?0\) 0:|\s1:.*/ig, '') |
| | | } |
| | | return colors.get(key) |
| | | } else { |
| | | colorIndex++ |