@@ -49,7 +49,7 @@ const defaultColorScheme = [
49
49
function applyDefaults ( {
50
50
getSeriesStyle = ( ) => ( { } ) ,
51
51
getDatumStyle = ( ) => ( { } ) ,
52
- getSeriesOrder = ( d ) => d ,
52
+ getSeriesOrder = d => d ,
53
53
grouping = groupingPrimary ,
54
54
focus = focusAuto ,
55
55
showVoronoi = false ,
@@ -79,9 +79,9 @@ function useCreateStore(initialState) {
79
79
}
80
80
81
81
export default function ChartState ( options ) {
82
- let { Provider : StateProvider } = useCreateStore ( ( setState ) => {
83
- const setOffset = ( updater ) =>
84
- setState ( ( old ) => {
82
+ let { Provider : StateProvider } = useCreateStore ( setState => {
83
+ const setOffset = updater =>
84
+ setState ( old => {
85
85
const newOffset = functionalUpdate ( updater , old . offset ) ;
86
86
87
87
return {
@@ -142,7 +142,7 @@ export function Chart(options) {
142
142
} = applyDefaults ( options ) ;
143
143
144
144
let [ { focused, element, axisDimensions, pointer } ] = useChartState (
145
- ( d ) => ( {
145
+ d => ( {
146
146
focused : d . focused ,
147
147
element : d . element ,
148
148
axisDimensions : d . axisDimensions ,
@@ -193,7 +193,7 @@ export function Chart(options) {
193
193
defaultColors,
194
194
} ) ;
195
195
196
- const focusedElement = React . useMemo ( ( ) => {
196
+ focused = React . useMemo ( ( ) => {
197
197
// Get the closest focus datum out of the datum group
198
198
if ( focused || element ) {
199
199
let resolvedFocus = focus ;
@@ -251,7 +251,7 @@ export function Chart(options) {
251
251
252
252
const contextValue = {
253
253
latestFocused,
254
- focusedElement ,
254
+ focused ,
255
255
tooltip,
256
256
width,
257
257
height,
0 commit comments