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

Idea: Blip size based on value #7

Open
vrklgn opened this issue Jul 15, 2020 · 1 comment
Open

Idea: Blip size based on value #7

vrklgn opened this issue Jul 15, 2020 · 1 comment
Assignees
Labels
idea Ideas that need evaluating

Comments

@vrklgn
Copy link
Owner

vrklgn commented Jul 15, 2020

Depending on value, impact or other arbitrary number the blip size should be sized accordingly.

Example:
Spending on System X is 3 USD per employee vs Spending on System Y is 6 USD per employee

@vrklgn vrklgn added the enhancement New feature or request label Jul 15, 2020
@vrklgn vrklgn added idea Ideas that need evaluating and removed enhancement New feature or request labels Jul 16, 2020
@vrklgn vrklgn self-assigned this Jul 16, 2020
@vrklgn
Copy link
Owner Author

vrklgn commented Aug 28, 2020

Input from Discord

  • Check your values and find the lowest and the highest
  • Write a function that sets the lowest and highest value to the min and max of blip size
let values = [50, 150, 500, 1000, 65000];
let scale = d3.scaleLinear()
  .domain(d3.extent(values))
  .range([10, 100]);

d3.clamp() clipping values outside range

let scale = d3.scaleLinear()
  .domain(d3.extent(values))
  .range([10, 100])
  .clamp(true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Ideas that need evaluating
Projects
None yet
Development

No branches or pull requests

1 participant