Skip to content

Improved colour-legend display and labels#143

Merged
andy-lee-eng merged 3 commits intodevelopfrom
feature/colour-legend
Apr 2, 2019
Merged

Improved colour-legend display and labels#143
andy-lee-eng merged 3 commits intodevelopfrom
feature/colour-legend

Conversation

@andy-lee-eng
Copy link
Collaborator

Use a "nice" number range for display purpose only (doesn't affect the actual colours used).
Give the colour legend a bit more height, but less width, which it doesn't need.

Prevents legends from different charts interfering with each other.
Stores pageIndex in settings to preserve page position.

Cleaner numbers (reduces display of fractions), and better display of "clean" range
Give the colour legend a bit more height, but less width, which it doesn't need
Prevents legends from different charts interfering with each other
Stores `pageIndex` in settings to preserve page position
@Ro4052
Copy link
Collaborator

Ro4052 commented Apr 2, 2019

I'm still not 100% clear on how the legends were interfering with each other.

Other than that, looks good to me!

@andy-lee-eng
Copy link
Collaborator Author

@Ro4052 previously scrollColorLegend and scrollSymbolLegend were global instances of components that were re-used (to preserve pageIndex). However, that meant they were also re-used across multiple charts on the same page, which was not the intent.

Now, scrollColorLegend and scrollSymbolLegend are functions that return new instances of components each time, and the pageIndex is preserved by putting it in settings.

@andy-lee-eng andy-lee-eng merged commit cd06f1a into develop Apr 2, 2019
@andy-lee-eng andy-lee-eng deleted the feature/colour-legend branch April 2, 2019 10:41
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