redash icon indicating copy to clipboard operation
redash copied to clipboard

Adding % change in counter visualization, adds a bit clarity in counter

Open mudasirmirza opened this issue 2 years ago • 4 comments

What type of PR is this? (check all applicable)

  • [X] Feature

Description

Adding % change in the counter visualization. This add clarity and beautification.

Related Tickets & Documents

https://github.com/getredash/redash/pull/5708

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

percent_change_counter

mudasirmirza avatar Mar 02 '22 21:03 mudasirmirza

@susodapop as you said, this PR only adds support for adding % change in counter visualization

mudasirmirza avatar Mar 02 '22 21:03 mudasirmirza

Thank you! A couple notes before a full review:

  • Please add a screenshot of the counter visualisation settings.
  • Will this be disabled by default? If a user of V10 upgrades will all their counter visualisations suddenly include a % change? We don't want this.

susodapop avatar Mar 03 '22 19:03 susodapop

Hi @susodapop ,

A bit clarity, by default the % change will not show as shown in the original attachment. It will show settings to select a column that returns the % change value in the results. This means if a Data source has implementation of returning % change then the user will be able to select that column. Currently I am away from my computer, I will attach screenshot of how to select the column for % change.

I don't know react so I could not implement this using just frontend, the value has to come from DataSourcd and then selected same as we select different value and target.

Regards, Mudasir.

mudasirmirza avatar Mar 03 '22 19:03 mudasirmirza

@susodapop a good example will be how to add percent change in the returning value https://github.com/getredash/redash/pull/5711/files#diff-4deee8719ad43c01c298260be178aa10dced05f7752ca97dc897d4fef7a6d9b1R67

Python method to calculate percent change https://github.com/getredash/redash/pull/5711/files#diff-4deee8719ad43c01c298260be178aa10dced05f7752ca97dc897d4fef7a6d9b1R39

Where the DataSource is adding percent change as a column. Ideally this should be a checkbox but as I mentioned earlier not good with react so can not do this with frontend code.

DataSource returning Percent Change value datasouce returning percent change

Counter visualization to select the percent change column counter visualization option to select percent change

mudasirmirza avatar Mar 13 '22 19:03 mudasirmirza

@mudasirmirza , thanks for the PR! Same thing here - we've updated a lot of things now that we're Community-driven so - if you're still interested in getting this merged - would you mind rebasing off master to re-run the CI, as well as updating merge conflicts?

We're trying to clean up our PR todo list, so if you're not interested, that's fine - we'll close the PR in about a week if we don't hear back. If you're interested in reopening the PR afterwards, we would also very much welcome that.

guidopetri avatar Aug 20 '23 22:08 guidopetri