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,CAAA,EAAG,CAAA,EAAG,UAAS,KAA4C;AAClF,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO;AAAA,QACL,QAAA,EAAU,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;;;;"}