-
Notifications
You must be signed in to change notification settings - Fork 2
Plotting Improvements - Series color scale and color picker options #1903
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
Conversation
- ChartColorInputs for single color geomOptions and series specific color and shape value map - ChartConfig measuresOptions to store per series mapping object - Hide and show color options based on selected chart type and measures
…ith min width at 330px
… (like boolean true/false)
labkey-alan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good, and is working for me locally (though I'm not fully done with manual testing). I did leave some feedback that should probably get addressed (though I know some of it may need to be deferred due to time constraints), but nothing major. I will attach additional comments as I complete manual testing.
packages/components/src/internal/components/chart/ChartColorInputs.tsx
Outdated
Show resolved
Hide resolved
| @@ -1,22 +1,98 @@ | |||
| import React, { FC, memo, useCallback, useState } from 'react'; | |||
| import React, { FC, memo, useCallback, useRef, useState } from 'react'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint is complaining about this file, be sure to run eslint --fix before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, that is on my pre merge checklist (but I always wait until after CR so that it is easier to see the actual dev changes for the reviewer)
packages/components/src/internal/components/forms/input/ColorPickerInput.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/internal/components/forms/input/ColorPickerInput.tsx
Outdated
Show resolved
Hide resolved
| > | ||
| {text ? text : value ? <ColorIcon cls="color-picker__chip-small" asSquare value={value} /> : 'None'} | ||
| {text ? text : value ? <ColorIcon cls="color-picker__chip-small" asSquare value={value_} /> : noValueText} | ||
| <i className={classNames('fa', { 'fa-caret-up': showPicker, 'fa-caret-down': !showPicker })} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have the time I think we should try to style this to match the select component. It looks pretty jarring to have the two components next to each other.
| export interface MeasureOption { | ||
| color?: string; | ||
| shape?: string; | ||
| // lineType?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably safe to go ahead and uncomment lineType, since that's coming in a follow-on PR shortly after this one.
packages/components/src/internal/components/forms/input/ColorPickerInput.test.tsx
Outdated
Show resolved
Hide resolved
…and styling update


Rationale
The next round of plotting improvements focus on the color options. For most chart types, this PR adds color pickers for things like line color, fill color, and point color. For line charts that have a series measure selected, this adds to the chart builder modal options to be able to select a specific series value and set the color and shape for that series. These settings are all then stored with the chart config object and used on render.
Related Pull Requests
Changes