amcharts / amcharts4

The most advanced amCharts charting library for JavaScript and TypeScript apps.
https://www.amcharts.com/
1.16k stars 321 forks source link

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

Closed Ashishvkale closed 1 month ago

Ashishvkale commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

github-actions[bot] commented 1 month ago

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.