UNPKG

zz-chart

Version:

Alauda Chart components by Alauda Frontend Team

17 lines 560 B
import { template as _template } from 'lodash-es'; import { CHART_PREFIX, DEFAULT_COLORS } from './constant.js'; export function getChartColor(index) { const colorIndex = index % DEFAULT_COLORS.length; return DEFAULT_COLORS[colorIndex]; } export function generateName(name) { return `${CHART_PREFIX}-${name}`; } const TEMPLATE_OPTIONS = { // eslint-disable-next-line regexp/match-any interpolate: /{([\S\s]+?)}/g, }; export function template(str, data) { return _template(str, TEMPLATE_OPTIONS)(data); } //# sourceMappingURL=unit.js.map