redash
redash copied to clipboard
Adding % change in counter visualization, adds a bit clarity in counter
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](https://user-images.githubusercontent.com/1905439/156449931-6b7d5dd5-0f40-4f3b-a2d9-4c96d0b79d6a.png)
@susodapop as you said, this PR only adds support for adding % change in counter visualization
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.
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.
@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
Counter visualization to select the percent change column
@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.