-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TimeSeries BarChart? #41
Comments
Hi @chasers, Ordinal Scale doesn't care about the data type, so you could easily create a dataset, sorted by date (and with pre-formatted date labels to make life easier) and feed that into the barchart. You would have to ensure regular time periods (e.g. daily) and create a row in the dataset for missing time periods with a zero value. In terms of implementing a time series scale for a barchart, feel free. I'm happy to accept PRs. It may be worth getting your thoughts on use cases first and we could discuss possible approaches. There are a couple of potential approaches depending on what you are trying to achieve. |
Thanks! Yeah I've got it mostly there. This is now on our billing page: I tried unsuccessfully to overwrite the x-axis with my own. It's just the labels get a little noisy with more than 30 days Can I simply customize the number of ticks in the x-axis? Like put a tick at every Nth column? I'm evaluating this for more generalized simple dashboarding. So far I haven't run into any blockers really. LinePlot will be great! |
Hi @chasers, looks good! No - there isn't an option to label every Nth for the ordinal scale as yet. It wouldn't be hard to do at all. Or we could set a max_category_labels or similar on the BarChart and pass it through to the scale and have the scale calculate how many to skip. That would be pretty quick & simple to do. |
It occurs to me that a simple (if sort of indirect) way to support this would be to add separate classes to the x and y-axis ticks and labels, and then let the user set the stroke/fill to |
It looks like there is not a way to use the TimeSeries scale with a bar chart?
I like to use time series bar charts for things a lot. Would love to be able to do this Contex. I can try to implement if you're up for it?
The text was updated successfully, but these errors were encountered: