Fix loading on fifox + reorganise render code

Fix data loading from file and database on firefox + Split data before computing scales in render method (In anticipation of implementing bar element, and especialy stacked bars)