Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distance: false not showing none of the other chart profiles #194

Closed
hupe13 opened this issue Apr 24, 2022 · 4 comments · Fixed by #199
Closed

distance: false not showing none of the other chart profiles #194

hupe13 opened this issue Apr 24, 2022 · 4 comments · Fixed by #199

Comments

@hupe13
Copy link
Contributor

hupe13 commented Apr 24, 2022

Hi Raruto,

you wrote in the Readme:

// Display distance info: true || "summary" || false

If I set distance to false, none of the chart profiles is displayed, even if I load the handlers with "import".

Your environment

  • leaflet-elevation: 2.2.4

Steps to reproduce

handlers: [
	import(".../leaflet-elevation-2.2.4/src/handlers/altitude.js"),
	import(".../leaflet-elevation-2.2.4/src/handlers/distance.js"),
	import(".../leaflet-elevation-2.2.4/src/handlers/time.js"),
],
altitude: true,
detached: true,
distance: false,

Expected behaviour

A chart profile should be displayed.

Actual behaviour

No chart profile is displayed.

The same effect occurs if you set distance to false in your file examples/leaflet-elevation.html.
What is wrong?

Thank you very much.

@Raruto
Copy link
Owner

Raruto commented May 6, 2022

Hi hupe, please when you create a new issue always try to add some pictures or demos that can show everyone pretty quickly what you mean (it takes a long time to force everyone to recreate your environment), anyway:

distance: false,

A chart profile should be displayed.

I think we are in a fairly extreme case here, but exactly what would you recommend to do? (keep in mind that at the implementation level all profiles share practically the same options, perhaps this one in particular was not only documented before).

Have a nice day,
Raruto

@hupe13
Copy link
Contributor Author

hupe13 commented May 7, 2022

I modified your example and set distance to false. As you can see, no length information appears in the summary and also not on the x axis. That is correct. But the chart does not appear either. That is not correct.
I don't know if anyone would want to display a chart without length specifications, but maybe they would?
I suggest either to adapt the readme or to find a solution to display the chart.

// Display distance info: true || "summary" || false

hupe13

@Raruto
Copy link
Owner

Raruto commented May 8, 2022

@hupe13 I haven't done extensive testing, but it should be a good starting point: #199

Let me know,
Raruto

@hupe13
Copy link
Contributor Author

hupe13 commented May 10, 2022

My tests are working right. Thank you very much.

@Raruto Raruto changed the title distance option false distance: false not showing none of the other chart profiles May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants