MCPcopy Create free account
hub / github.com/Rello/analytics / item

Function item

js/visualization.js:2234–2238  ·  view source on GitHub ↗
(indexes, text, color, pointStyle = 'rect')

Source from the content-addressed store, hash-verified

2232 || [...measures.values()].some(indexes => new Set(indexes.map(type)).size !== 1)
2233 || [...measures.values()].some(indexes => !['bar', 'line'].includes(type(indexes[0])))) return null;
2234 const item = (indexes, text, color, pointStyle = 'rect') => ({
2235 text, fillStyle: color, strokeStyle: color, pointStyle,
2236 lineWidth: 2, datasetIndex: indexes[0], analyticsDatasetIndexes: indexes,
2237 hidden: indexes.every(index => !chart.isDatasetVisible(index)),
2238 });
2239 return [
2240 ...[...groups.values()].map(indexes => item(indexes, datasets[indexes[0]].analyticsGroupLabel, datasets[indexes[0]].backgroundColor)),
2241 ...[...measures.values()].map(indexes => item(indexes,

Callers 1

visualization.jsFile · 0.85

Calls 1

isDatasetVisibleMethod · 0.80

Tested by

no test coverage detected