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

Link series to different Y-axis

Thread ID:

Created:

Updated:

Platform:

Replies:

145772 Jul 8,2019 09:34 AM UTC Jul 9,2019 09:36 AM UTC ASP.NET Core - EJ 2 2
loading
Tags: Charts
Johnny
Asked On July 8, 2019 09:34 AM UTC

I new to using syncfusion components.

I create the following chart with 4 series. 3 series with absolute values and one with %. I like the last one to use it's own y-axis.

                    <ejs-chart id="byagechart" width="100%" palettes="palettes">
                        <e-chart-primaryxaxis valueType="Category" labelFormat="y" edgeLabelPlacement="Shift"></e-chart-primaryxaxis>
                        <e-series-collection>
                            <e-series dataSource="ViewBag.ByAges" xName="PatientAge" width="2" opacity="1" yName="NoShowAmount" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Column"></e-series>
                            <e-series dataSource="ViewBag.ByAges" xName="PatientAge" width="2" opacity="1" yName="ShowAmount" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Column" visible="@ViewBag.ShowIsVisible"></e-series>
                            <e-series dataSource="ViewBag.ByAges" xName="PatientAge" width="2" opacity="1" yName="TotAmount" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Column" visible="@ViewBag.ShowIsVisible"></e-series>
                            <e-series dataSource="ViewBag.ByAges" xName="PatientAge" width="2" opacity="1" yName="NoShowPcnt" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Line" ></e-series>
                        </e-series-collection>
                    </ejs-chart>


Johnny
Replied On July 8, 2019 11:45 AM UTC

Found the solution. For reference to those who have the same question :

add an e-chart-axes tag
for each y-axis you want add an e-chart-axis tag, set the name attribute
use that name attribute as the value for the yAxisName attribute of your data-serie
          

                    <ejs-chart id="byagechart" width="100%" palettes=@palettes>
                        <e-chart-primaryxaxis valueType="Double" labelFormat="y" edgeLabelPlacement="Shift" interval="5" minimum="0" maximum="75"></e-chart-primaryxaxis>
                    <e-chart-axes>
                        <e-chart-axis name="abs"  desiredIntervals="10" minimum="0" maximum="@( yMaxByAges )"></e-chart-axis>
                        <e-chart-axis name="pcnt" desiredIntervals="10" minimum="0" maximum="@maxPcnt" opposedPosition="true" labelFormat="P"></e-chart-axis>
                    </e-chart-axes>
                        <e-series-collection>
                            <e-series dataSource="ViewBag.ByAges" name="No-Show" xName="PatientAge" width="2" opacity="0.5" yName="NoShowAmount" yAxisName="abs" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Column"></e-series>
                            <e-series dataSource="ViewBag.ByAges" name="No-Show [%]" xName="PatientAge" width="2" opacity="1" yName="NoShowPcnt" yAxisName="pcnt" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Line"></e-series>
                        </e-series-collection>
                    </ejs-chart>


Baby Palanidurai [Syncfusion]
Replied On July 9, 2019 09:36 AM UTC

Hi Johnny, 
  
 
We are happy to hear from your last update. We have attached UG and demo links for further assistance on multiple axis.  Please refer below links, 
 
  
 
 
  
Kindly revert us, if you have any queries. 
 
  
Regards, 
Baby. 


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