From 06093b26be2673bf32ae8554079f364ed4299c61 Mon Sep 17 00:00:00 2001 From: Jasper Kang Date: Fri, 17 Jan 2025 09:52:28 +1300 Subject: [PATCH] move defaults to component to make them available when options is passed --- .../src/components/line-chart/line-chart.tsx | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/projects/js-packages/charts/src/components/line-chart/line-chart.tsx b/projects/js-packages/charts/src/components/line-chart/line-chart.tsx index ae9a1a91a59f8..eb88bb5cf5a55 100644 --- a/projects/js-packages/charts/src/components/line-chart/line-chart.tsx +++ b/projects/js-packages/charts/src/components/line-chart/line-chart.tsx @@ -83,16 +83,7 @@ const LineChart: FC< LineChartProps > = ( { withTooltips = true, showLegend = false, legendOrientation = 'horizontal', - options = { - axis: { - x: { - orientation: 'bottom', - }, - y: { - orientation: 'left', - }, - }, - }, + options = {}, } ) => { const providerTheme = useChartTheme(); @@ -134,8 +125,13 @@ const LineChart: FC< LineChartProps > = ( { yScale={ { type: 'linear', nice: true } } > - - + + { data.map( ( seriesData, index ) => (