Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xAxis labels are not truncated and cut off #590

Closed
yubinjodev opened this issue Apr 2, 2024 · 2 comments
Closed

xAxis labels are not truncated and cut off #590

yubinjodev opened this issue Apr 2, 2024 · 2 comments

Comments

@yubinjodev
Copy link

image
image

https://apexcharts.com/docs/multiline-text-and-line-breaks-in-axes-labels/
According to documentation, it says the following

labels are then truncated if it overflows the region

However, they are not in this case. As you can see, the xAxis label for the first value is cut off. I have tried setting the parent element to overflow-x: visible, to at least show the values even if it is not truncated, which does not work again.

How do I make the values truncate or at least overflow the xAxis labels?

@yubinjodev
Copy link
Author

Here's my options

const options: ApexOptions = {
   colors,
   series: filterData,
   chart: {
     type: 'line',
   },
   dataLabels: {
     enabled: true,
   },

   xaxis: {
     categories: xAxis,
     labels: {
       show: true,
       showDuplicates: false,
     },
   },
   yaxis: filterData.map(() => {
     return { show: false }
   }),
   tooltip: {
     fixed: {
       enabled: true,
       position: 'topLeft',
       offsetY: 30,
       offsetX: 60,
     },
   },
 }

I have also tried the following, but it still cuts off the values
image

xaxis: {
      categories: xAxis.map((label) => label.replace(/-/g, '/').split(' ')),
      labels: {
        show: true,
        rotate: 0,
        showDuplicates: false,
      },
    },

Copy link

github-actions bot commented Aug 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant