I wanted to have this type of elevation profile data. as we select the trail the left panel opens up and the chart is generated.
if this feature is not available any other api which takes request of latitude and longitude and return the data of elevation profile data.
The code behind this site is available here:
Read the blog Raluca Nicola wrote about creating this:
Is there any method or engine in arcgis which provides co-ordinates to lat long conversion or,
generate polyline with paths array as shown below.
Even if there currently isn't an elevation profile widget, there are many resources and techniques that can help you create one. Sometimes the geometries already contain Z values and then it's just a matter of sending those elevation values to your favorite charting library. Other times we can use the Elevation Sampler api class to extract elevation values from the current display or elevation layer, and then chart those values. In some cases you might want to use elevation values derived from an elevation service, and to help you do that you can use some of the Esri Elevation Analysis services.
Here's an old demo which uses the Sketch tools to define the geometry and then uses the ElevationSampler class to get elevations used in the current display view:
GitHub: Create Elevation Profiles
We hope this helps.