How to get a control from DOM

Hi Syncfusion team, 

 As what I saw in the JavaScript version (Essential JS 1), we can get a chart from DOM with following part of code::

var chart = $('#container').ejChart("instance");

//to do

chart.model.series[0].fill = "blue";

chart.model.series[0].datasource = etc..;

//redraw

$('#container').ejChart("redraw")

Like: http://jsplayground.syncfusion.com/lzzjn4ho

So how to do this in JavaScript EJ 2?

I have tried to search in the documentation pages but did not find the answer.

Thanks!


2 Replies

GI Gin July 5, 2018 09:43 AM UTC

I found it:

document.getElementById('container').ej2_instances[0];


Thank team.


DD Dharanidharan Dharmasivam Syncfusion Team July 6, 2018 06:57 AM UTC

Hi Nguyen, 

Thanks for the update. 

Kindly revert us, if you need any further assistance. 

Thanks 
Dharani. 


Loader.
Up arrow icon