Use Heightgraph in lieu of Elevation (part V)

- fix the grade calculation
- don't show the grade labels, as they are all over (should be normalized)
- fix the display issues by overridding the heightgraph CSS
This commit is contained in:
alexcojocaru 2020-10-12 11:53:07 -07:00
parent 8fcec8ec86
commit 5fd3977768
3 changed files with 72 additions and 32 deletions

View file

@ -200,18 +200,6 @@
}
elevation = new BR.Heightgraph();
// Trigger the chart resize after the toggle animation is complete,
// in case the window was resized while the chart was not visible.
// The resize must be called after the animation (i.e. 'shown.bs.collapse')
// and cannot be called before the animation (i.e. 'show.bs.collapse'),
// for the container has the old width pre animation and new width post animation.
var container = $('#elevation-chart');
container.on('shown.bs.collapse', function() {
elevation.resize({
width: container.width(),
height: container.height()
});
});
profile = new BR.Profile();
profile.on('update', function(evt) {