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

Clearing data list #900

Closed
wants to merge 2 commits into from
Closed

Clearing data list #900

wants to merge 2 commits into from

Conversation

mokaithered
Copy link

@mokaithered mokaithered commented Dec 12, 2017

Hi all,

I was playing around with gantt charts and experience that the legend (colorbar) needs to be scrolled to see my defined 'Tasks' at the very bottom (which is actually visible at the examples as well, above the 'Tasks' are hidden traces, which are even clickable). After checking through _gantt.py I identified the following rows, where the variable 'data' has many entries.

new lines @ 277
new lines @ 359
new lines @ 517

Can someone please verify and if agreeing, pushing the change to the repo?

Many thanks
Cheers
J

---edit---
found some issue and had to fix this

Hi all,

I was playing around with gantt charts and experience that the legend (colorbar) needs to be scrolled to see my defined 'Tasks' at the very bottom (which is actually visible at the examples as well, above the 'Tasks' are hidden traces, which are even clickable). After checking through _gantt.py I identified following two rows, where the variable 'data' has many entries (why this is I could not tell precisely). However, clearing this data list showed only the 'Tasks' at the colorbar:

new line 277: adding 'data=[]' to clear the filled list data to display only 'Tasks' and not many hidden trace entries.
same applies for row 359
same apploes for row 517

Can you please verify and if you agree, push the change to the repo?

Many thanks
Cheers
J
@@ -274,7 +274,10 @@ def gantt_colorscale(chart, colors, title, index_col, show_colorbar, bar_width,

if show_colorbar is True:
# generate dummy data for colorscale visibility
data.append(
datalisted = data
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, can we changed newentries and datalisted to new_entries and data_listed?

Copy link
Author

Choose a reason for hiding this comment

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

sure, underscores or none or naming conventions, I am good with any.

@jackparmer
Copy link
Contributor

@mokaithered I'm trying to replicate this legend issue with the hidden traces, but can't find an example, can you please drop a screenshot or GIF here?

@mokaithered
Copy link
Author

mokaithered commented Jan 30, 2018

grafik

I hope this helps! Sorry for the grey areas, I need to be a bit careful concerning the data. You can also check the example posted at the official website for plotly gantt charts. Those gantt charts have the same issue.

Cheers

---edits---
grafik
grafik

@jonmmease
Copy link
Contributor

Extra space in Gantt-chart legend issue was resolved by #1110

@jonmmease jonmmease closed this Sep 28, 2018
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.

3 participants