You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in this line, you're using d3's imperative api to define DOM, but Lit gives you a declarative api for this. consider this example, which uses d3 to compute geometry, but Lit to layout the DOM. Uou could extend this example to add lines and labels.
Hehe, I'm surprised that someone actually looked at this repo (created live at a meeting to showcase 😅).
Def nicer to do it declaratively via lit, however may be harder to get into this for someone with d3 but without prior modern js / web component experience.
Thanks for the ts snippet, we may create a chart design system and rendering via lit instead of using d3 is a nice approach.
Tiny remark, I'd only use the svg function for svg fragments (as you do in the map) but not for the container.
d3-web-component-example/src/charts/DonutChart.js
Line 39 in dc0a808
in this line, you're using d3's imperative api to define DOM, but Lit gives you a declarative api for this. consider this example, which uses d3 to compute geometry, but Lit to layout the DOM. Uou could extend this example to add lines and labels.
The text was updated successfully, but these errors were encountered: