Flexmonster Format reset bug

Data source

by jesperra

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>


<button onclick="updateDataJSON()">Update data from inline JSON</button>
<button onclick="noDataJSON()">Clear data</button>
<div id="pivot-container"></div>

JavaScript

var jsonData = [
  {
  	"Color": {
      "type": "string",
      "caption": "Color"
    },
    "Country": {
      "type": "string",
      "caption": "Country"
    },
    "State": {
      "type": "string",
      "caption": "State"
    },
    "City": {
      "type": "string",
      "caption": "City"
    },
    "Price": {
      "type": "number",
      "caption": "Price"
    },
    "Quantity": {
      "type": "number",
      "caption": "Quantity"
    }
  },
	{
		"Color" : "green",
		"Country" : "Canada",
		"State" : "Ontario",
		"City" : "Toronto",
		"Price" : 170454.6988,
		"Quantity" : 22
	},
	{
		"Color" : "red",
		"Country" : "USA",
		"State" : "California",
		"City" : "Los Angeles",
		"Price" : 166558.47881,
		"Quantity" : 19
	}
	];

var pivot = new Flexmonster({
	container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
		toolbar: true,
		report: {
			dataSource: {
				data: jsonData
			},
			slice: {
				rows: [
				{ uniqueName: "Color" },
				{ uniqueName: "[Measures]" }
				],
				columns: [
				{ 
        	uniqueName: "Country",
        }
				],
				measures: [
				{
					uniqueName: "Price", 
					aggregation: "sum" 
				}
				]
			},
      "formats": [
        {
            "name": "",
            "thousandsSeparator": ".",
            "decimalSeparator": ",",
            "decimalPlaces": 2
        }
    ]
		}
	});


function updateDataJSON() {
  var jsonData = [
  {
  	"Color": {
      "type": "string",
      "caption": "Color"
    },
    "Country": {
      "type": "string",
      "caption": "Country"
    },
    "State": {
      "type": "string",
      "caption": "State"
    },
    "City": {
      "type": "string",
      "caption": "City"
    },
    "Price": {
      "type": "number",
      "caption": "Price"
    },
    "Quantity": {
      "type": "number",
      "caption": "Quantity"
    }
  },
	{
		"Color" : "green",
		"Country" : "Canada",
		"State" : "Ontario",
		"City" : "Toronto",
		"Price" : 170454.5688,
		"Quantity" : 22
 ...