Page 1 of 1

How to represent Zeros and Nulls in white color

Posted: Tue Sep 11, 2018 7:05 am
by 14047022
Hi,

I'm using Color grid for tee chart. I want to represent Zeros and nulls in white color using color palette or in different way. Can anyone help on this how to plot colorgrid nulls and zeros with white color.

Regards,
PSKN

Re: How to represent Zeros and Nulls in white color

Posted: Wed Sep 12, 2018 11:04 am
by yeray
Hello,

You could redefine the getColor function adding a condition to return the white color when you want. Ie:

Code: Select all

  colorGrid.oldgetColor=colorGrid.getColor;
  colorGrid.getColor=function(value) {
    if ((value === null) || (value === 0)) {
      return { r: 255, g: 255, b: 255, a: 0 };
    }
    return colorGrid.oldgetColor(value);
  }