refactoring related scope logic in chart.widget.cross