File tree Expand file tree Collapse file tree
trackio/frontend/src/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " trackio " : patch
3+ ---
4+
5+ feat: Refactor plot title to display only the metric name without the path
Original file line number Diff line number Diff line change 287287 {#each orderedDirect as metric , i }
288288 {@const plotData = getPlotData (metric )}
289289 {@const useBar = singlePointMetrics .has (metric )}
290+ {@const directTitle = showHeaders ? metric .split (" /" ).slice (1 ).join (" /" ) || metric : metric }
290291 {#if plotData .length > 0 }
291292 {#if useBar }
292293 <BarPlot
293294 data ={plotData }
294295 y ={metric }
295- title ={metric }
296+ title ={directTitle }
296297 {colorMap }
297298 draggable ={true }
298299 ondragstart ={(e ) => handleDragStart (directKey , i , e )}
304305 data ={plotData }
305306 x ={xColumn }
306307 y ={metric }
307- title ={metric }
308+ title ={directTitle }
308309 {colorMap }
309310 {xLim }
310311 onSelect ={handlePlotSelect }
332333 {#each orderedSub as metric , i }
333334 {@const plotData = getPlotData (metric )}
334335 {@const useBar = singlePointMetrics .has (metric )}
336+ {@const subTitle = showHeaders ? metric .split (" /" ).slice (2 ).join (" /" ) || metric : metric }
335337 {#if plotData .length > 0 }
336338 {#if useBar }
337339 <BarPlot
338340 data ={plotData }
339341 y ={metric }
340- title ={metric }
342+ title ={subTitle }
341343 {colorMap }
342344 draggable ={true }
343345 ondragstart ={(e ) => handleDragStart (subKey , i , e )}
349351 data ={plotData }
350352 x ={xColumn }
351353 y ={metric }
352- title ={metric }
354+ title ={subTitle }
353355 {colorMap }
354356 {xLim }
355357 onSelect ={handlePlotSelect }
You can’t perform that action at this time.
0 commit comments