Copilot commented on code in PR #3941:
URL: https://github.com/apache/hertzbeat/pull/3941#discussion_r2659714900
##########
web-app/src/app/routes/monitor/monitor-data-chart/monitor-data-chart.component.ts:
##########
@@ -201,7 +201,12 @@ export class MonitorDataChartComponent implements OnInit,
OnDestroy {
}
},
tooltip: {
- trigger: 'axis'
+ trigger: 'axis',
+ extraCssText: 'max-width: 580px; max-height: 400px; overflow-y:
auto;',
Review Comment:
There's an extra space in the extraCssText value. The double space between
"400px;" and "overflow-y:" should be a single space for consistency with
standard CSS formatting.
```suggestion
extraCssText: 'max-width: 580px; max-height: 400px; overflow-y:
auto;',
```
##########
web-app/src/app/routes/monitor/monitor-data-chart/monitor-data-chart.component.ts:
##########
@@ -201,7 +201,12 @@ export class MonitorDataChartComponent implements OnInit,
OnDestroy {
}
},
tooltip: {
- trigger: 'axis'
+ trigger: 'axis',
+ extraCssText: 'max-width: 580px; max-height: 400px; overflow-y:
auto;',
+ enterable: true,
+ renderMode: 'html',
+ appendToBody: true,
+ confine: false
Review Comment:
The combination of "appendToBody: true" and "confine: false" could cause the
tooltip to extend beyond the viewport boundaries, making it partially or fully
invisible if the chart is positioned near screen edges. Consider using
"confine: true" to ensure the tooltip remains within the viewport, or implement
additional positioning logic to handle edge cases where the tooltip might be
cut off by the viewport boundaries.
```suggestion
confine: true
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]