Visualize Selections: Maximum

edited April 2014 in How To...

Hi I would to create a visualization as in the following picture. This visualization will be running in real-time showing current user selections. Therefore, I want to show how the selections affect the size of the arcs but this stays within a range. If for example an arc gets larger than 500px (meaning that 50 selections have been made in a particular category), the circle remains the same size, and the rest arcs get smaller - if a new selection in the same category is made.

Someone maybe has a nifty solution :-)

Untitled 2

Answers

  • edited April 2014 Answer ✓

    well, this has to do with maths

    if any X1 is > 50 we have a problem

    normally: 50 * 10 = 500 (or X1 * 10 = 500)

    • with X1 being 50 we have 500 / X1 = 10
    • so e.g. 500 / 30 = 16,6
    • so e.g. 500 / 60 = 8,33

    • so 500 / X1 = factor

    calculate factor for the biggest X1 and mult all radius with that same factor

    so you have to for loop over all values and store the highest X1 and then say factor = 500 / X1;

    and then use factor on every value as a scaling / scale

Sign In or Register to comment.