We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Show Scroll On right side

Thread ID:

Created:

Updated:

Platform:

Replies:

145368 Jun 19,2019 10:03 AM UTC Jun 25,2019 09:16 AM UTC JavaScript - EJ 2 7
loading
Tags: PivotView
Raghav
Asked On June 19, 2019 10:03 AM UTC

Hello,

I am using bar chart type for showing the data.The problem is that when you scroll out, the scroll bar is placed over the legend. See attached image you will get my point.
Is there any way that scroll placed on right side or any solution so that the scroll not overlap with the text.

Regards
Raghav

Attachment: Untitled_c5f9d902.rar

Manikandan Murugesan [Syncfusion]
Replied On June 20, 2019 01:59 PM UTC

Hi Raghav, 

Currently, we are analyzing the problem at our end. And, we will update further details by tomorrow (June 21, 2019). 

Regards, 
Manikandan. 


Manikandan Murugesan [Syncfusion]
Replied On June 21, 2019 10:24 AM UTC

Hi Raghav, 

You can resolve this problem by using following code snippet. 

Code Snippet: 
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"); 
 


Please let us know if you need further assistance on this. 

Regards, 
Manikandan. 


Raghav
Replied On June 21, 2019 10:55 AM UTC

Hello Manikandan,

Thanks for the help. The code works for me.

Regards
Raghav

Raghav
Replied On June 21, 2019 12:33 PM UTC

Hello Manikandan

I was testing your code. It works fine but there is one scenario where it break down. When I select the chart type "Column" after that when I move the x axis scroll (scroll below the chart) left or right after that scroll is not visible. I have attached two screenshots. Please help me on this. 

regards


Attachment: Desktop_f9329c75.rar

Jagadeesan Pichaimuthu [Syncfusion]
Replied On June 24, 2019 08:42 AM UTC

Hi Raghav, 
  
You can resolve this using following code snippet. 
  
Code Snippet: 
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'; 
        } 
      } 
    } 
  } 
  
  
  
Please let us know if you need further assistance on this. 
  
Regards, 
Jagadeesan

Raghav
Replied On June 25, 2019 09:14 AM UTC

Hello Jagadeesan,

Thanks for the help. It works for me. 

Regards
Raghav

Dinesh Babu Yadav [Syncfusion]
Replied On June 25, 2019 09:16 AM UTC

Hi Raghav,  
  
Thanks for the update. Please get back to us if you need further other assistance from us.  
  
Regards,  
Dinesh Babu Yadav 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon