Loading the record
Reading the stored /api/items response for this item.
Reading the stored /api/items response for this item.
npx shadcn@latest add makes, so the answer cannot drift from reality without the install drifting too.GET https://shadcn-vue.com/r/styles/new-york/chart.json<script setup lang="ts">
import type { BulletLegendItemInterface } from "@unovis/ts"
import type { Component } from "vue"
import { omit } from "@unovis/ts"
import { VisCrosshair, VisTooltip } from "@unovis/vue"
import { createApp } from "vue"
import { ChartTooltip } from "."
const props = withDefaults(defineProps<{
colors: string[]
index: string
items: BulletLegendItemInterface[]
customTooltip?: Component
}>(), {
colors: () => [],
})
// Use weakmap to store reference to each datapoint for Tooltip
const wm = new WeakMap()
function template(d: any) {
if (wm.has(d)) {
return wm.get(d)
}
else {
const componentDiv = document.createElement("div")
const omittedData = Object.entries(omit(d, [props.index])).map(([key, value]) => {
const legendReference = props.items.find(i => i.name === key)
return { ...legendReference, value }
})
const TooltipComponent = props.customTooltip ?? ChartTooltip
createApp(TooltipComponent, { title: d[props.index].toString(), data: omittedData }).mount(componentDiv)
wm.set(d, componentDiv.innerHTML)
return componentDiv.innerHTML
}
}
function color(d: unknown, i: number) {
return props.colors[i] ?? "transparent"
}
</script>
<template>
<VisTooltip :horizontal-shift="20" :vertical-shift="20" />
<VisCrosshair :template="template" :color="color" />
</template>
Read from https://shadcn-vue.com/r/styles/new-york/chart.json. Source is read for the first 150 items per registry, which is a size decision, not a coverage one. Nothing is served from this origin: the install command fetches the registry's own endpoint.
This registry's own demo page permits framing, so the component can be watched running where its authors maintain it.
https://shadcn-vue.com/docs/components/chart
This record is the /api/items/shadcn-vue/chart response blockdex.thecompound.tech served on 2026-09-13, from the crawl of 2026-09-13.