UNPKG

@grafana/ui

Version:
1 lines 1.04 kB
{"version":3,"file":"Marker.mjs","sources":["../../../../../src/components/uPlot/geometries/Marker.tsx"],"sourcesContent":["import * as React from 'react';\n\ninterface MarkerProps {\n /** x position relative to plotting area bounding box*/\n x: number;\n /** y position relative to plotting area bounding box*/\n y: number;\n}\n\n// An abstraction over a component rendered within a chart canvas.\n// Marker is rendered with DOM coords of the chart bounding box.\nexport const Marker = ({ x, y, children }: React.PropsWithChildren<MarkerProps>) => {\n return (\n <div\n style={{\n position: 'absolute',\n top: `${y}px`,\n left: `${x}px`,\n }}\n >\n {children}\n </div>\n );\n};\n"],"names":[],"mappings":";;AAWO,MAAM,SAAS,CAAC,EAAE,CAAG,EAAA,CAAA,EAAG,UAAqD,KAAA;AAClF,EACE,uBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,QAAU,EAAA,UAAA;AAAA,QACV,GAAA,EAAK,GAAG,CAAC,CAAA,EAAA,CAAA;AAAA,QACT,IAAA,EAAM,GAAG,CAAC,CAAA,EAAA;AAAA,OACZ;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;;;;"}