Skip to content

Conversation

@cnathe
Copy link
Contributor

@cnathe cnathe commented Dec 5, 2025

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

  • 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
  • ColorPickerInput update to use fixed position by default and new DEFAULT_COLORS constant
  • Add LetterIcon for use with "Auto" set series values

Copy link
Contributor

@labkey-alan labkey-alan left a 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.

@@ -1,22 +1,98 @@
import React, { FC, memo, useCallback, useState } from 'react';
import React, { FC, memo, useCallback, useRef, useState } from 'react';
Copy link
Contributor

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.

Copy link
Contributor Author

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)

>
{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 })} />
Copy link
Contributor

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;
Copy link
Contributor

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.

@labkey-alan
Copy link
Contributor

labkey-alan commented Dec 8, 2025

Manual Testing Log:

Color picker renders awkwardly on smaller screen sizes

When looking at a screen that is half the width of my 1440p monitor the color picker for the "color" option of a line chart renders awkwardly. The remove icon renders below the picker. The remove icon for Shape renders next to the picker (as I would expect). There seems to be enough space to render everything on one line though.
Screenshot 2025-12-08 at 1 59 00 PM

Mismatched styles for ColorPickerInput and SelectInput

The ColorPickerInput and SelectInput render differently in a few ways that are pretty jarring when they're rendered next to each other:

  • the color picker is shorter (it seems to have less top/bottom padding)
  • the down-arrow that implies the button is a dropdown looks different than the SelectInput
  • the placeholder color is a darker shade than the SelectInput.
Screenshot 2025-12-08 at 1 59 15 PM

@cnathe cnathe merged commit 43bcdb6 into develop Dec 9, 2025
3 checks passed
@cnathe cnathe deleted the fb_chartColorScale branch December 9, 2025 20:50
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