amcharts / amcharts4

The most advanced amCharts charting library for JavaScript and TypeScript apps.

Home Page:https://www.amcharts.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

x axis labels are not shown when skipEmptyPeriods is set to true

nikitha-keyvalue opened this issue · comments

I am currently using amcharts v4 for my project. When skipEmptyPeriods is set to true for x-axis, most of the labels on the x-axis are not shown. I want to show labels for all the plotted datapoints on the x axis.

Screenshot from 2024-01-23 14-11-32

That did not seem to work. This is my x axes config for your reference:

[
  {
    "id": "c1",
    "type": "DateAxis",
    "title": {
      "text": "Date of Invoice"
    },
    "renderer": {
      "line": {
        "isMeasured": false
      },
      "grid": {
        "template": {
          "disabled": true
        }
      },
      "labels": {
        "template": {
          "rotation": -45,
          "horizontalCenter": "right",
          "verticalCenter": "middle",
          "truncate": true,
          "maxWidth": 200,
          "dy": -10,
          "location": 0.5,
          "adapter": []
        }
      },
      "minGridDistance": 50
    },
    "tooltipText": "",
    "dataFields": {
      "category": "Date of Invoice"
    },
    "dateFormatter": {
      "inputDateFormat": "yyyy-MM-dd'T'HH:mm:ss"
    },
    "groupData": false,
    "baseInterval": {
      "timeUnit": "day",
      "count": 1
    },
    "dateFormats": {
      "second": "ss",
      "minute": "mm",
      "hour": "HH:mm",
      "day": "dd-MM-yyyy",
      "week": "ww-yyyy",
      "month": "MMM-yyyy",
      "year": "yyyy"
    },
    "periodChangeDateFormats": {
      "second": "mm:ss",
      "minute": "HH:mm",
      "hour": "dd-MM-yy HH:mm",
      "day": "dd-MM-yyyy",
      "week": "ww-yyyy",
      "month": "MMM-yyyy",
      "year": "yyyy"
    },
    "skipEmptyPeriods": true,
    "cursorTooltipEnabled": true,
    "gridIntervals": [
      {
        "timeUnit": "day",
        "count": 206
      }
    ]
  }
]

That did not seem to work.

Unfortunately, I don't have any other suggestions.

amCharts 4 support has reached end-of-life Dec 31, 2023.

If you still have support subscription, try contacting amCharts support directly: contact@amcharts.com

Otherwise, you might try posting your questions on StackOverflow.

I hope that sounds reasonable.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.