Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[axis formatting] Override the valueformat to be percentage when contribution is selected #4866

Merged

Conversation

conglei
Copy link
Contributor

@conglei conglei commented Apr 22, 2018

Currently, the default value format when contribution is selected is not intuitive. (e.g., 0.5 -> 500m). In this PR, the value format will be overridden by .1%.

The reason here why I don' want want to change and save the current formatting to percentage are 1) the user selected format will be preserved when users uncheck contribution. 2) It seems in all the cases when user check contribution, percentage format for the value is the best approach.

also, it fixed a typo where f hadn't changed to valueFormater in piechart

@williaster

@codecov-io
Copy link

codecov-io commented Apr 22, 2018

Codecov Report

Merging #4866 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4866   +/-   ##
=======================================
  Coverage   76.96%   76.96%           
=======================================
  Files          44       44           
  Lines        8534     8534           
=======================================
  Hits         6568     6568           
  Misses       1966     1966

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66fcf9b...2970326. Read the comment docs.

@@ -332,6 +333,10 @@ export default function nvd3Vis(slice, payload) {
throw new Error('Unrecognized visualization for nvd3' + vizType);
}

if (fd.contribution) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out line 393 where you could handle this.

@mistercrunch mistercrunch merged commit 2cd016f into apache:master Apr 23, 2018
@rumbin
Copy link
Contributor

rumbin commented Apr 23, 2018

But what if the user would like to resolve minor differences and thus prefers .2% or even .3%? We do have use cases from both...

@mistercrunch
Copy link
Member

I thought about this as I was doing the original change: maybe in the future we'll have a controls side-effect effect framework where checking the box can change the format once, but user can still alter it. We can an issue for this but I don't think it's as pressing as this was.

michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
…ribution is selected (apache#4866)

* force the valueformat to be percentage when contribution is selected

* remove extra empty lines

* simplied the logic by reusing some existing code
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this pull request May 31, 2018
…ribution is selected (apache#4866)

* force the valueformat to be percentage when contribution is selected

* remove extra empty lines

* simplied the logic by reusing some existing code
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
…ribution is selected (apache#4866)

* force the valueformat to be percentage when contribution is selected

* remove extra empty lines

* simplied the logic by reusing some existing code
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants