Is there a better way to read in a nested data set?

Hello,

I am new to handsontable, but found it really powerful. I created a view and have a large nested data to populate the table with.

I figured out how to make it work for several hours of tweeting and adjusting, but I am wondering if there is a better way to read that data set it.

When you click the update button, the data moves 1 month to the left. Jan-2018 drops off and Jan-2019 is added. This is for a rolling 12 month forecasts screen.

http://jsfiddle.net/en5cobwL/1/

Thanks
Travis

Hi Travis,

I do not see anything that I would change in the aspect of loading data. However what I would change in the

colWidths: [null, 125, 200, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75],

you can pass it as a function

colWidths: function(col){
					if(col === 0){
						return null
					} else if(col === 1){
						return 125
					} else if(col === 2){
						return 200
					} else {
						return 75
					}
				},

it takes more space but you do not need to worry about the number of columns.

Its the same case for columns, if most of the columns look like this

{
			      type: 'numeric',
			      numericFormat: {
			        pattern: '$0,0',
			        culture: 'en-US'
			      },
			      readOnly: true
			    }

you can use a function to return an object like this for most of the columns and just share the code for the rest based on their index.