Skip to content

Commit

Permalink
fix: replace >= sign and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
markov00 committed Aug 11, 2021
1 parent 4f650bb commit f19f14b
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const computeLegendSelector = createCustomCachedSelector(

return {
color,
label: `>${i === 0 ? '=' : ''} ${formattedStart}`,
label: `${i === 0 ? '' : '>'} ${formattedStart}`,
seriesIdentifiers: [seriesIdentifier],
isSeriesHidden: deselectedDataSeries.some((dataSeries) => dataSeries.key === seriesIdentifier.key),
isToggleable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const SCALE_TYPE_TO_SCALE_FN = {
[ScaleType.Quantize]: getQuantizedScale,
[ScaleType.Threshold]: getThresholdScale,
};
const DEFAULT_COLOR_SCALE_TYPE = ScaleType.Linear;

/**
* @internal
Expand All @@ -55,7 +56,7 @@ const SCALE_TYPE_TO_SCALE_FN = {
export const getColorScale = createCustomCachedSelector(
[getHeatmapSpecSelector, getHeatmapTableSelector],
(spec, heatmapTable) => {
const { scale, bands } = SCALE_TYPE_TO_SCALE_FN[spec.colorScale ?? ScaleType.Linear](spec, heatmapTable);
const { scale, bands } = SCALE_TYPE_TO_SCALE_FN[spec.colorScale ?? DEFAULT_COLOR_SCALE_TYPE](spec, heatmapTable);
return {
scale,
bands: dedupBands(bands, spec),
Expand Down
6 changes: 3 additions & 3 deletions storybook/stories/heatmap/1_basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const Example = () => {
[],
);

const logDebugstate = debounce(() => {
const logDebugState = debounce(() => {
if (!debugState) return;

const statusEl = document.querySelector<HTMLDivElement>('.echChartStatus');
Expand All @@ -102,9 +102,9 @@ export const Example = () => {
<Chart>
<Settings
onElementClick={onElementClick}
onRenderChange={logDebugstate}
onRenderChange={logDebugState}
showLegend
legendPosition="top"
legendPosition="right"
onBrushEnd={action('onBrushEnd')}
brushAxis="both"
xDomain={{ min: 1572825600000, max: 1572912000000, minInterval: 1800000 }}
Expand Down

0 comments on commit f19f14b

Please sign in to comment.