Skip to content

Commit

Permalink
[Renderers] always include baseTheme with charts theme (elastic#145401)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon authored Nov 16, 2022
1 parent dc4d881 commit d82075f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ export const GaugeComponent: FC<GaugeRenderProps> = memo(
noResults={<EmptyPlaceholder icon={icon} renderComplete={onRenderChange} />}
debugState={window._echDebugStateFlag ?? false}
theme={[{ background: { color: 'transparent' } }, chartTheme]}
baseTheme={chartsThemeService.useChartsBaseTheme()}
ariaLabel={args.ariaLabel}
ariaUseDefaultSummary={!args.ariaLabel}
onRenderChange={onRenderChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ export const HeatmapComponent: FC<HeatmapRenderProps> = memo(
debugState={window._echDebugStateFlag ?? false}
tooltip={tooltip}
theme={[themeOverrides, chartTheme]}
baseTheme={chartsThemeService.useChartsBaseTheme()}
xDomain={{
min:
dateHistogramMeta && dateHistogramMeta.timeRange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ export const MetricVis = ({
const scrollContainerRef = useRef<HTMLDivElement>(null);
const scrollDimensions = useResizeObserver(scrollContainerRef.current);

const {
metric: { minHeight },
} = getThemeService().useChartsBaseTheme();
const baseTheme = getThemeService().useChartsBaseTheme();

const minHeight = chartTheme.metric?.minHeight ?? baseTheme.metric.minHeight;

useEffect(() => {
const minimumRequiredVerticalSpace = minHeight * grid.length;
Expand Down Expand Up @@ -377,6 +377,7 @@ export const MetricVis = ({
},
chartTheme,
]}
baseTheme={baseTheme}
onRenderChange={onRenderChange}
onElementClick={(events) => {
if (!filterable) {
Expand Down

0 comments on commit d82075f

Please sign in to comment.