<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div>
<h2>How to update the data at runtime without clearing the report</h2>
<p>
The <a href="https://www.flexmonster.com/api/updatedata/" target="_blank">updateData()</a> method allows updating the data whereas other report configurations are not changed.
</p>
<p>
In this example, the initial report contains a slice, options, number formatting, and conditional formatting. These configurations won't be changed after updating the data. Click the buttons below to try!
</p>
<p>
To update the data and clear other report configurations, use the <a href="https://www.flexmonster.com/api/connectto/" target="_blank">connectTo()</a> method.
</p>
</div>
<button onclick="updateDataCSV()">Update data from dataset 1</button>
<button onclick="updateDataJSON()">Update data from dataset 2</button>
<div id="pivot-container"></div>