@@ -19,10 +19,11 @@ export const LineChart: FC<{
1919 formatLabel : ( d : string | number | Date ) => string ;
2020 height ?: number ;
2121 lineColor ?: Color ;
22+ dotColor ?: Color ;
2223 xAxisLabel ?: string ;
2324 yAxisLabel ?: string ;
2425 valueFormatter ?: ( value : number ) => string ;
25- } > = ( { data, formatLabel, height = 220 , lineColor, xAxisLabel, yAxisLabel, valueFormatter } ) => {
26+ } > = ( { data, formatLabel, height = 220 , lineColor, dotColor , xAxisLabel, yAxisLabel, valueFormatter } ) => {
2627 const [ tooltip , setTooltip ] = useState < TooltipData > ( null ) ;
2728 const themeCtx = useTheme ( ) ;
2829
@@ -33,7 +34,7 @@ export const LineChart: FC<{
3334 const gradientEndColor = 'transparent' ;
3435 const gridColor = themeCtx ?. theme ?. main ?. border || '#e0e0e0' ;
3536 const textColor = themeCtx ?. theme ?. text ?. primary || '#606060' ;
36- const dotColor = themeCtx ?. theme ?. main ?. dark || '#83EC4A' ;
37+ const mainDotColor = dotColor ? dotColor : themeCtx ?. theme ?. main ?. primary || '#83EC4A' ;
3738 const frameColor = 'transparent' ;
3839 const tooltipBackground = themeCtx ?. theme ?. background ?. primary || '#ffffff' ;
3940 const tooltipTextColor = themeCtx ?. theme ?. text ?. primary || '#000000' ;
@@ -249,7 +250,7 @@ export const LineChart: FC<{
249250 onMouseLeave = { ( ) => handlePointHover ( null ) }
250251 />
251252 { /* Visible dot */ }
252- < circle cx = { cx } cy = { p . y } r = "5" fill = { dotColor } style = { { pointerEvents : 'none' } } />
253+ < circle cx = { cx } cy = { p . y } r = "5" fill = { mainDotColor } style = { { pointerEvents : 'none' } } />
253254 </ g >
254255 ) ;
255256 } ) }
0 commit comments