Closed eleinwang closed 4 years ago
@eleinwang the refresh function works fine for me. Here is an example how I use it:
...
<body>
<div id="buttons-div">
<input class="button" type="button" value="Show first data" onclick="btnClicked(0)">
<input class="button" type="button" value="Show second data" onclick="btnClicked(1)">
</div>
<div id="timeline-chart-div">
//just empty div-container for chart
</div>
<script>
var myData = [];
const timeline = TimelinesChart();
timeline
//.here your customize parameters
.data(myData) //initially empty
(document.getElementById("timeline-chart-div")); //location of chart
function btnClicked(select) { //we clicked one of buttons
myData = getData(select);//and get the data from here
timeline //it is our chart
.data(myData)//new data
.refresh(); //and refresh it :)
}
</script>
</body>
...
Hi , Firstly thanks for this excellent module . I have a project using this module . But due it doesn't support filtering by keywords , I am ready to re-render chart with new data instead . However , when I use refresh API to re-render , it seems not works . Could you help to check it ? I wander if it's source code issue or something wrong with my using way . Br , Jing