mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 00:37:04 -06:00
Annotations: Improve rendering performance of event markers (#39984)
This commit is contained in:
parent
cdeb3e730d
commit
ead8429210
@ -1,4 +1,3 @@
|
||||
import { css } from '@emotion/css';
|
||||
import React from 'react';
|
||||
|
||||
interface MarkerProps {
|
||||
@ -13,11 +12,11 @@ interface MarkerProps {
|
||||
export const Marker: React.FC<MarkerProps> = ({ x, y, children }) => {
|
||||
return (
|
||||
<div
|
||||
className={css`
|
||||
position: absolute;
|
||||
top: ${y}px;
|
||||
left: ${x}px;
|
||||
`}
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: `${y}px`,
|
||||
left: `${x}px`,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
|
@ -106,7 +106,7 @@ export class TestDataDataSource extends DataSourceWithBackend<TestDataQuery> {
|
||||
}
|
||||
|
||||
annotationDataTopicTest(target: TestDataQuery, req: DataQueryRequest<TestDataQuery>): Observable<DataQueryResponse> {
|
||||
const events = this.buildFakeAnnotationEvents(req.range, 10);
|
||||
const events = this.buildFakeAnnotationEvents(req.range, 50);
|
||||
const dataFrame = new ArrayDataFrame(events);
|
||||
dataFrame.meta = { dataTopic: DataTopic.Annotations };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user