Skip to content

Gantt feature#5519

Closed
Dayvid-T wants to merge 2 commits into
PhilJay:masterfrom
Dayvid-T:gantt-feature
Closed

Gantt feature#5519
Dayvid-T wants to merge 2 commits into
PhilJay:masterfrom
Dayvid-T:gantt-feature

Conversation

@Dayvid-T

@Dayvid-T Dayvid-T commented Mar 27, 2026

Copy link
Copy Markdown

PR Checklist:

  • I have tested this extensively and it does not break any existing behavior.
  • I have added/updated examples and tests for any new behavior.
  • If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]

PR Description

@hannesa2

Copy link
Copy Markdown
Contributor

You should add it in MainActivity as well. I did it to understand how does it looks like
image

* @param buffer The buffer to fill
* @param dataSet The dataset containing time interval data
*/
protected void feedTimeIntervalBuffer(BarBuffer buffer, IBarDataSet dataSet) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not used at all. Without using it, it comes with the taste of useless

if (mInverted) {
left = y >= yStart ? y : yStart;
right = y <= yStart ? y : yStart;
left = y >= posY ? y : posY;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But to be honest, I don't get it why you removed yStart and calculate it this way.

* @param timeIntervals Array of [start1, duration1, start2, duration2, ...]
* @return BarEntry configured for time interval rendering
*/
public static BarEntry createMultiSegmentEntry(float taskIndex, float[] timeIntervals) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is unused, it would be nice to have a demo usage for this too

* @param data Custom data object
* @return BarEntry configured for time interval rendering with data
*/
public static BarEntry createTimeIntervalEntry(float taskIndex, float startTime,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is unused, it would be nice to have a demo usage for this too

@hannesa2

hannesa2 commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Btw, look at the other pull requests, then you see it will be never merged. If you want to have merged, I invite you to contribute in this much more modern fork https://github.com/AppDevNext/AndroidChart

@Dayvid-T

Copy link
Copy Markdown
Author

My bad the request was an accident I'm still testing a few things on my end

@Dayvid-T Dayvid-T closed this Mar 28, 2026
@Dayvid-T Dayvid-T deleted the gantt-feature branch March 28, 2026 17:04
hannesa2 added a commit to AppDevNext/AndroidChart that referenced this pull request Apr 3, 2026
hannesa2 added a commit to AppDevNext/AndroidChart that referenced this pull request Apr 13, 2026
Inspired by PhilJay/MPAndroidChart#5519

Fix Gantt chart label clipping, x-axis label overlap, and seekbar overlay

- GanttChart.kt: dynamically compute chartLeft from max label width so
  long names like 'Development' are never clipped by the view edge
- GanttChart.kt: compute grid-line count from available width / label
  width so x-axis time labels never overlap each other
- GanttChart.kt: extract labelTextSize, gridLinesMin/Max as constants so
  measurement paint and drawing paint are always in sync
- activity_time_interval_chart.xml: remove unused SeekBar widgets and
  TextViews that were rendering on top of the chart
- TimeIntervalChartActivity.kt: remove OnSeekBarChangeListener interface
  and its unused override methods
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

Successfully merging this pull request may close these issues.

2 participants