datagrok-ai / public

Public package repository for the Datagrok.ai platform
MIT License
42 stars 26 forks source link

#2948: Colour picker in legend issues #2948

Closed katerina-stepanova closed 3 weeks ago

katerina-stepanova commented 1 month ago

1.20.2 / 1.21

v1.20

Case1: colour picker cannot be opened for structures legend

  1. Open SPGI
  2. Set up a viewer with legend by structure: e.g. scatter plot + colouring or bar chart + stacking. Use Core, R100 or R101 so that there are not too many categories
  3. Click the edit icon for an item in legend Expected results: colour picker should be opened. Or as alternative the icon should be removed for this case, if it's not supported. Actual results: colour picker is not opened, error:
    
    NullError: method not found: 'bY' on null
    packages/color_picker/utils/color_value.dart 20:9                      ColorValue.from
    packages/color_picker/utils/color_value.dart 19:3                      ColorValue.from
    packages/d4/src/color_picker.dart 32:27                                ColorPicker.draw
    packages/d4/src/ui.dart 1511:83                                        colorPicker
    packages/d4/src/widgets/icons.dart 85:67                               Icons._bindIcon.<anonymous function>
    packages/$sdk/lib/html/dart2js/html_dart2js.dart 42920:48              _EventStreamSubscription.<anonymous function>
    packages/$sdk/lib/async/zone.dart 1132:12                              _rootRunUnary
    packages/$sdk/lib/async/zone.dart 1012:12                              _CustomZone.runUnary
    packages/$sdk/lib/async/zone.dart 909:14                               _CustomZone.runUnaryGuarded
    packages/$sdk/lib/async/zone.dart 936:23                               _CustomZone.bindUnaryCallback.<anonymous function>
    packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 2456:48      invokeClosure.<anonymous function>
    packages/$sdk/lib/_internal/js_runtime/lib/isolate_helper.dart 474:16  _IsolateContext.eval
    packages/$sdk/lib/_internal/js_runtime/lib/isolate_helper.dart 59:16   _callInIsolate
    packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 2456:14      invokeClosure
    packages/$sdk/lib/_internal/js_runtime/lib/js_helper.dart 2476:14      convertDartClosureToJS


**Case 2: cancel colour selection**
1. Open SPGI
2. Set up a viewer with legend by a categorical column with not too many values (e.g. Stereo Category): e.g. scatter plot + colouring or bar chart + stacking.
3. Click the edit icon for an item in legend
4. Click Cancel on colour picker dialog
5. Left click the same entry in the legend to filter data shown on the plot
**Expected results:** click on the legend item filters data on the plot
**Actual results:** colour picker is opened again instead
dnillovna commented 1 month ago

This issue has been mirrored in Jira: https://reddata.atlassian.net/browse/GROK-16393

LesiaPavlenko commented 1 month ago

all is fixed for 1.20.1

add ability to change colors for empty values - will be added to 1.20.1+

LesiaPavlenko commented 3 weeks ago

add ability to change colors for empty values — made it work for all viewers with such a legend will be added to v. 1.20.2

LesiaPavlenko commented 3 weeks ago

colors for empty values are OK. Tested on Scatter Plot and Bar Chart viewers