Open techniq opened 2 months ago
@mhkeller gathering some changes I've made (or plan to) within LayerChart, some of which might be worth pushing upstream to LayerCake (such as full width Canvas). Integration with LayerChart contexts like TransformContext
, GeoContext,
and TooltipContext
makes some of these changes impractical to move ATM.
Thanks I'll keep an eye on it. What does full width Canvas do?
If you applied a padding (such as <Chart padding={{ top: 60 }}>
) and zoom or translate the canvas, the chart would be "clipped" since the <canvas>
is absolute positioned and inset based on the padding. The change uses context.translate()
and the full container size (which aligns the results with <svg transform="...">
)
The Choropleth example demonstrated this (compare to an older commit preview).
Before | After |
---|---|
You have to scale/zoom or drag/translate to see the issue (not really an issue with most static charts). This would be a problem with more chart types, but I've mostly only focused on Canvas support for geo (since it typically benefits the most with complex geojson). Also hoping to find a fix for the infinite loop issue before I expand out too much (might wait til Svelte 5).
baseline
supportxDomain={[0, null]}
would ignore negative valuesBrush
cScale
color scale instead of usingrScale
(which is also useful for radius, etc)chartContext()
with better typesradial
at Chart context level instead of individual components (see RadialLine examples)Layout components
scaleCanvas()
integrationclass
supportclass
supportclass
support