apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
59.57k stars 19.58k forks source link

[Bug] calendar chart doesn't draw square for last date in given range #19757

Open RAAvenger opened 3 months ago

RAAvenger commented 3 months ago

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=calendar-lunar&lang=js

Steps to Reproduce

1 - use given option

option = {
  "visualMap": {
      "show": false,
      "min": 0,
      "max": 10000
  },
  "calendar": {
      "range": [
          "2001-03-22",
          "2001-04-21"
      ],
      "left": "center",
      "top": "middle",
      "orient": "vertical",
      "cellSize": [
          90,
          90
      ],
      "dayLabel": {
          "show": true,
          "firstDay": 6,
      },
      "monthLabel": {
          "show": false
      },
      "yearLabel": {
          "show": false
      },
      "splitLine": {
          "show": false
      }
  },
  "grid": {
      "containLabel": true
  },
  "legend": {
      "top": "bottom",
      "padding": 20
  },
  "series": [
    {
    type: 'scatter',
    coordinateSystem: 'calendar',
    symbolSize: 0,
    label: {
      show: true,
      formatter: function (params) {
        return params.value[0];
      },
      color: '#000'
    },
    data: [
              [
                  "2001-03-22"
              ],
              [
                  "2001-03-23"
              ],
              [
                  "2001-03-24"
              ],
              [
                  "2001-03-25"
              ],
              [
                  "2001-03-26"
              ],
              [
                  "2001-03-27"
              ],
              [
                  "2001-03-28"
              ],
              [
                  "2001-03-29"
              ],
              [
                  "2001-03-30"
              ],
              [
                  "2001-03-31"
              ],
              [
                  "2001-04-01"
              ],
              [
                  "2001-04-02"
              ],
              [
                  "2001-04-03"
              ],
              [
                  "2001-04-04"
              ],
              [
                  "2001-04-05"
              ],
              [
                  "2001-04-06"
              ],
              [
                  "2001-04-07"
              ],
              [
                  "2001-04-08"
              ],
              [
                  "2001-04-09"
              ],
              [
                  "2001-04-10"
              ],
              [
                  "2001-04-11"
              ],
              [
                  "2001-04-12"
              ],
              [
                  "2001-04-13"
              ],
              [
                  "2001-04-14"
              ],
              [
                  "2001-04-15"
              ],
              [
                  "2001-04-16"
              ],
              [
                  "2001-04-17"
              ],
              [
                  "2001-04-18"
              ],
              [
                  "2001-04-19"
              ],
              [
                  "2001-04-20"
              ],
                              [
                  "2001-04-21"
              ]
          ],
    silent: true
  },
      {
          "type": "scatter",
          "coordinateSystem": "calendar",
          "symbolSize": 0,
          "silent": true,
          "data": [
              [
                  "2001-03-22"
              ],
              [
                  "2001-03-23"
              ],
              [
                  "2001-03-24"
              ],
              [
                  "2001-03-25"
              ],
              [
                  "2001-03-26"
              ],
              [
                  "2001-03-27"
              ],
              [
                  "2001-03-28"
              ],
              [
                  "2001-03-29"
              ],
              [
                  "2001-03-30"
              ],
              [
                  "2001-03-31"
              ],
              [
                  "2001-04-01"
              ],
              [
                  "2001-04-02"
              ],
              [
                  "2001-04-03"
              ],
              [
                  "2001-04-04"
              ],
              [
                  "2001-04-05"
              ],
              [
                  "2001-04-06"
              ],
              [
                  "2001-04-07"
              ],
              [
                  "2001-04-08"
              ],
              [
                  "2001-04-09"
              ],
              [
                  "2001-04-10"
              ],
              [
                  "2001-04-11"
              ],
              [
                  "2001-04-12"
              ],
              [
                  "2001-04-13"
              ],
              [
                  "2001-04-14"
              ],
              [
                  "2001-04-15"
              ],
              [
                  "2001-04-16"
              ],
              [
                  "2001-04-17"
              ],
              [
                  "2001-04-18"
              ],
              [
                  "2001-04-19"
              ],
              [
                  "2001-04-20"
              ],
                [
                  "2001-04-21"
              ]
          ],
          "label": {
              "show": true,
              "color": "#000"
          }
      }
  ],
  "textStyle": {
      "fontFamily": "IRANSansX",
      "fontSize": 14
  },
  "tooltip": {
      "trigger": "item"
  },
  "xAxis": {
      "show": false
  },
  "yAxis": {
      "show": false
  }
};

Current Behavior

you will see last date is out side of a square Opera Snapshot_2024-03-25_150947_echarts apache org

Expected Behavior

draw a square around last date

Opera Snapshot_2024-03-25_150947_echarts apache org - Copy

No response

helgasoft commented 3 months ago

there is a second duplicate series, probably redundant (?) Cannot reproduce with single series - Demo image

RAAvenger commented 3 months ago

Hi it seams like the problem occurs in my time zone (+3:30). when i change time zone to any other, it works fine.

image

RAAvenger commented 3 months ago

it seams like this timezons also have problem -05:00 havana -01:00 azores +02:00 beirut +03:00 Amman