var pivotGridObj = new ej.pivotview.PivotView({
chartSettings: {
scrollEnd: function(args) {
if (args.axis.name === 'primaryXAxis') {
let scrollX = document.getElementById(pivotGridObj.element.id + '_chart_scrollBar_svgprimaryXAxis');
let left = parseInt(scrollX.style.left);
let rectx = Math.round(args.axis.rect.x - scrollX.getBoundingClientRect().width);
if (left !== rectx) {
scrollX.style.left = rectx + 'px';
}
}
}
}
});
pivotGridObj.appendTo("#PivotView");
|
chartSettings: {
scrollEnd: function(args) {
if (args.axis.name === 'primaryXAxis' &&pivotGridObj.chartSettings.chartSeries.type === 'Bar') {
let scrollX = document.getElementById(pivotGridObj.element.id +'_chart_scrollBar_svgprimaryXAxis');
let left = parseInt(scrollX.style.left);
let rectx = Math.round(args.axis.rect.x -scrollX.getBoundingClientRect().width);
if (left !== rectx) {
scrollX.style.left = rectx + 'px';
}
}
}
}
|