Skip to content

Commit

Permalink
Error en color coding cuando el nombre de la columna tiene un _
Browse files Browse the repository at this point in the history
  • Loading branch information
asafJortilles committed Jan 3, 2024
1 parent 731d7c7 commit 8b2f51d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class EdaTableComponent implements OnInit {
const colors = this.generateColor(styles[i].max, styles[i].min, 5);

colors.forEach((color, i) => {
let name = key.replace('%', 'percent').replace(/ /g, '').replace(/[^a-zA-Z0-9 ]/g, '') ;
let name = key.replace('%', 'percent').replace(/ /g, '').replace(/[^a-zA-Z0-9-_ ]/g, '') ;
this.elementRef.nativeElement.style.setProperty(`--table-gradient-bg-color-${name}-${i}`, `#${color} `);
this.styleService.setStyles(`.table-gradient-${name}-${i}`,
{
Expand All @@ -150,8 +150,7 @@ export class EdaTableComponent implements OnInit {
}

applyPivotSyles(styles){
//console.log('Los estilos que me llegan son ');
//console.log(styles.toString());


const fields = styles.map(style => style.col);
const limits = {};
Expand Down Expand Up @@ -227,6 +226,7 @@ export class EdaTableComponent implements OnInit {
});

this.styles = tmpStyles;

}

/**Genertate range colors =>> thanks to Euler Junior: https://stackoverflow.com/a/32257791 */
Expand Down

0 comments on commit 8b2f51d

Please sign in to comment.