Comments (2)
Thinking about this has sent me into a rabbit hole. Two issues:
- how do we name this option (maybe "high-end radius—rh"—knowing that high will be bottom for negative values, right for horizontal bars and left for horizontal-negative)?
- instead of a
svg:rect
we'll now have a genericsvg:path
. We can do one that just implements rh (if not nullish[1]), and keep it at this.
But there might be future use cases (some we already have in mind) where the element we create is completely different: what if, for example, if we want bars that follow a radial coordinate system (#133). (Or even, marks that are rendered with the same visual logic but using canvas instead of SVG…)
So, while we can implement this with a simple test like (rh != null ? "rect" : "path")
(and maybe we should, I can put up a PR for this anyway), it's also tempting to take this as an opportunity to think more globally about how we'd want to be able to pass new "visual materializers" to marks.
[1] I'd want an explicit rh: 0 to opt-in to a svg:path, in order to make it possible to transition from rh=0 to rh=5 without discontinuity.
from plot.
Hmm, one possibility is an ry2 option that rounds the corners corresponding to the y2 edge. Then you could have similar options ry1, rx1, rx2 for the other sides — but you’d have to define which side takes precedence since the sides would compete for the corners.
Another possibility is separate radii for each corner, like CSS does for border-radius
(which also supports elliptical corners!).
Complicated!
from plot.
Related Issues (20)
- Chart with facets: ticks overflow HOT 5
- Waffle mark
- interpolatorRandomWalk maxDistance
- Cluster contours / segmentation
- Spatial interpolator reducers
- Barycentric interpolator leaves some raster cells uninterpolated HOT 2
- Return slope from linear regression mark? HOT 1
- Trouble using Plot library in a CommonJS environment
- The initial value of a plot with a title and a pointer transform is undefined
- Support for different projections?
- The tip mark should respect the associated scale’s (local) time zone, if present HOT 1
- Pointer interaction interferes with external event handlers
- The tip mark’s format option should not be ignored when a title channel is present
- Rect mark doesn't work with `scale: { type: "log" }` HOT 1
- Add a "Plot in Angular" example to the getting started page
- Exemple using Vue.js version 2
- Determine the default height when the projection domain is set
- Dot / circle with centroid radius value isn't responsive to accessor changes HOT 4
- [question] import Plot in Node.js ERR_REQUIRE_ESM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plot.