Hi,
I have a chart that starts on June 21st and ends on July 22nd (as shown in the attached).
I would like there to be just one major gridline and label on July 1st, and neither a label nor a gridline at the minimum and maximum chart dates (June 21st and July 22nd), as there is currently. It seems that the first label is always generated at the minimum chart date, however.
Would it be possible to have, as I say, just the one label and gridline on July 1st?
Many thanks for your time,
James
Dear Dharanitharan,
Thank you for your time with this issue - unfortunately, however, your solution isn't what I'm looking for.
I attach three figures that I hope better explain what I'm after.
Figure 1:
This is current behaviour, and is the same as the first screenshot you send me. However, what I would like would for the 1st July gridline to appear on the second screenshot.
Figure 2:
This is similar to your second screenshot, but notice that the gridlines are not on July 1st.
Figure 3:
This is the behaviour that I am looking for: that the visibleMinimum and visibleMaximum are such that the data fills the whole chart, but that the gridline is still on July 1st.
The best solution to this might be through a callback that determines whether the label is rendered. So, for my situation, I could pass:
shouldRenderLabelAndGridline: (DateTime dateTime) => dateTime.day == 1;
Thanks again for your time,
James
Attachment: Gridlines_issue_cd1c1020.zip
Hi Dharanitharan,
Just wondering whether you had any updates on this?
Thanks,
James
Dear Dharanitharan,
Thank you for your help.
However, I have found that on panning, the label will often not render. I attach some screenshots showing the issue.
Rendering the labels as a function of the actualText is a great idea, however in most instances there is not a label with an actualText of, say, 'Jul 1'.
Perhaps if there was a label for each date then the label for July 1st would always render (i.e. whatever the visibleMinimum was).
Again, thank you for your time - we are getting so close!
James
Dear Dharanitharan,
Thank you so much for your help with this issue, you've been fantastic.
Given that we are kind of 'hacking' here, I was wondering whether precise label/gridline control (i.e. a means to solve this cleanly) was on the roadmap?
Best,
James
Dear Dharanitharan,
I would agree that, obviously, just wanting to render a label/gridline for July 1st is not a necessity for your users!
I chose July 1st as an example - what I'm really trying to do is to render labels and gridlines programatically. I've got the workaround that you kindly provided to work in my case, but I had to make numerous other hacks for the correct look.
Do you not think that the capacity to render gridlines/ labels programatically is fairly basic functionality? It seems to me that in any use case where the chart's boundaries are, say, the past n-days, then you would want the gridlines at meaningful intervals.
Suppose, for example, you want the chart to display the past 365 days of some time series. Surely then you would want gridlines at the first of each month, and not somewhat arbitrarily (e.g. 20th of each month) as they are in the present implementation?
Perhaps I've not been so clear, so apologies if that is the case. I really think that this would be a massive improvement to the package.
Many thanks your patience,
James
Dear Dharanitharan,
I'm not quite sure what you mean by competitor's reference links, but I attach some images with what I've achieved (rather laboriously!) with the workaround.
In the chart showing the previous year of the user's weight, I'm rendering gridlines and labels on the first of each month. I'm also doing this on the past three months chart.
For the chart showing the user's weight for the past month, I'm showing a label and gridline on each Monday.
Hope this helps,
James