Skip to content

Commit

Permalink
[Annotations] Fix chart dark mode theme (elastic#190108)
Browse files Browse the repository at this point in the history
## Summary

Fix chart dark mode theme !!

### After
<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/277281d6-b617-44e3-8935-5d5f8a709c3f">


### Before

<img width="1727" alt="image"
src="https://github.com/user-attachments/assets/1923c00f-c3a4-4eb7-b1e2-18ee7a61ce77">
  • Loading branch information
shahzad31 authored Aug 9, 2024
1 parent 520c550 commit 6d46edc
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { i18n } from '@kbn/i18n';
import { parse } from '@kbn/datemath';
import { TooltipValue } from '@elastic/charts/dist/specs';
import moment from 'moment';
import { useChartThemes } from '../../hooks/use_chart_themes';
import { AnnotationsPermissions } from '../../components/annotations/hooks/use_annotation_permissions';
import { createAnnotationPortal } from './create_annotation_btn';
import { useAnnotations } from '../../components/annotations/use_annotations';
Expand Down Expand Up @@ -76,6 +77,8 @@ export function AnnotationsListChart({
{ x: domain.max, y: 1 },
];

const { baseTheme } = useChartThemes();

return (
<>
<InPortal node={createAnnotationPortal}>
Expand Down Expand Up @@ -113,6 +116,7 @@ export function AnnotationsListChart({
onBrushEnd={brushEndListener}
onAnnotationClick={onAnnotationClick}
xDomain={domain}
baseTheme={baseTheme}
theme={{
chartMargins: {
top: 50,
Expand Down

0 comments on commit 6d46edc

Please sign in to comment.