You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To implement automated bucketing by number of buckets, follow these steps:
Frontend:
In /frontend/src/pages/LogsPage/LogsHistogram/LogsHistogram.tsx, update the LogsHistogramChart component to calculate the bucket width by dividing the current date range by the bucket count.
constbucketWidth=(endDate-startDate)/bucketCount;
Pass this bucketWidth to the histogram rendering logic.
Backend:
In /backend/clickhouse/query.go, modify the readMetrics function to accept a bucket width parameter and use it to adjust the query for fetching metrics.
funcreadMetrics(params... , bucketWidthint) {
// Adjust query to use bucketWidth
}
Graph Component:
In /frontend/src/pages/Graphing/components/Graph.tsx, ensure the Graph component can handle dynamic bucket widths by passing the calculated bucketWidth as a prop.
infer bucket width by using current date range / bucket count
The text was updated successfully, but these errors were encountered: