Open dakujem opened 3 years ago
Try setting them on the child chart.
It’s true, there is a lot of weirdness with the overlap in functionality between parent and child charts, but I’m my experience there is always a way to make it work. It sometimes takes an incomprehensible combination of setting on parent / child.
I’m not clear what problem you are having with the time scale, but it sounds like a separate issue or SO question.
I assumed that the xUnit
function would be called. I was setting d3.timeDays, d3.timeMonths, or d3.timeYears, but seeing the ticks on the x-axis did not change, I dropped the debugger in and it never even fired, the option is ignored.
With the formatter on x-axis, I wanted to print names of months, the year or the week number or date depending on which particular grouping was set. Not sure if I am able to do this without xUnits
working properly.
Sorry I don't have time to work up an example atm, but I am confident that there is a way to get this working. There always is, but with composite charts it is often surprising what needs to be set on the composite vs the child charts.
I will try to respond later in the week if you're still having trouble.
I think I'll work this out eventually :-)
Thank you Gordon. This can be closed, if its not a bug. I found out the xUnits is not called for line charts either. Considering the inheritance map, I may have been confused by the documentation itself.
I'm trying to do similar thing as in the "switching times" example, that is, to have a variable X-axis, but the two functions (most importantly the
xUnits
) are never even triggeredAlso, this is my time scale:
I want to switch between day/week/month/year view, but this seems like a wrong way to go.