Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed Aug 24, 2020
1 parent 7871252 commit dc5851b
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ const CriterionPreviewChart: React.FC<ChartProps> = ({
buckets,
});

useMount(() => {
getChartPreviewData();
});

useDebounce(
() => {
getChartPreviewData();
Expand Down Expand Up @@ -195,7 +191,7 @@ const CriterionPreviewChart: React.FC<ChartProps> = ({
chartDomain.min = chartDomain.min * 0.9; // Allow some padding so the threshold annotation has better visibility
}

const opacity = 0.3;
const THRESHOLD_OPACITY = 0.3;
const groupByLabel = groupBy && groupBy.length > 0 ? groupBy.join(', ') : null;
const dateFormatter = useDateFormatter(xMin, xMax);
const timeLabel = TIME_LABELS[timeUnit as keyof typeof TIME_LABELS];
Expand Down Expand Up @@ -252,7 +248,7 @@ const CriterionPreviewChart: React.FC<ChartProps> = ({
id="below-threshold"
style={{
fill: colorTransformer(Color.color1),
opacity,
opacity: THRESHOLD_OPACITY,
}}
dataValues={[
{
Expand All @@ -271,7 +267,7 @@ const CriterionPreviewChart: React.FC<ChartProps> = ({
id="above-threshold"
style={{
fill: colorTransformer(Color.color1),
opacity,
opacity: THRESHOLD_OPACITY,
}}
dataValues={[
{
Expand Down

0 comments on commit dc5851b

Please sign in to comment.