Repository navigation
Conversation
|
Before merging this Hephaestus 0.5.0 needs to be released and ggsql needs to depend on that due to slight changes in where linetype conversion responsibility is located |
| ); | ||
|
|
||
| // Natural log - just verify non-empty | ||
| // Natural log over more than four e-folds: the powers of e alone. |
There was a problem hiding this comment.
IIUC this is putting breaks at powers of
| /// by spaces; Vega-Lite fills them with the evenodd fill-rule. Returns | ||
| /// `None` for unknown shapes. | ||
| pub fn shape_to_svg_path(name: &str) -> Option<String> { | ||
| let shape = zygos::patterns::shape::builtin_shape(name)?; |
There was a problem hiding this comment.
I'm a little bit confused, who owns the shape registry: zygos or hephaestus?
There was a problem hiding this comment.
zygos owns a registry of predefined shapes. This is a fixed list that hephaestus use to init it's own registry that can be expanded by the consumer
| .unwrap_or_default() | ||
| } | ||
| _ => derive(resolved_transform.default_minor_break_count()), | ||
| _ => match (major_interval, resolved_transform.temporal_unit(), extent) { |
There was a problem hiding this comment.
Just noting that this is currently hardcoded to a monday grid AFAICT, whereas in some cultures weeks start at sunday. Not important for the PR as a whole.
There was a problem hiding this comment.
yeah, at some point we have to decide how much we want locale to influence these kind of things
| ) -> Vec<f64> { | ||
| minor_breaks_symlog(major_breaks, n, range) | ||
| extent_minor_breaks(major_breaks, n, range, |min, max| { | ||
| symlog_minor_breaks(min, max, BREAK_BASE) |
There was a problem hiding this comment.
This is more of a taste comment intended for zygos rather than this PR, but I'd argue that in the 'range includes 0'-case the minor breaks are a little bit too dense near 0. Same for pseudo_log transform.
This PR moves as much scaling logic as possible to the new zygos crate so that ggsql and hephaestus can share it
Part of this work incidentally fixes #512