Grayscale Bar Charts w/ PCL Printers
There are 8 different shades of gray on a PCL printer, and it figures out the grayscale based upon a formula for luminance. The first step is a conversion to gray percent with the following formulas:
grayPixel = ( red * 0.3 ) + ( green * 0.59 ) + ( blue * 0.11 );
grayPercent = 100 - ( ( grayPixel / 256 ) * 100 );
Then a PCL printer converts this gray percent like this, except that anything less than 5% is changed to 0% and anything greater than 95% is changed to 100%:
NOTE: For greater shading differentiation, change the resolution of the chart to 120, 90, or 72. Pick gray scales (not gray percent) that are in between thresholds using the increments of 28 for 72dpi, 36 for 90dpi, and 42 for 120 dpi. For example, using 120dpi, the thresholds are 42, 84, 126, 168, 210, 252. Anything past the last threshold is white. Pick gray scales that fall in between the thresholds to get different shades.
The dpi can be set from the Appearance tab of the Bar Chart Properties:
Next, navigate to the Data tab, select the Data Series and select Edit. The Chart Data Series dialog box will display. Left-click the Bar color and put in the following values for a dark gray:
For a lighter gray: