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.
Unfortunately, activation email could not send to your email. Please try again.

Y axis Position

Thread ID:

Created:

Updated:

Platform:

Replies:

130845 Jun 7,2017 01:09 AM Jun 8,2017 07:44 AM JavaScript 1
loading
Tags: ejChart
Santhosh
Asked On June 7, 2017 01:17 AM

HiI want to know whether can I set the Y axis position in between the X axis in horizontal stacked bar chartex: X axis has 2 to 20 numbers Y axis should be placed at 12

Sanjith Kesavan [Syncfusion]
Replied On June 8, 2017 07:44 AM

Hi Santhosh, 

Thanks for contacting Syncfusion support. We have analyzed your query. Yes, you can set the Y-axis position in between the X-axis in stacked bar chart using axis crossing feature in chart. We have prepared a sample for this. In the sample, we have set the “crossesAt” value of primaryYAxis as “12”. Please find the below code example 

[JS] 
$("#container").ejChart( 
{ 
     //.. 
     primaryYAxis: 
     {                      
       title: { text: 'Percentage' }, 
       crossesAt: 12 
     }, 
     //.. 
}); 
 
Now Y-axis will be placed at the value 12. Please find the below screenshot.  
 

By default, axis labels and title will render next to the axis line. To render axis label and title outside the chart area, please set “showNextToAxisLine” as “false”. Please find the code example below. 

[JS] 
$("#container").ejChart( 
{ 
     //.. 
     primaryYAxis: 
     {                      
       title: { text: 'Percentage' }, 
       crossesAt: 12, 
       showNextToAxisLine: false 
     }, 
     //.. 
}); 
 
Now the chart axis line only placed at 12. Axis labels and title are placed outside the chart area. Please find the screenshot below. 
 
In the below link, we have attached sample for your reference.  
Sample link: stackedbar 

Find the axis-crossing demo sample from the below link 

To know more about axis crossing, please follow the below link. 

Please let us know if you have any concern. 

Regards, 
Sanjith.  


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.

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.

;