toFixed is not a function issue

Seems to be a problem with setting minimum/maximum before any other dataPoints have arrived. And only when xValueType: "dateTime"

by jcmalek

HTML

<script src="https://canvasjs.com/assets/script/canvasjs.stock.min.js"></script>
<br/><!-- Just so that JSFiddle's Result label doesn't overlap the StockChart -->
<div id="stockChartContainer" style="height: 450px; width: 100%;"></div>

JavaScript

var stockChart = new CanvasJS.StockChart("stockChartContainer", {
  title:{
    text: "Basic StockChart"
  },
  charts: [{
    data: [{
      type: "line",
      xValueType: "dateTime",
      dataPoints: []
    }],
    axisX: {
    	minimum: new Date(2017, 1,  1, 0, 0, 0, 0).getTime(),
      maximum: new Date(2018, 1,  1, 0, 0, 0, 0).getTime()
    }
  }],
});

try {
  stockChart.render();
}
catch (error) {
  console.error(error.message);
}