kz930 opened a new issue, #7252:
URL: https://github.com/apache/texera/issues/7252

   ### What happened?
   
   Three chart settings take a colour but are declared as plain strings, so the 
schema is `{"type":"string"}` with no `pattern` and the form renders a 
free-text box. What is legal is stated only in `@JsonPropertyDescription("must 
be a valid CSS color or hex color string")`.
   
   | Operator | Setting | Reaches plotly as |
   | --- | --- | --- |
   | `LineChartOpDesc` (`LineConfig`) | Line Color | `line={'color': …}` on 
`go.Scatter` |
   | `ContinuousErrorBandsOpDesc` (`BandConfig`) | Fill Color, plus the 
inherited Line Color | `fillcolor=…` |
   | `FigureFactoryTableOpDesc` | Font Color | `font_colors=[…]` on 
`ff.create_table` |
   
   Generating each module from `main` and executing it: `red` renders; `#ggg` 
and `1` fail with `ValueError: Invalid value of type 'builtins.str' received 
for the 'color' property of scatter.line`; `nosuchcolor` fails the same way on 
the table's font. Nothing checks the value before the run, and the error names 
a plotly property rather than the field the user filled in.
   
   Expected: the field states what it accepts in a way the form can enforce. An 
`enum` will not do — plotly takes 3- and 6-digit hex, 
`rgb`/`rgba`/`hsl`/`hsla`/`hsv`/`hsva`, `var(--…)` and 148 CSS names — but a 
`pattern` derived from `ColorValidator` in `_plotly_utils/basevalidators.py` 
covers all of those and rejects the values above. Empty should stay legal: 
every one of these paths omits the colour argument when the field is blank.
   
   ### How to reproduce?
   
   1. Chain a source with two numeric columns into Line Chart and configure one 
line.
   2. Type `#ggg` into that line's Line Color.
   3. Run — the operator fails with the error below; `red` succeeds.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Relevant log output
   
   ```shell
   ValueError: Invalid value of type 'builtins.str' received for the 'color' 
property of scatter.line
       Received value: '#ggg'
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to