diff --git a/front/components/About/AboutChartView.vue b/front/components/About/AboutChartView.vue index 92cdac8..e3c1157 100644 --- a/front/components/About/AboutChartView.vue +++ b/front/components/About/AboutChartView.vue @@ -1,34 +1,33 @@ @@ -167,21 +174,51 @@ const currentChartData = computed((): ChartConfig => {
{ + __isFragment?: never + __isTeleport?: never + __isSuspense?: never + new (...args: any[]): { + $props: P + } +} + +export function componentToString
(config: ChartConfig, component: Constructor
, props?: P) {
+ if (!isClient) return
+
+ // This function will be called once during mount lifecycle
+ const id = useId()
+
+ // https://unovis.dev/docs/auxiliary/Crosshair#component-props
+ return (_data: any, x: number | Date) => {
+ const data = 'data' in _data ? _data.data : _data
+ const serializedKey = `${id}-${serializeKey(data)}`
+ const cachedContent = cache.get(serializedKey)
+ if (cachedContent) return cachedContent
+
+ const vnode = h