Skip to content

Commit

Permalink
fix: status card
Browse files Browse the repository at this point in the history
fix for bar chart

Signed-off-by: saumeya <[email protected]>

review comments

Signed-off-by: saumeya <[email protected]>
  • Loading branch information
saumeya committed Dec 18, 2023
1 parent 325b942 commit b30a11d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const PipelinesAverageDuration: React.FC<PipelinesAverageDurationProps> = ({
}
scale={{ x: 'time', y: 'linear' }}
domain={domainValue}
domainPadding={{ x: [30, 25], y: [30, 25] }}
domainPadding={{ x: [30, 25]}}
height={150}
width={400}
padding={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const PipelinesRunsNumbersChart: React.FC<PipelinesRunsNumbersChartProps> = ({
}
scale={{ x: 'time', y: 'linear' }}
domain={domainValue}
domainPadding={{ x: [30, 25], y: [30, 25] }}
domainPadding={{ x: [30, 25] }}
height={150}
padding={{
top: 20,
Expand Down
9 changes: 4 additions & 5 deletions src/components/pipelines-overview/PipelineRunsStatusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import {
CardTitle,
Grid,
GridItem,
Popover,
} from '@patternfly/react-core';
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons';
import { chart_color_black_200 as othersColor } from '@patternfly/react-tokens/dist/js/chart_color_black_200';
import { chart_color_black_500 as cancelledColor } from '@patternfly/react-tokens/dist/js/chart_color_black_500';
import { chart_color_green_400 as successColor } from '@patternfly/react-tokens/dist/js/chart_color_green_400';
Expand Down Expand Up @@ -206,7 +204,7 @@ const PipelinesRunsStatusCard: React.FC<PipelinesRunsStatusCardProps> = ({

const legendData = donutData.map((data) => {
return {
name: `${data.x}: ${data.y}%`,
name: `${data.x}: ${isNaN(data.y) ? 0 : data.y}%`,
};
});
return (
Expand All @@ -219,7 +217,8 @@ const PipelinesRunsStatusCard: React.FC<PipelinesRunsStatusCardProps> = ({
<CardTitle className="pipeline-overview__pipelinerun-status-card__title">
<span>
{t('PipelineRun status')}{' '}
<Popover
{/* TODO - Add this tooltip after text content is finalized */}
{/* <Popover
bodyContent={
<>
{t(
Expand All @@ -235,7 +234,7 @@ const PipelinesRunsStatusCard: React.FC<PipelinesRunsStatusCardProps> = ({
>
<OutlinedQuestionCircleIcon />
</span>
</Popover>
</Popover> */}
</span>
</CardTitle>
<CardBody className="pipeline-overview__pipelinerun-status-card__title">
Expand Down

0 comments on commit b30a11d

Please sign in to comment.