File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ const config = computed<VueUiHorizontalBarConfig>(() => {
215215 backdropFilter: false ,
216216 backgroundColor: ' transparent' ,
217217 customFormat : ({ datapoint }) => {
218+ const name = datapoint ?.name ?.replace (/ \n / g , ' <br>' )
218219 return `
219220 <div class="font-mono p-3 border border-border rounded-md bg-[var(--bg)]/10 backdrop-blur-md">
220221 <div class="flex items-center gap-2">
@@ -223,7 +224,7 @@ const config = computed<VueUiHorizontalBarConfig>(() => {
223224 <rect x="0" y="0" width="2" height="2" rx="0.3" fill="${datapoint ?.color }" />
224225 </svg>
225226 </div>
226- <span>${datapoint ?. name }: ${(datapoint as VueUiHorizontalBarDatapoint ).formattedValue }</span>
227+ <span>${name }: ${(datapoint as VueUiHorizontalBarDatapoint ).formattedValue ?? 0 }</span>
227228 </div>
228229 </div>
229230 `
You can’t perform that action at this time.
0 commit comments