1) Keep the selected columns for the X and Y-axis.

2) Lighten the color of the stacked line chart.
This commit is contained in:
Akshay Joshi
2022-07-06 18:58:15 +05:30
parent 59f5c0d955
commit 9cdcad7a88
2 changed files with 55 additions and 4 deletions

View File

@@ -222,3 +222,37 @@ export function ConvertHexToRGBA(hex, opacity) {
return `rgba(${r},${g},${b},${opacity / 100})`;
}
// This function is used to Lighten/Darken color.
export function LightenDarkenColor(color, amount) {
let usePound = false;
if (color[0] == '#') {
color = color.slice(1);
usePound = true;
}
let num = parseInt(color, 16);
let r = (num >> 16) + amount;
if (r > 255) {
r = 255;
} else if (r < 0) {
r = 0;
}
let b = ((num >> 8) & 0x00FF) + amount;
if (b > 255) {
b = 255;
} else if (b < 0) {
b = 0;
}
let g = (num & 0x0000FF) + amount;
if (g > 255) {
g = 255;
} else if (g < 0) {
g = 0;
}
return (usePound?'#':'') + (g | (b << 8) | (r << 16)).toString(16);
}