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

XS Chart Colors #27

Closed
philipbaileynar opened this issue Jul 25, 2019 · 3 comments
Closed

XS Chart Colors #27

philipbaileynar opened this issue Jul 25, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@philipbaileynar
Copy link

The colors change from XS to XS in the plot cross sections tool. They should stay the same so the user can scroll through many pairs and always know which year is which. Each year can randomly be assigned a color or you can store a list of colors that get applied to the first, second, third, etc. surveys that are displayed (better, because it allows for good contrast amongst colors.) But switching cross sections needs to maintain the same colors.

image013

image014

@philipbaileynar philipbaileynar added the bug Something isn't working label Jul 25, 2019
@philipbaileynar philipbaileynar self-assigned this Jul 25, 2019
@philipbaileynar
Copy link
Author

The way colors are assigned to cross sections changed for the new release:

  • Each combination of cross section and survey gets assigned a unique color. So the same cross section in different surveys will get a different color. And different cross sections for the same survey will get different colors.
  • Once a color is assigned to each unique combination it should always be the same. i.e. If you turn off a particular cross section then turn it back on again it should always be displayed with the same color.
  • I think there are roughly 16 colors in the palette. If you display more than 16 cross section and survey combinations then it will loop back around and start reusing colors from the start of the palette again.

Perhaps we need an option that lets the user control how colors are assigned. I can conceive of three possibilities:

  1. Unique colors for cross section and survey combinations - As described above.
  2. Each cross section will reuse the same color for all surveys (i.e. when you move the selection up and down the surveys, the selected cross section colors will not change)
  3. Each survey will reuse the same color for all cross sections (i.e. when you turn on and off each cross section the same color will be used for a particular survey)

@JohnShelley
Copy link

Philip,

Option 3 is definitely the best. The most common way we use the plotter is to compare multiple surveys at a single cross section location, then move to a different cross section location. (I almost never compare multiple cross section locations in the same window.)
-John

@philipbaileynar
Copy link
Author

I have an elegant solution that avoids the need for any messy "options setting" to control how colors are assigned. The code now detects when either just one cross section or one survey is selected and retains the appropriate colors. If multiple surveys and multiple cross sections are selected then the colors are assigned as before.

Single cross section with multiple surveys

This is the main use case for @JohnShelley The user selects a single cross section and then adjusts which surveys are selected. The color used for a particular survey is always the same.

Screen Shot 2019-07-25 at 10 41 01 AM

Screen Shot 2019-07-25 at 10 41 09 AM

Single survey multiple cross sections

In this situation cross sections retain their color as different surveys are selected.

Screen Shot 2019-07-25 at 10 43 51 AM

Screen Shot 2019-07-25 at 10 43 59 AM

Multiple Surveys and multiple cross sections

This is how the software worked before this fix. Note that as soon as the user triggers this scenario (multiple of both survey and cross section) all colors in the chart are reset. i.e. the image below shows some of the same data as the preceding set of images but all the colors are new.

Screen Shot 2019-07-25 at 10 44 48 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants