-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bar element and barchart #31
Bar element and barchart #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old chart API had the option to auto size either the width for bars or the height for columns, that is gone, but I think is useful.
Please add (more) tests for clustered bar-charts.
I've got a fix ready for the non-compiling gallery images that depends on this PR.
You can also merge that commit into your branch: #32
Autosizing would be great, can we add in a future PR, as it applies to charts more generally than just bar charts - and it would probably depend on the axis flipping we discussed
Incoming :)
You know already that I'm a git noob, so suggest we pull that into the aggressive-refactor branch after this is merged |
In a future PR, we may want to add a "errorbar-style" arg but I don't think its essential |
9155ee8
into
cetz-package:aggressive-refactoring
Bar elements are reimplemented with a general solution, which allows explicit control over the placement of each bar in a series. The logic governing clustered and stacked bars can be passed onto the chart's implemented instead.
The element
The bar element has the following function signature:
Suggest adding support for controlling the number of points along each edge of the bar, for better rendering in other axis styles (for example, more samples on the top horizontal line would allow it to be curved on a polar-2d axis style).
The chart
Still a work in progress, as I'm taking my time thinking of what people will want to show in a bar chart. I've generally only ever seen bars and error bars, so this is the general case I'll aim to support with the chart (and for more complicated things, it can be constructed manually through plot)
To do: