Is it possible to have a graduating panel with varying intervals? What I want to do is have the interval based on the month. For example, if the month is January then the interval would be 31, February would be 28 or 29, and so on. Currently, I have the interval set to 28 (i.e. 4 weeks). As you can see in the image below, the months don’t line up with the first day of each month rather they line up with every four weeks due to my 28 interval:
Could you just set interval to 1 (or not set it at all) and have graduatedFunction return an empty string for all of the days you don’t want anything to be shown?
Actually, I should have suggested the TextBlock.graduatedSkip functional property. (It’s new in 2.0 and is also on Shape.) But since you already have your own graduatedFunction function, what you did is probably easiest.
I’m suspecting that it’s not showing because the week separator tick is being shown on that day. Move it to your second “Graduated” Panel, or to a third one.
Figured it out, I needed to use Math.round instead of Math.ceil. One last question. I would like to display vertical bars just to the left of the date. I was using interval with it before but now that doesn’t work. I can’t use a graduated function with it so how would I get this to work. This was my old code:
Going back to my previous question. You are right about the week separator tick being shown on the first day of the month which causes the month to disappear. This is indeed the case (see the image below for Aug 2021). I had to scroll a little further to see this. I have tried placing the block of code after the weeks block and copying the block as a third graduated panel; however, the month still disappears. The bar shape exhibits the same behavior as well. Any other thoughts?