#1661: Improved naming of variables and replaced literals with constants. Added new IsVisibleInLegend visual property for data rows.