Towards a generic elevation profile chart with d3js