Skip to content

Instantly share code, notes, and snippets.

@tarzak
Created January 19, 2018 18:18
Show Gist options
  • Save tarzak/5875993dc9cbcdf9e5c78a43c5831a81 to your computer and use it in GitHub Desktop.
Save tarzak/5875993dc9cbcdf9e5c78a43c5831a81 to your computer and use it in GitHub Desktop.
const obj = {
translationX: -10, // translation for label to move it a bit left
barTranslationX: 7, // translation for bar to move it a bit right
coefficientTranslationYForLeastValuable: 10,
coefficientTranslationY: 26, // translation for label to move it right down in a row with 0 valuable scores
getYTranslation: function(value) {console.log(this, value);
return value === 0.1 ? this.coefficientTranslationYForLeastValuable : value * this.coefficientTranslationY + 2 * value + 7}
};
export default obj;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment