Skip to content

Wrong date for x-axis if dataset begins from one last date of month.  #3466

@flxb-awm

Description

@flxb-awm

Description

there is Graph with datetime data:

{
  "legend": {
    "show": false
  },
  "series": [
    {
      "name": "Delivered quantity",
      "data": [
        {
          "x": "2022-10-31",
          "y": 7.5
        },
        {
          "x": "2022-11-01",
          "y": 0
        },
        {
          "x": "2022-11-02",
          "y": 0
        },
        {
          "x": "2022-11-03",
          "y": 0
        },
        {
          "x": "2022-11-04",
          "y": 0
        },
        {
          "x": "2022-11-05",
          "y": 0
        },
        {
          "x": "2022-11-06",
          "y": 0
        }
       
    }  
  ],
  "chart": {
    "zoom": {
      "enabled": false
    },
    "height": 332,
    "type": "bar",
    "animations": {},
    "toolbar": {
      "show": false
    },
    "stacked": true
  },
  "xaxis": {
    "type": "datetime",
    "labels": {
       format: 'ddd'
    },
    "min": 1667174400000,  
  },
  "yaxis": {
    "labels": {},
    "tooltip": {
      "enabled": false
    }
  },
  "tooltype": {
    "x": {}
  }
}

set of data begin from 2022-10-31 and finished for 2022-11-06 (one weeks)
and

Steps to Reproduce

  1. run the graph with the options

Expected Behavior

there is graph with one column and x axis with name of weekdays abbreviation names begin from Monday
Mon Tue Wed Thu Fri Sat San

Actual Behavior

there is graph with one column and x axis with name of weekdays abbreviation names begin from Saturday
Sat Tue Wed Thu Fri Sat San

Screenshots

Снимок экрана 2022-10-31 в 16 12 42

Reproduction Link

https://codepen.io/F-Tulpan/pen/poKjBGR

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingverified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions