-
DeasusOctober 22, 2020 at 7:24 am #12015
Hello! Thanks so much for all the help in the past!
I’ve been scratching my head trying to figure out a RingChart configuration which is taking more time than it should.
With the ring chart demo, the BAR_STACKED ring (TEMP ring), is filtering out the data to only grab the beginning of the week like so:
data.temps.forEach(function (d, i) {
if (i % 7 == 0) {
d.Date = new Date(d.Date);
laTemps.push(d);
}
});
If you remove MOD operator (i % 7), that will give all the days of the week, which forces the chart to stagger stack the bars.This obfuscates the bars which I personally don’t like.
The question is, is there a setting so that bars don’t stack on top of each other?
Thanks so much!
vizulyOctober 22, 2020 at 10:23 am #12016Hello,
I took a look at this, and I think there are two issues.
1. Trying to show that much data (daily data plots for 18 years) is just too dense, there are not enough pixels on the screen to display it all.
2. Due to issue 1. above I reduced the date range to just a few months, and then bars ARE overlapping as you observed. I debugged the problem, and right now as the ring chart is currently coded it has a default timeGrain setting set to d3.timeWeek, which means it will only render plots on a weekly basis. Obviously this isn’t very flexible. I just updated the RingChart with a “timeGrain” property, and you can set it to d3.timeDay (or any other time grain), and it will render the bars without overlapping them according to the time grain you set. Just shoot me an email at twgonzalez AT vizuly.io and I can send you the updated code file.
Cheers,
Tom
DeasusOctober 23, 2020 at 10:54 am #12017-so sweet! I just sent you my an email from my address.Let me know if you got it.
Thanks!
Deasus
vizulyOctober 23, 2020 at 10:58 am #12018Hello Deasus,
Yes, I received your email and replied. You can now set the time grain like this. viz.timeGrain(d3.timeDay) – or whichever you prefer.
Cheers,
Tom
DeasusOctober 28, 2020 at 8:14 am #12021Thanks for help on the Ring Chart! It’s definitely an amazing visualization.
I have a follow up question though: can the line area or scatter can have more than one measure? If they can, can you show me an example of how a series object is configured for it..?
-
|
You must be logged in to reply to this topic.