Time axis on time series chart renders "May" instead of "Sun"

wut

I can live with it. But, thought I’d post.

  {
    "type": "ia.chart.timeseries",
    "version": 0,
    "props": {
      "series": [
        {
          "name": "Boiler"
        }
      ],
      "plots": [
        {
          "trends": [
            {
              "axis": "Boiler",
              "baselines": [],
              "breakLine": true,
              "columns": [],
              "interpolation": "curveLinear",
              "radius": 2,
              "series": "Boiler",
              "stack": true,
              "type": "line",
              "visible": true
            }
          ],
          "axes": [
            {
              "alignment": "left",
              "label": {
                "font": {
                  "color": "#000000",
                  "size": 12
                },
                "offset": 10,
                "style": {},
                "text": "Count",
                "visible": false
              },
              "min": 0,
              "name": "Boiler",
              "style": {},
              "tick": {
                "color": "",
                "label": {
                  "font": {
                    "color": "#000000",
                    "size": 12
                  },
                  "style": {}
                },
                "style": {}
              },
              "width": 30
            }
          ],
          "markers": []
        }
      ],
      "timeRange": {
        "dateFormat": "M-DD",
        "timeFormat": "None"
      },
      "xTrace": {
        "infoBox": {
          "showTime": false,
          "dataFormat": "0,0",
          "stroke": {
            "width": 2,
            "opacity": 2,
            "dashArray": 2
          },
          "fill": {
            "opacity": 1
          }
        },
        "line": {
          "width": 5,
          "opacity": 1
        }
      },
      "legend": {
        "position": "right"
      },
      "defaultStyles": {
        "colorScheme": "Spectral",
        "normal": {
          "stroke": {
            "opacity": 1
          },
          "fill": {
            "opacity": 1
          }
        }
      }
    },
    "meta": {
      "name": "TimeSeriesChart"
    },
    "position": {
      "basis": "100%"
    },
    "custom": {},
    "propConfig": {
      "props.plots[0].axes[0].max": {
        "binding": {
          "type": "expr",
          "overlayOptOut": true,
          "config": {
            "expression": "{this.props.series[0].data}"
          },
          "transforms": [
            {
              "code": "\tx = value\n\ty = system.dataset.sort(x, 'Count',0)\n\tz = system.dataset.toPyDataSet(y)\n\thigh = z[0]['Count']\n\tif high < 5000:\n\t\treturn 5000\n\telif high < 6999:\n\t\treturn 7500\n\telse:\n\t\treturn 10000",
              "type": "script"
            }
          ]
        }
      },
      "props.series[0].data": {
        "binding": {
          "type": "tag",
          "overlayOptOut": true,
          "config": {
            "mode": "indirect",
            "tagPath": "[default]{machine}/{machine}/Data/Database/Chart/PPD",
            "references": {
              "machine": "{view.params.machine}"
            },
            "fallbackDelay": 2.5
          }
        }
      }
    }
  }
]

@wking, you can set the format of the time axis to something specific if you’d like it locked down. The default setting of Auto does a best guess to the appropriate format based on the time duration of data being displayed. There are several values that can be applied from the dropdown, or you can provide a custom Moment.js string.

image

1 Like

Ahh… My bad. I see it was updated on 8.0.11…

Thanks!

1 Like