| 4 | import * as VegaDeckGl from '@msrvida/vega-deck.gl'; |
| 5 | |
| 6 | function cloneAxis(axes: VegaDeckGl.types.Axis[], axisColor: VegaDeckGl.RGBAColor, axisTextColor: VegaDeckGl.RGBAColor) { |
| 7 | return axes.map(axis => { |
| 8 | const newAxis = VegaDeckGl.util.deepMerge(axis); |
| 9 | if (newAxis.domain) { |
| 10 | newAxis.domain.color = axisColor; |
| 11 | } |
| 12 | if (newAxis.title) { |
| 13 | newAxis.title.color = axisTextColor; |
| 14 | } |
| 15 | newAxis.ticks.forEach(t => { t.color = axisColor; }); |
| 16 | newAxis.tickText.forEach(t => { t.color = axisTextColor; }); |
| 17 | return newAxis; |
| 18 | }); |
| 19 | } |
| 20 | |
| 21 | function cloneTextData(textData: VegaDeckGl.types.VegaTextLayerDatum[], color: VegaDeckGl.RGBAColor) { |
| 22 | return textData.map(t => { |