Please help its urgent, actually there is a feature we need to implement in our project that if i change the first and last time to change the range on timeline, so at the same time i want to change the first and last item on another timeline accordingly by using draw.redraw method but we are getting blank timeline and also not getting any error. so please help.
$scope.changeVisibleChartRange = function(dateObj){
//charttimeline.setVisibleChartRange(dateObj.startr, dateObj.endr);
$scope.externalStartDate = dateObj.startr;
$scope.externalEndDate = dateObj.endr;
$scope.charttimelinedata2 = [
{'start': $scope.externalStartDate, 'content': 'First'},
{'start': $scope.externalEndDate, 'content': 'Last'}
];
//set data for redrawing the timeline
//charttimeline.redraw($scope.charttimelinedata2);
//$scope.drawVisualization();
charttimeline.redraw();
}
// handler to draw timeline slider
$scope.drawVisualization = function(){
// create and populate an array with data
$scope.charttimelinedata = [
{'start': $scope.timelineStartSelector, 'content': 'First'},
{'start': $scope.timelineEndRange, 'content': 'Last'}
];
var maxRange = $scope.addMinutes($scope.timelineEndRange, 2);
// specify options
$scope.timelineoptions = {
"width": "100%",
"height": "120px",
"min": $scope.timelineStartRange, // lower limit of visible range
"max": maxRange, // upper limit of visible range
"zoomMin": 1000 * 60, // one day in milliseconds
"zoomMax": 1000 * 60 * 60 * 24 * 31, // zoom level for maximum 31 days
"editable": true
};
// Instantiate our timeline object.
charttimeline = new links.Timeline(document.getElementById('timeline_slider'), $scope.timelineoptions);
links.events.addListener(charttimeline, 'changed', $scope.onRangeChange);
links.events.addListener(charttimeline, 'add', $scope.onadd);
// Draw our timeline with the created data and options
charttimeline.draw($scope.charttimelinedata);
charttimeline.setSelection([{'row':0}]);
charttimeline.move(0.5);
charttimeline.zoom(-0.1);
$scope.rangeSetExternally = false;
}
Please help its urgent, actually there is a feature we need to implement in our project that if i change the first and last time to change the range on timeline, so at the same time i want to change the first and last item on another timeline accordingly by using draw.redraw method but we are getting blank timeline and also not getting any error. so please help.