Browse Source

UI: clear code

pull/10557/head
Vladyslav_Prykhodko 2 years ago
parent
commit
500863e213
  1. 32
      ui-ngx/src/app/modules/home/components/widget/lib/canvas-digital-gauge.ts

32
ui-ngx/src/app/modules/home/components/widget/lib/canvas-digital-gauge.ts

@ -230,38 +230,6 @@ export class CanvasDigitalGauge extends BaseGauge {
}
}
// const colorsCount = options.levelColors.length;
// const isColorProperty = isString(options.levelColors[0]);
// const inc = colorsCount > 1 ? (1 / (colorsCount - 1)) : 1;
// options.colorsRange = [];
// if (options.neonGlowBrightness) {
// options.neonColorsRange = [];
// }
// for (let i = 0; i < options.levelColors.length; i++) {
// const levelColor: any = options.levelColors[i];
// if (levelColor !== null) {
// let percentage: number;
// if (isColorProperty) {
// percentage = inc * i;
// } else {
// percentage = CanvasDigitalGauge.normalizeValue(levelColor.value, options.minValue, options.maxValue);
// }
// let tColor = tinycolor(isColorProperty ? levelColor : levelColor.color);
// options.colorsRange.push({
// pct: percentage,
// color: tColor.toRgb(),
// rgbString: tColor.toRgbString()
// });
// if (options.neonGlowBrightness) {
// tColor = tinycolor(isColorProperty ? levelColor : levelColor.color).brighten(options.neonGlowBrightness);
// options.neonColorsRange.push({
// pct: percentage,
// color: tColor.toRgb(),
// rgbString: tColor.toRgbString()
// });
// }
// }
// }
options.ticksValue = [];
for (const tick of options.ticks) {
if (tick !== null) {

Loading…
Cancel
Save