<style>
#histogram-container text, #histogram-range,
#scale-bar-left text, #scale-bar-right text {
font-family: sans-serif;
}
#histogram-timeslider-dijit #focusTip {
font-family: sans-serif;
}
</style>
<script src="//js.arcgis.com/3.6/"></script>
<script type="text/javascript" language="javascript">
var OGWells = new FeatureLayer("http://kgs.uky.edu/arcgis/rest/services/KYOilGas/KYOilGasWells_static_time/MapServer/0",
{id:"OGWells",
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["*"]
});
OGWells.setDefinitionExpression("date_permit_issued > date '1/1/2010'");
map.addLayers([OGWells]);
dojo.connect(map, 'onLoad', function (theMap) {
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
var layerUpdateEnd = OGWells.on("update-end", function() {
layerUpdateEnd.remove();
var sliderElem = domConstruct.create("div", {
id: "timeSlider_"+ map.id,
style: "margin-bottom:10px; bottom:33px"
}, "bottom-div");
var sliderParams = {
color: "#005DAB",
dateFormat: "DateFormat(selector: 'date_permit_issued', fullYear: true)",
layers : [OGWells],
mode: "show_all",
timeInterval: "esriTimeUnitsMonths"
};
var slider = new HistogramTimeSlider(sliderParams, sliderElem);
map.setTimeSlider(slider);
domConstruct.destroy("loading");
});
</script>
<body>
<div style="position:absolute; font-family:Veranda,sans-serif; margin-left:35%; padding-top: 5px";>Drilled Oil and Gas Wells <span id="daterange">2010 to Present Day</span> (Permitted date)</div>
<div id="timeSlider_mapDiv" class="histogram-timeslider esriTimeSlider" widgetid="timeSlider_mapDiv">
<div id="histogram-timeslider-dijit" style="height:50px" >
</body>
Having similar issue. Mine is incidents w/in the past 24 hours with a given start/end time. I am trying to use the histogram time slider, but I have 2 issues:
1) The time starts at 12:12 - 1:12 (instead of 12:00 - 1:00)
2) The data counts don't match the data displayed.
Ex: You might move the slider to show all data from 3:12 - 4:12 AM. Half the points have a start time of 10 PM or 7 AM or some other random time. Also, when I look at the raw data, the data counts don't really add up anyway.
One thing you might try is from the layer in ArcMap. Get the Properties > Time and hit calculate for "Layer Time Extent". I don't know if this helps, but I did have a problem with the slider showing the wrong dates, and that may have helped.