diff --git a/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx b/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx index 81de4baf..79a05df6 100644 --- a/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx +++ b/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx @@ -12,6 +12,7 @@ import { } from '@patternfly/react-core'; import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import { Chart, registerables } from 'chart.js'; +import annotationPlugin from 'chartjs-plugin-annotation'; import { Bar } from 'react-chartjs-2'; import { @@ -26,8 +27,11 @@ import { import 'chartjs-adapter-moment'; import { toMonthAndYear } from '../../../Utilities/time'; +Chart.register(annotationPlugin); Chart.register(...registerables); +const currentDate = new Date().toString(); + export const chartMajorVersionCfg = { data: { labels: ['RHEL 9', 'RHEL 8'], @@ -87,6 +91,18 @@ export const chartMajorVersionCfg = { legend: { position: 'bottom' as const, }, + annotation: { + annotations: { + today: { + type: 'line' as const, + xMin: currentDate, + xMax: currentDate, + borderColor: 'black', + borderWidth: 2, + borderDash: [8, 2], + }, + }, + }, }, }, };