Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
legends.forEach(legend => {
renderLegendToCanvas(this.ctx, {
...legend,
data: legendData,
containerWidth: width,
containerHeight: height,
theme,
})
})
}
legends.forEach(legend => {
renderLegendToCanvas(ctx, {
...legend,
data: legend.data || legendData,
containerWidth: innerWidth,
containerHeight: innerHeight,
theme,
})
})
}
legends.forEach(legend => {
renderLegendToCanvas(this.ctx, {
...legend,
data: legendData,
containerWidth: width,
containerHeight: height,
})
})
}
legends.forEach(legend => {
renderLegendToCanvas(this.ctx, {
...legend,
data: arcs.map(arc => ({
id: arc.data.id,
label: arc.data.id,
color: arc.color,
})),
containerWidth: width,
containerHeight: height,
theme,
})
})
}
legends.forEach(legend => {
let legendData
if (legend.dataFrom === 'keys') {
legendData = legendDataForKeys
} else if (legend.dataFrom === 'indexes') {
legendData = legendDataForIndexes
}
if (legendData === undefined) return null
renderLegendToCanvas(this.ctx, {
...legend,
data: legendData,
containerWidth: width,
containerHeight: height,
itemTextColor: '#999',
symbolSize: 16,
theme,
})
})
legends.forEach(legend => {
renderLegendToCanvas(ctx, {
...legend,
data: legendData,
containerWidth: width,
containerHeight: height,
theme,
})
})
} else {
legends.forEach(legend => {
const legendData = colorScale.ticks(legend.itemCount).map(value => ({
id: value,
label: value,
color: colorScale(value),
}))
renderLegendToCanvas(this.ctx, {
...legend,
data: legendData,
containerWidth: width,
containerHeight: height,
theme,
})
})
}
legends.forEach(legend => {
renderLegendToCanvas(ctx, {
...legend,
data: legendData,
containerWidth: innerWidth,
containerHeight: innerHeight,
theme,
})
})
legends.forEach(legend => {
renderLegendToCanvas(ctx, {
...legend,
data: legendData,
containerWidth: innerWidth,
containerHeight: innerHeight,
theme,
})
})
} else if (typeof layer === 'function') {