@millistream/millistream-widgets 1.0.34 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1429,7 +1429,7 @@ function Milli_Chart(settings) {
1429
1429
  if (dontPrint) break;
1430
1430
  if (draw) {
1431
1431
  drawXAxisGridlines({ 'x': x, y: m_chartspaces.chart.height - m_chartspaces.chart.marginBottom });
1432
- text = formatDate(year.getFullYear() + '-' + (year.getMonth() + 1) + '-01', _this.settings.dateformat, _this);
1432
+ text = formatDate(year.getFullYear() + '-' + ('0' + (year.getMonth() + 1)).slice(-2) + '-01', _this.settings.dateformat, _this);
1433
1433
  if (checkXLegendSides(x, text)) {
1434
1434
  m_ctx.fillText(text, x - (m_ctx.measureText(text).width / 2), m_chartspaces.chart.height - m_chartspaces.chart.marginBottom + getScaledSetting(m_xLegendCss.paddingTop));
1435
1435
  }
@@ -1452,7 +1452,7 @@ function Milli_Chart(settings) {
1452
1452
  }
1453
1453
  if (draw) {
1454
1454
  drawXAxisGridlines({ 'x': x, y: m_chartspaces.chart.height - m_chartspaces.chart.marginBottom });
1455
- text = formatDate(year.getFullYear() + '-' + (year.getMonth() + 1) + '-01', _this.settings.dateformat, _this);
1455
+ text = formatDate(year.getFullYear() + '-' + ('0' + (year.getMonth() + 1)).slice(-2) + '-01', _this.settings.dateformat, _this);
1456
1456
  if (checkXLegendSides(x, text)) {
1457
1457
  m_ctx.fillText(text, x - (m_ctx.measureText(text).width / 2), m_chartspaces.chart.height - m_chartspaces.chart.marginBottom + getScaledSetting(m_xLegendCss.paddingTop));
1458
1458
  }
@@ -7013,6 +7013,7 @@ function formatDate(date, format, widget) {
7013
7013
  }
7014
7014
  if (format == 'b dd') { // Jan 01
7015
7015
  timeStamp = new Date(date);
7016
+ console.log(date,timeStamp);
7016
7017
  mon = timeStamp.toDateString().split(' ');
7017
7018
  day = timeStamp.getDate();
7018
7019
  return mon[1] + ' ' + (day <= 9 ? '0' + day : day);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@millistream/millistream-widgets",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Millistream widgets node package",
5
5
  "main": "millistream-widgets.js",
6
6
  "scripts": {