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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart Data Refresh

Thread ID:

Created:

Updated:

Platform:

Replies:

141944 Jan 11,2019 12:51 PM UTC Jan 14,2019 12:01 PM UTC Angular - EJ 2 1
loading
Tags: Chart
serdar çelebi
Asked On January 11, 2019 12:51 PM UTC

Hi Team,

I am trying to send different data to multiple axis chart but chart doesnt refresh data. I couldnt find how to do.
 
Thanks in advance


Kesavan Muthusamy [Syncfusion]
Replied On January 14, 2019 12:01 PM UTC

Hi Seder, 
 
Greetings from Syncfusion. 
 
We have analyzed your query to render multiple axis chart. Please find the following code snippet to render multiple axis and how to bind data for different axis. By default primaryXAxis and primaryYAxis will render. If you want to add axis, you can add like this. 
 
 
<ejs-chart [primaryXAxis]='axis'> 
 
  <e-axes> 
 
    <e-axis 
name='yAxis' [opposedPosition]='position'> 
 
    </e-axis> 
 
    <e-series-collection> 
 
      <e-series [dataSource]='data' 
type='Column' 
xName='x' 
yName='y' 
name='Germany' 
width=2> 
 
      </e-series> 
 
      <e-series [dataSource]='data1' 
type='Line' 
xName='x' 
yName='y' 
name='Japan' 
width=2 
yAxisName='yAxis'> 
 
      </e-series> 
 
    </e-series-collection> 
 
  </e-axes> 
 
</ejs-chart> 
 


 
We have refreshed the data by using checkbox.  
app.component.html 
 
 
<input  
type="checkbox" (change)='isIndexed($event)' 
id="isIndexed" 
> Change Germany Data 


 
app.component.ts 
 
public isIndexed(e: 
Event):  
void { 
 
this.data 
= [ 
 
{ x:  
'Sun', y: 
45 },  
{ x: 'Mon', y: 
80 }, 
 
{ x:  
'Tue', y: 
90 },  
{ x: 'Wed', y: 
100 },  
{ x: 'Thu', y: 
35 },  
{ x: 'Fri', y: 
75 }, 
 
{ x:  
'Sat', y: 
10 } 
 
]; 
 
} 
 
 
Please find the following stackblitz sample for reference: sample 
 
Regards, 
Kesavan 


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

;