Raruto / leaflet-elevation

Leaflet plugin that allows to add elevation profiles using d3js
GNU General Public License v3.0
254 stars 82 forks source link

Fixed height for detached elevation chart #212

Closed tomyv65 closed 2 years ago

tomyv65 commented 2 years ago

Hi, I am using elevation-leaflet with the option detached: true for the elevation chart container. The container has a variable height and adjusts itself depending on the screen which can cause problems on mobile devices and besides that bedides that I do not like that. Anyway I would like to assign a fixed height for the elevation chart. How can I achieve that: CSS or elevation_options or ...?!?

http://bike-the-world.net/Daytrips-Training-2022.329.0.html?btwreports%5Bmode%5D=6&btwreports%5BshowUid%5D=47

Thanks for your help,

hupe13 commented 2 years ago

There is an undocumented option height, e.g.:

elevationControl: {
   url: "https://.....gpx",
   options: {
      ....
      detached: true,
      height: 300,
      ...
tomyv65 commented 2 years ago

Thnaks a lot, just discovered in options.js