@antv/g2
Version:
the Grammar of Graphics in Javascript
17 lines • 458 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseGradient = void 0;
/**
* Parse heatmap gradient.
*/
function parseGradient(gradient) {
if (typeof gradient === 'string') {
return gradient.split(' ').map((stop) => {
const [r, c] = stop.split(':');
return [+r, c];
});
}
return gradient;
}
exports.parseGradient = parseGradient;
//# sourceMappingURL=gradient.js.map
;