Open linear[bot] opened 2 weeks ago
To use the new graphs on the performance tab, follow these steps:
Update Performance Tab Component:
Graph
component from /frontend/src/pages/Graphing/components/Graph.tsx
.Fetch Data:
useGetMetricsTimelineQuery
hook from /frontend/src/pages/Player/Toolbar/DevToolsWindow/ResourcePage/components/RequestMetrics/RequestMetrics.tsx
to fetch the necessary metrics data.Render Graph:
<Graph
title="Performance Metrics"
viewConfig={viewConfig}
productType={productType}
projectId={projectId}
startDate={startDate}
endDate={endDate}
query={query}
metric={metric}
functionType={functionType}
bucketByKey={bucketByKey}
bucketCount={bucketCount}
groupByKey={groupByKey}
limit={limit}
limitFunctionType={limitFunctionType}
limitMetric={limitMetric}
onShare={onShare}
onExpand={onExpand}
onEdit={onEdit}
/>
Configure Graph:
viewConfig
, productType
, projectId
, startDate
, endDate
, query
, metric
, functionType
, bucketByKey
, bucketCount
, groupByKey
, limit
, limitFunctionType
, limitMetric
, onShare
, onExpand
, and onEdit
props as needed.Styling:
/frontend/src/pages/Graphing/GraphingEditor.tsx /frontend/src/pages/Graphing/Dashboard.tsx /frontend/src/pages/Graphing/ExpandedGraph.tsx /frontend/src/pages/Graphing/components/Graph.tsx /frontend/src/pages/Player/Toolbar/DevToolsWindow/ResourcePage/components/RequestMetrics/RequestMetrics.tsx
loading state / empty state
use full height