-
TylerJanuary 19, 2017 at 12:50 pm #7221
Hey there,
As the title states, I would like to adjust the Radial arcs from going inward to outward. To give more detail, when the arc reaches its maximum value it automatically forms a new arc on the inside of the first arc and so on depending how many times that interval is exceeded.
What I want is to still have the first arc in its same position; However, every time a new successive arc is formed I would like it to wrap around the outside of the first arc and to continue outward for each time it exceeds the max value.
Thank you kindly!
-Tyler
vizulyJanuary 19, 2017 at 12:56 pm #7222Hi Tyler,
You will want to modify the src/viz/radial_progress.js
measure()
routine.There is a loop that starts with:
for (var i=0; i < arcsTotal; i++) {
Modify these two lines:
arc.outerRadius(scope.radius-(arcThickness*i)); arc.innerRadius(scope.radius-(arcThickness*(i+1)));
To look like this:
arc.outerRadius(scope.radius+(arcThickness*i)); arc.innerRadius(scope.radius+(arcThickness*(i+1)));
That should do the trick!
Cheers,
Tom
TylerJanuary 19, 2017 at 2:05 pm #7223Thanks for the quick response!
I did as you recommended and it did work, but not entirely. By changing the minus signs to plus signs, they do go on the outside, but the following two things are happening as a result:
1. There is an unfilled arc on the inside, and the colored arc with the actual value starts on the outside of the blank arc. I changed (i+1) to (i-1) and that fixed it IF it only had to utilize one arc. However, if I do a value that is greater than the max, it again will form a blank arc to start.
2. If the max value is exceeded at least once, the initial blank arc will double in thickness compared to its outer arc buddies.
The following is an image link should you want a visualization of the problem:
(http://imgur.com/a/y1JbT)Thanks for helping a poor old chap!
Tyler
vizulyJanuary 19, 2017 at 2:12 pm #7224Hi Tyler,
So much for a quick solution 🙂
Do you feel comfortable playing around with the code in the measure() and update() routine? That is where you will need to go to get the result you are looking for.
The extra thick “inner arc” is actually the track-background which you will want to adjust.
Cheers,
Tom
TylerJanuary 19, 2017 at 2:31 pm #7226I’m a pretty novice coder, but I will definitely take a look at them and see what I can do.
Thanks
Tyler
-
|
You must be logged in to reply to this topic.