@opendata-ai/openchart-vanilla 6.15.1 → 6.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -3375,15 +3375,15 @@ function appendStop(parent, stop) {
|
|
|
3375
3375
|
}
|
|
3376
3376
|
parent.appendChild(stopEl);
|
|
3377
3377
|
}
|
|
3378
|
+
var globalGradientCounter = 0;
|
|
3378
3379
|
function buildGradientDefs(marks, defs) {
|
|
3379
3380
|
const map = /* @__PURE__ */ new Map();
|
|
3380
|
-
let counter = 0;
|
|
3381
3381
|
for (const mark of marks) {
|
|
3382
3382
|
const fill = mark.fill;
|
|
3383
3383
|
if (fill && isGradientDef(fill)) {
|
|
3384
3384
|
const key = gradientKey(fill);
|
|
3385
3385
|
if (!map.has(key)) {
|
|
3386
|
-
const id = `oc-grad-${
|
|
3386
|
+
const id = `oc-grad-${globalGradientCounter++}`;
|
|
3387
3387
|
const el = createGradientElement(fill, id);
|
|
3388
3388
|
defs.appendChild(el);
|
|
3389
3389
|
map.set(key, id);
|