`;
}
)}
function _7(altplot){return(
altplot(`Plot.barY(alphabet, {x: "letter", y: "frequency"}).plot()`, {open: true})
)}
function _altplot(htl,md,Inputs){return(
function altplot(code = "", {open} = {}) {
return htl.html`Is there an easier way? 🤯
${md`
Yes! While D3’s low-level abstraction is expressive, you might find it overkill for basic charts. For exploratory data analysis, or just to visualize data quickly, consider [Observable Plot](/@observablehq/plot) instead. Plot is free, [open-source](https://github.com/observablehq/plot), built on top of D3, and maintained by the same people as D3.
For example, the above chart can be written as:
~~~js
${code}
~~~
${Inputs.button("Copy code", {reduce: () => navigator.clipboard.writeText(code)})}
Try pasting this code into a new cell to see.
`}
`;
}
)}
function _linkplot(htl,md){return(
function linkplot(link = "", {open, title} = {}) {
return htl.html`Is there an easier way? 🤯
${md`
Yes! While D3’s low-level abstraction is expressive, you might find it overkill for basic charts. For exploratory data analysis, or just to visualize data quickly, consider [Observable Plot](/@observablehq/plot) instead. Plot is free, [open-source](https://github.com/observablehq/plot), built on top of D3, and maintained by the same people as D3.
For example, ${title || link} reproduces the above chart, with Plot.
`}