Time bar chart does not render when there are 4 or less data records. The data unit is months ("M") and I'm getting this warning...
The datasource default
cannot return data for unit 1 d
The dates for all data points are first day of the month. Is that the issue? If so, what can I do instead of that?
Example:
DATA:

CHART:
When chartData.preloaded.values has more than 4 members it renders fine. When it's 4 or less, I get the above.
Here is the relevant code. I know it can be improved but I needed to get this working as quickly as possible.
var seriesData = [{
"name": "Unique Monthly Count",
"data": {
"index": 1,
},
"style": {
//"fillColor": colors[i].COLOR,
},
"stack": "default",
"type": "columns"
}];
var chartData={
preloaded:{
dataLimitFrom:Date.UTC(2016, 1, 1, 1, 0, 0),
dataLimitTo:Date.UTC(2018,1,1),
unit:"M",
"info":["Projected Unique Monthly Counts"],
values: [],
}
};
r.forEach(function(d,i){
var thisData=[];
thisData.push(getJSTime(parseInt(d.MONTHNUM)+"/1/"+d.YEARNUM));
thisData.push(d.PROJECTEDCOUNTS)
chartData.preloaded.values.push(thisData)
});
var chart = new TimeChart({
series: seriesData,
container: "fancyChart",
data:chartData,
toolbar: {
"fullscreen": true,
"enabled": true,
displayPeriod: false,
logScale:false,
zoomOut:false,
displayUnit:true
},
interaction: {
"resizing": {
"enabled": true
}
},
theme: ZoomCharts.TimeChart.themes.static,
});
console.log(chartData);
});