sentilo-catalog-web/src/main/webapp/static/js/chartist-plugin-legend.js
Function legend
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chartist.plugins.legend = function (options) {
// Catch invalid options
if (options && options.position) {
if (!(options.position === 'top' || options.position === 'bottom' || options.position instanceof HTMLElement)) {
Function legend
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function legend(chart) {
function removeLegendElement() {
var legendElement = chart.container.querySelector('.ct-legend');
if (legendElement) {
Function addClickHandler
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addClickHandler(legendElement, legends, seriesMetadata, useLabels) {
legendElement.addEventListener('click', function(e) {
var li = e.target;
if (li.parentNode !== legendElement || !li.hasAttribute('data-legend'))
return;