Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Oct 11, 2024
1 parent 188d7e2 commit f93517d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/AD_Server/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ function generateChart(data, reportType, hiddenItems = {}) {
values.push(item.total_ads);
videoIds.push(item.videos_id);

var baseColor = getColorForElement(label); // Get consistent color for the element
var baseColor = getColorForElement(empty(item.type)?videoLabel.join(''):item.type); // Get consistent color for the element
backgroundColors.push(baseColor.replace('1)', '0.5)')); // Set background color to 50% transparent
borderColors.push(baseColor.replace('0.5)', '1)')); // Set border color as solid
});
Expand Down Expand Up @@ -608,7 +608,7 @@ function generatePieChart(data) {
if (item.total_ads >= maxValue * percentageThreshold) {
pieLabels.push(label);
pieValues.push(item.total_ads);
var baseColor = getColorForElement(label); // Get consistent color for the element
var baseColor = getColorForElement(empty(item.type)?videoLabel.join(''):item.type); // Get consistent color for the element
pieColors.push(baseColor.replace('1)', '0.5)')); // Set background color to 50% transparent
pieBorderColors.push(baseColor.replace('0.5)', '1)')); // Set border color as solid
} else {
Expand Down

0 comments on commit f93517d

Please sign in to comment.