I tried to modify the sample code Histogram Time Slider ArcGIS API for JavaScript from AMD to Legacy style. However, I found the histogram was not shown in the bottom in the application (link listed below). I am wondering if you could provide valuable opinions on the application. I am not sure if the Histogram Time slider not supported in DoJo <1.8

The Histogram time slider application based on Legacy style http://maps.nmt.edu/JSTest/Histogram/Histogram_Legacy.html

1 Answer 1


Two corrections needed here

  1. The legacy event name is onUpdateEnd, not update-end

  2. When initializing the Histogram Slide, pass it sliderElem, not dojo.byId("bottom-div")

You should be good then!

More explanation on the 2nd step: The bottom-div element is already registered with Dojo. It is a Dojo ContentPane so it can't be used for another Dojo Widget. So we have to construct an element inside bottom-div. Otherwise you will see an error in console like this

Tried to register widget with id==bottom-div but that id is already registered(…)

I saw in your code that you have already constructed the element in the variable sliderElem. And also saw it being used in the Esri sample.


  • Thank you for the valuable opinions. I am new in JavaScript. I have followed your instructions. First, I have changed the event name from update-end to onUpdateEnd. However, could you provide more information on the point 2, in the source code, line 82 and 97, I can see dojo.byId("bottom-div"). Could you provide more detailed information on these two lines? Many thanks, Hank Dec 18, 2015 at 18:38
  • I just tried to replace the dojo.byId("bottom-div") in the line 97. Wow! And then I can see the Histogram. I appreciate your opinions. If possible, could you share how you tell the error in the line 97 and provide the suggestion "pass it sliderElem, not dojo.byId("bottom-div")" Many thanks,<br> Hank Dec 18, 2015 at 18:52
  • updated my answer with explanation Dec 18, 2015 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.