Skip to content

Commit f19f14b

Browse files
committed
fix: replace >= sign and minor fixes
1 parent 4f650bb commit f19f14b

9 files changed

Lines changed: 6 additions & 5 deletions
Loading
Loading
-64 Bytes
Loading
-62 Bytes
Loading
-62 Bytes
Loading
-58 Bytes
Loading

packages/charts/src/chart_types/heatmap/state/selectors/compute_legend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const computeLegendSelector = createCustomCachedSelector(
3030

3131
return {
3232
color,
33-
label: `>${i === 0 ? '=' : ''} ${formattedStart}`,
33+
label: `${i === 0 ? '' : '>'} ${formattedStart}`,
3434
seriesIdentifiers: [seriesIdentifier],
3535
isSeriesHidden: deselectedDataSeries.some((dataSeries) => dataSeries.key === seriesIdentifier.key),
3636
isToggleable: true,

packages/charts/src/chart_types/heatmap/state/selectors/get_color_scale.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const SCALE_TYPE_TO_SCALE_FN = {
4747
[ScaleType.Quantize]: getQuantizedScale,
4848
[ScaleType.Threshold]: getThresholdScale,
4949
};
50+
const DEFAULT_COLOR_SCALE_TYPE = ScaleType.Linear;
5051

5152
/**
5253
* @internal
@@ -55,7 +56,7 @@ const SCALE_TYPE_TO_SCALE_FN = {
5556
export const getColorScale = createCustomCachedSelector(
5657
[getHeatmapSpecSelector, getHeatmapTableSelector],
5758
(spec, heatmapTable) => {
58-
const { scale, bands } = SCALE_TYPE_TO_SCALE_FN[spec.colorScale ?? ScaleType.Linear](spec, heatmapTable);
59+
const { scale, bands } = SCALE_TYPE_TO_SCALE_FN[spec.colorScale ?? DEFAULT_COLOR_SCALE_TYPE](spec, heatmapTable);
5960
return {
6061
scale,
6162
bands: dedupBands(bands, spec),

storybook/stories/heatmap/1_basic.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const Example = () => {
7878
[],
7979
);
8080

81-
const logDebugstate = debounce(() => {
81+
const logDebugState = debounce(() => {
8282
if (!debugState) return;
8383

8484
const statusEl = document.querySelector<HTMLDivElement>('.echChartStatus');
@@ -102,9 +102,9 @@ export const Example = () => {
102102
<Chart>
103103
<Settings
104104
onElementClick={onElementClick}
105-
onRenderChange={logDebugstate}
105+
onRenderChange={logDebugState}
106106
showLegend
107-
legendPosition="top"
107+
legendPosition="right"
108108
onBrushEnd={action('onBrushEnd')}
109109
brushAxis="both"
110110
xDomain={{ min: 1572825600000, max: 1572912000000, minInterval: 1800000 }}

0 commit comments

Comments
 (0)