From 6a59487c99df977da184d8af69187494b940a2b3 Mon Sep 17 00:00:00 2001 From: Brian Love Date: Mon, 2 Jun 2025 17:46:56 -0700 Subject: [PATCH] 04-solution-combo-chart --- src/components/ComboChart.tsx | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/components/ComboChart.tsx b/src/components/ComboChart.tsx index f6d888e..fd3b465 100644 --- a/src/components/ComboChart.tsx +++ b/src/components/ComboChart.tsx @@ -13,8 +13,39 @@ export function ComboChart(): ReactElement { title: { text: 'Flight Time Analysis', }, - series: [], - axes: [], + series: [ + { + type: 'bar', + xKey: 'month', + yKey: 'time', + yName: 'Monthly Flight Time', + }, + { + type: 'line', + xKey: 'month', + yKey: 'time', + yName: 'Trend', + marker: { + enabled: true, + }, + }, + ], + axes: [ + { + type: 'number', + position: 'left', + title: { + text: 'Flight Time (hours)', + }, + }, + { + type: 'category', + position: 'bottom', + label: { + formatter: (params) => data[params.index].label, + }, + }, + ], theme, }; }, [data]);