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

Finding on which date label ends on gantt chart dates #4377

Open
Ashishvkale opened this issue Feb 5, 2024 · 3 comments
Open

Finding on which date label ends on gantt chart dates #4377

Ashishvkale opened this issue Feb 5, 2024 · 3 comments

Comments

@Ashishvkale
Copy link

Hello team,

I tried reaching contact@amcharts.com and also posted the same question on stackOverFlow https://stackoverflow.com/questions/77918294/amchart4-label-text-gets-overlapped-by-other-lineseries-chart-data
But no success yet. Hoping for some positive direction here

Using amchart4, the legacy version.
I'm working on a Gantt chart which shows some data of daily activities going on field.

Problem statement :
Screenshot 2024-02-01 at 11 53 11 AM

img 1

Screenshot 2024-02-01 at 11 54 03 AM

img 2

      In the above images (img 1 & 2) I'm trying to show the full title text of the activities to make it more readable.
      But when another activity comes ahead of its text gets overlapped , Also when I change the time frame text gets overlapped by other activities
      I'm now stacking the activities by checking there start and end date.

Expected behavior :
     
Screenshot 2024-02-01 at 11 56 05 AM

img 3

      
      What I wanted to achive is , to get the end point location of the title text ends. and from there we can calculate if activity is overlapping it
      same as I achieved (Pushed manually/hardcoded) In the given image (img 3) the title is fully readable and activities are getting stacked below if the text is touching another activity
      
      So somehow, I wanted to get the date or location of the title text dynamic end point, so I can compare it with another activity if it's overlapping it
The main intent behind this is to show the full text without overlapping the things and messing the core functionality of Gantt chart

I would greatly appreciate your input and insights on the matter.
If there are any suggestions, references, or documentation that could help me in obtaining the expected result, it would be incredibly valuable.

@zeroin
Copy link
Collaborator

zeroin commented Feb 5, 2024

I've created a codepen with labels added to Gantt chart. They are automatically truncated, I think that's the best approach in your case: https://codepen.io/team/amcharts/pen/abMKNBq/80c33be5770d26fd88d483431b8db9f3

@Ashishvkale
Copy link
Author

I've created a codepen with labels added to Gantt chart. They are automatically truncated, I think that's the best approach in your case: https://codepen.io/team/amcharts/pen/abMKNBq/80c33be5770d26fd88d483431b8db9f3

Thanks for the quick response. Previously I was also working with truncate only
But my use case now is that I want it to be fully readable

@zeroin
Copy link
Collaborator

zeroin commented Feb 5, 2024

I am afraid we don't have a solution for your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants