superset icon indicating copy to clipboard operation
superset copied to clipboard

fix: radar chart sort by error

Open i-love-thinking opened this issue 2 years ago • 3 comments

fix(radar chart): 'sort by' in controlPanel correctly

SUMMARY

There is a typo in radar chart buildQuery.ts. fix it by changed timeseries_limit_metric to orderby and by formData.orderby in buildQuery.ts.

TESTING INSTRUCTIONS

sort by will be normal function in radar chart. It can be checked by result table

ADDITIONAL INFORMATION

  • [ ] Has associated issue:
  • [ ] Required feature flags:
  • [ ] Changes UI
  • [ ] Includes DB Migration (follow approval process in SIP-59)
    • [ ] Migration is atomic, supports rollback & is backwards-compatible
    • [ ] Confirm DB migration upgrade and downgrade tested
    • [ ] Runtime estimates and downtime expectations provided
  • [ ] Introduces new feature or API
  • [ ] Removes existing feature or API

i-love-thinking avatar Nov 21 '23 16:11 i-love-thinking

@i-love-thinking thanks for the PR. I've cc'ed a couple of frontend engineers who may have more context. Additionally would you mind adding screenshots of the before/after and/or add any integration tests (if possible)?

john-bodley avatar Nov 21 '23 17:11 john-bodley

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 58.90%. Comparing base (fbc66a8) to head (c368948). Report is 2552 commits behind head on master.

Files with missing lines Patch % Lines
...ugins/plugin-chart-echarts/src/Radar/buildQuery.ts 0.00% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26057   +/-   ##
=======================================
  Coverage   58.90%   58.90%           
=======================================
  Files        1941     1941           
  Lines       75882    75881    -1     
  Branches     8443     8443           
=======================================
  Hits        44700    44700           
+ Misses      29007    29006    -1     
  Partials     2175     2175           
Flag Coverage Δ
javascript 56.27% <0.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 21 '23 18:11 codecov[bot]

Re-pinging @kgabryje on this...

Also, @yousoph do you know anyone using this chart? It'd be good to test on some various examples and check for regressions.

rusackas avatar Aug 22 '24 19:08 rusackas

@i-love-thinking Tested on Radar chart from examples, for some reason it's crashing when I add Count as sort by

image

kgabryje avatar Aug 28 '24 15:08 kgabryje

@i-love-thinking Tested on Radar chart from examples, for some reason it's crashing when I add Count as sort by

@kgabryje Thanks your testing, I think maybe cause by Count is not a column. it's a metric and only one value, and maybe exclude by sortby control?

i-love-thinking avatar Aug 28 '24 15:08 i-love-thinking

@i-love-thinking Tested on Radar chart from examples, for some reason it's crashing when I add Count as sort by

@kgabryje Thanks your testing, I think maybe cause by Count is not a column. it's a metric and only one value, and maybe exclude by sortby control?

I think sort by works on metrics, not columns, and it seems to be working when I use AVG(price_each). So maybe it's not handling a saved metric for some reason?

kgabryje avatar Aug 28 '24 16:08 kgabryje

@kgabryje Can you put on the same Radar chart, but without sortby setting?

i-love-thinking avatar Aug 28 '24 16:08 i-love-thinking

@kgabryje The sortby function is for LEGEND. could it work fine?

i-love-thinking avatar Aug 28 '24 16:08 i-love-thinking