SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix: minor fix for uplot scale (#10164)
Abhi kumar518dfcbe59d1
diff --git a/frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.styles.scss b/frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.styles.scssindex 448115fa6d..96064b1544 100644--- a/frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.styles.scss+++ b/frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.styles.scss@@ -18,22 +18,5 @@padding-left: 12px;padding-bottom: 12px;overflow: auto;-- &::-webkit-scrollbar {- width: 0.25rem !important;- }-- &::-webkit-scrollbar-track {- background: transparent;- }-- &::-webkit-scrollbar-thumb {- background: var(--bg-slate-400);- border-radius: 0.5rem;- }-- &::-webkit-scrollbar-thumb:hover {- background: var(--bg-slate-300);- }}}diff --git a/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.ts b/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.tsindex 94155adebe..a029edc8a1 100644--- a/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.ts+++ b/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.ts@@ -68,11 +68,15 @@ export class UPlotConfigBuilder extends ConfigBuilder<constructor(args?: ConfigBuilderProps) {super(args ?? {});- const { widgetId, onDragSelect } = args ?? {};+ const { widgetId, onDragSelect, tzDate } = args ?? {};if (widgetId) {this.widgetId = widgetId;}+ if (tzDate) {+ this.tzDate = tzDate;+ }+this.onDragSelect = noop;if (onDragSelect) {diff --git a/frontend/src/lib/uPlotV2/config/UPlotScaleBuilder.ts b/frontend/src/lib/uPlotV2/config/UPlotScaleBuilder.tsindex cfc1803775..dd8db053ac 100644--- a/frontend/src/lib/uPlotV2/config/UPlotScaleBuilder.ts+++ b/frontend/src/lib/uPlotV2/config/UPlotScaleBuilder.ts@@ -25,8 +25,10 @@ export class UPlotScaleBuilder extends ConfigBuilder<constructor(props: ScaleProps) {super(props);- this.softMin = props.softMin ?? null;- this.softMax = props.softMax ?? null;+ // By default while creating a widget we set the softMin and softMax to 0, so we need to handle this case separately+ const isDefaultSoftMinMax = props.softMin === 0 && props.softMax === 0;+ this.softMin = isDefaultSoftMinMax ? null : props.softMin ?? null;+ this.softMax = isDefaultSoftMinMax ? null : props.softMax ?? null;this.min = props.min ?? null;this.max = props.max ?? null;}@@ -38,7 +40,7 @@ export class UPlotScaleBuilder extends ConfigBuilder<range,thresholds,logBase = 10,- padMinBy = 0,+ padMinBy = 0.1,padMaxBy = 0.1,} = this.props;diff --git a/frontend/src/lib/uPlotV2/config/types.ts b/frontend/src/lib/uPlotV2/config/types.tsindex 70b51ea8fa..9a8dc2e214 100644--- a/frontend/src/lib/uPlotV2/config/types.ts+++ b/frontend/src/lib/uPlotV2/config/types.ts@@ -28,6 +28,7 @@ export abstract class ConfigBuilder<P, T> {export interface ConfigBuilderProps {widgetId?: string;onDragSelect?: (startTime: number, endTime: number) => void;+ tzDate?: uPlot.LocalDateFromUnix;}/**