Skip to content

Commit

Permalink
add-heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Feb 5, 2025
1 parent 96b8995 commit b85cdeb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/x-charts-pro/src/Heatmap/Heatmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
import { ChartContainerPro, ChartContainerProProps } from '../ChartContainerPro';
import { HeatmapSeriesType } from '../models/seriesType/heatmap';
import { HeatmapPlot } from './HeatmapPlot';
import { plugin as heatmapPlugin } from './plugin';
import { seriesConfig as heatmapSeriesConfig } from './seriesConfig';
import { HeatmapTooltip, HeatmapTooltipProps } from './HeatmapTooltip';
import { HeatmapItemSlotProps, HeatmapItemSlots } from './HeatmapItem';

Expand Down Expand Up @@ -97,7 +97,7 @@ const defaultColorMap = interpolateRgbBasis([
'#084081',
]);

const seriesConfig: ChartSeriesConfig<'heatmap'> = { heatmap: heatmapPlugin };
const seriesConfig: ChartSeriesConfig<'heatmap'> = { heatmap: heatmapSeriesConfig };

const Heatmap = React.forwardRef(function Heatmap(
inProps: HeatmapProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
import { getBaseExtremum } from './extremums';
import formatter from './formatter';
import seriesProcessor from './seriesProcessor';
import getColor from './getColor';
import tooltipGetter from './tooltip';

export const plugin: ChartSeriesTypeConfig<'heatmap'> = {
seriesProcessor: formatter,
export const seriesConfig: ChartSeriesTypeConfig<'heatmap'> = {
seriesProcessor,
colorProcessor: getColor,
legendGetter: () => [],
tooltipGetter,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SeriesProcessor, SeriesId } from '@mui/x-charts/internals';
import { DefaultizedHeatmapSeriesType } from '../models/seriesType/heatmap';
import { DefaultizedHeatmapSeriesType } from '../../models/seriesType/heatmap';

const formatter: SeriesProcessor<'heatmap'> = (params) => {
const seriesProcessor: SeriesProcessor<'heatmap'> = (params) => {
const { series, seriesOrder } = params;

const defaultizedSeries: Record<SeriesId, DefaultizedHeatmapSeriesType> = {};
Expand All @@ -21,4 +21,4 @@ const formatter: SeriesProcessor<'heatmap'> = (params) => {
};
};

export default formatter;
export default seriesProcessor;

0 comments on commit b85cdeb

Please sign in to comment.