Comments (16)
@sahuguet @mhkeller I don't have anything to share yet, but hope to in the coming months. I was hoping to by now but have just been way too busy. My plan is to release a library built upon LayerCake with of lot of fundamental building blocks. A good bit of it is done except documentation. It is similar in nature to vx / vsix (which I used to contribute) but for Svelte.
from layercake.
Thanks @techniq ! Looking forward to it. I'm updating the website to use svelte kit and I think adding a page for "Components" would be a good addition.
from layercake.
I just pushed up a "Component gallery" page https://layercake.graphics/components/
I also added jsdoc types to all of the example components, standardized them a bit more and added descriptions for each one. This is brand new so if you see any errors or things that can be improved, let me know.
from layercake.
Done :). I left a note in case someone goes down a similar path. There might still be an issue with swapping data/flatData within LayerCake, but my current approach works around this (I think). I'll know more for certain when I add the more dynamic example in the docs.
Btw, there might be some features in LayerChart worth porting back to LayerCake over time. For example in my Chart component it supports xBaseline
/ yBaseline
props which are useful when want the baseline to be non-zero, or example using 100%
(i.e. 1.0
) like this:
I need to add an example for this as well :).
from layercake.
I haven't set anything up but I'd be happy to answer your questions here
from layercake.
Here are a few questions
-
I could not find an example with chart title and axis labels.
Is it something that does not come (yet) out-of-the-box? -
Layercake vs Pancake
Do they compete with each other? Do they complement each other? -
is there a directory of user-contributed Layercake components and examples?
from layercake.
- I could not find an example with chart title and axis labels.
Is it something that does not come (yet) out-of-the-box?
I don't think I've made examples with separate text labels. I usually try to sneak them into the values as they appear in the axis, like in this chart. If you wanted to do a style where the label is, say, below the x-axis, I would add padding and then add some absolutely positioned text as an html layer, or adding it to the axis component.
- Layercake vs Pancake
Do they compete with each other? Do they complement each other?
Here's a brief write-up: #29 (comment)
- is there a directory of user-contributed Layercake components and examples?
@techniq has some but I don't think they have posted them yet. If people have a few, I'd be happy to add them to the readme! There are a few variations on the current components that I've wanted to make but still not sure how best to make them easy to navigate. Maybe just links to REPLs from the chart's website page? Open to any ideas!
from layercake.
@sahuguet does that answer your questions? I'll close this issue if all is good.
from layercake.
Yes. Looking forward to @techniq 's new project.
from layercake.
@mhkeller nice!
I've been working on my LayerChart component library built upon LayerCake, and I'm still refining the API / Component abstractions but I've been dog fooding it on a few projects. I think it's getting close API wise (sans a few renames and other minor adjustments), but the docs still need a lot of work. This is also just a small subset of components / charts I plan to support (many I've already written in React / visx). For example hierarchy-based components (tree, treemap, circle pack, etc). I'm loosely tracking all of these here.
All the individual component docs are mostly just stubbed out TODO placeholders, but some of the chart examples are built out showing all the pieces together (like Tooltips, HighlightBar/Line, etc. A good example page is Bar (which might be renamed to Bars
:) ). See Text for a small playground to see how it works. It's used by Axises/Labels/etc.
You can also see some high-level docs and ideas here that will slowly make it to the applicable pages.
I was roughly shooting to release a v1 by the end of the year, but we'll see. I just switched the repo to public so you can look around and let me know what you think.
from layercake.
Oh, and I've been working on svelte-ux, which has components, stores (fetch, graphql, query params, local storage, ...), actions, etc.
The docs are also a WIP as I have about 80-90% of the components documented (mostly just examples, needs descriptions, prop listings, interactive REPLs, etc), but there is a ton to document for the stores and actions.
Anyways, feel free to poke around there as well if you want :). Things are still in flux as well, but have been used for some production apps.
from layercake.
Very neat! I like that you have tweens built in the circle element. I feel like that's still an area to have more layer cake examples on – although I don't think there's a good svelte enter-update-exit pattern à la D3 so I'm not sure what a general pattern would be. Let me know when you've finished these!
from layercake.
@mhkeller Those tweens are available for Circle
, Rect
, and Line
, and will likely be added for Path
(using a custom interpolator, and likely d3-interpolate-path instead of d3's).
Rect
is great as it is used in HighlightBar
(likely to be renamed to HighlightRect
) and gives you smooth tweens for "free". It's also what enabled the smooth transitions setup on this REPL. I still need to add these animated examples to the docs, along with the tweened options to coordinate with delays, etc.
Btw I just implemented a solution for Bar group/stack so it supports all the combinations (grouped, stacked, grouped and stacked, separated stack, and percent stacked), which was one of the regressions of my 3c+ experiments mentioned here.
HighlightLine
uses both Line
and the Circle
(for data point(s)) which is run to watch with area stacks :).
Svelte makes all this so much cleaner than it used to be :).
I'll keep you posted. I'm still painting with pretty broad strokes and need to come up with a good docs pattern. I'm using mdsvex and preprocess the code examples, but need to do more to build ToC, extract front matter, extra prop tables, etc, and I'd love to have interactive REPLs instead of static pages, especially since the library can not be used on Svelte's REPL at the moment (I think due to the Vite $lib/$app aliases, but not for sure).
from layercake.
Very neat! Looks like you've been making a lot of progress. Should I close this issue since it sounds like you've moved beyond that one?
from layercake.
Ah neat. Yeah that could be a good addition to the axis components if you want to take a crack at it.
from layercake.
@mhkeller Added tweened
support to Path last night with some docs. The example is rather fun to play with by stepping the various options / combinations at the top.
I need to add animated axis/grid/scales to being fully animated (on the roadmap, but probably a bit out). We have this feature in visx with a few options like "from center", "from outside", "from min", "from max".
Currently working on an Arc
primitive (basically port my REPL and how it should then play within a Chart context (since it's basically a single dimension).
from layercake.
Related Issues (20)
- Handle mouse events for an entire LayerCake HOT 5
- yTick in AxisY.svelte changes position of marks and gridlines HOT 2
- 3d graph HOT 3
- more axis examples HOT 5
- Issue with package.json "exports" prop HOT 5
- Upgrade to svelte 4 HOT 2
- Create `cScale` for color? HOT 5
- Update REPL examples HOT 1
- Option to use different canvas contexts? HOT 6
- Should auto-calculated ordinal domain return sorted? HOT 2
- Sorted ordinal regression HOT 14
- Collapsible tree HOT 3
- Update to Svelte 5 when it's released HOT 3
- Chart showing up blank HOT 10
- Update to SvelteKit 2 HOT 2
- Question: is it NOT meant to be used with TypeScript? HOT 4
- Scatter plot with two dataset HOT 9
- Add prop to not sort a calculated domain from ordinal scale HOT 1
- Tick position on new Axis Y.html component is slightly off for bandwidth scales
- Deprecate `extents` prop perhaps? HOT 5
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 layercake.